Open link in a new tab

Content

Expand project menu

time_entries API do not work with eprops

Hello,

I am trying to retrieve some data with the API, and especially the time entries.

I have coded this in python, and I have some difficulties. When I get time entries with a filter, the filter don't work if I use the "eprops" method, while it works with the "filter" method .

Here are my two urls : 

The first don't work, while the second works well. The first always return all the time entries as if it was not filtered.

The decoding eprops can be done with this python code : 

import json
import urllib 
import base64
import zlib

def eprops_to_dict( string ):
    result = ""
    
    unquoted = urllib.parse.unquote(string)
    decoded = base64.b64decode(unquoted)
    decompressed = zlib.decompress( decoded)
    result = decompressed.decode("utf-8")   
    

    return result

Result is : 

{"filters": "[{\"spent_on\": {\"operator\": \"t\", \"values\": []}}]"}

If I use the same method for another API query, for example work_packages, it works well. I don't understand what happens ?

Thanks a lot for your help.

F. MAZUR.