Filtering Asset Link data

35 views
Skip to first unread message

Michael Dixon

unread,
Feb 22, 2021, 9:32:35 PM2/22/21
to Accelo Developers
I am trying to filter Asset Link data as per https://api.accelo.com/docs/#list-asset-links by using the date filters, but it looks like this isn't working.

The API doco says I can use standard date filters using "date_start" and "date_end", but the fields in the object are actually called "start_date" and "end_date".  This is the first problem as the date filtering doco mentions that the standard should be "<date_field>_before" and "<date_field>_after".

I have tried both "date_start" and "start_date" when constructing the date filter, but neither seems to work anyway.  i.e.:

_filters=start_date_after(1575032400)
_filters=date_start_after(1575032400)

Regardless of syntax I still get *all* asset link records.

Has anyone managed to successfully filter asset links via the API?

Nick Clark

unread,
Mar 7, 2021, 8:10:03 PM3/7/21
to Accelo Developers
Hi Michael, 

I've been informed that this is a bug however there is a workaround you can use today, and I can confirm this has worked in my testing. Could you please try the following request:
{{url}}/api/v0/assets/links?_filters=date_date_start_after(1614657465)
 
The double use of date is required but should give you the information you require.

Regards,
Nick 
Reply all
Reply to author
Forward
0 new messages