Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MarkusEng1998
Resolver II
Resolver II

Filter API URL (400) Bad Request

https://AAA_WebServer/api/items/logs?$select=field,action,time,old_value,new_value,note,change_source,article_id,action_field,source_text,username_username,username_email,article_id_name,article_id_bim_id,article_id_number_name?filter=items\time gt '2021-06-30'

 

Is there anything in the syntax that looks wrong? the API URL works if I leave out the filter section.

 

btw. I also tried filter=items\time gt datetime''2021-06-30T00:00:00'

1 ACCEPTED SOLUTION
mahoneypat
Employee
Employee

Yes.  Typically each parameter is separated by '&', and filter should be prefixed by $.

 

https://AAA_WebServer/api/items/logs?$select=field,action,time,old_value,new_value,note,change_source,article_id,action_field,source_text,username_username,username_email,article_id_name,article_id_bim_id,article_id_number_name&$filter=items\time gt '2021-06-30'

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

3 REPLIES 3
v-kelly-msft
Community Support
Community Support

Hi  @MarkusEng1998 ,

 

Try below format:

$filter=StartDate ge datetime'2014-01-01T00%3a00%3a00'

Check the reference below:

https://newbedev.com/rest-api-filter-by-start-and-end-dates-using-today

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

Thank you @mahoneypat and @v-kelly-msft for your responses. The ampersand worked!

 

Cheers, I really appreciate this forum. I am learning so much.

mahoneypat
Employee
Employee

Yes.  Typically each parameter is separated by '&', and filter should be prefixed by $.

 

https://AAA_WebServer/api/items/logs?$select=field,action,time,old_value,new_value,note,change_source,article_id,action_field,source_text,username_username,username_email,article_id_name,article_id_bim_id,article_id_number_name&$filter=items\time gt '2021-06-30'

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors