Community
Showing results for 
Search instead for 
Do you mean 
Reply

API Odata date filter on history module

Copper Super Contributor
Posts: 33
Country: Canada

API Odata date filter on history module

Hi. I would like to query the API on the module History but it seems that it's impossible to query the dates.

 

Here my query string:

strFilter = "?$filter=(startTime ge 2017-01-01T00:00:00Z and startTime le 2017-12-31T23:59:59Z)"

 

I get error 500

 

This filter work:

strFilter = "?$filter=historyTypeID ge 1000"

 

I'm trying to get all history in 2017.

 

Thanks,

 

Administrator
Posts: 1,372
Country: United_Kingdom

Re: API Odata date filter on history module

It looks like there is an issue with this particular OData query, I'm not able to make requests on this either - any attempt to filter on startTime or endTime just returns:

 

"message": "An error has occurred.",
"exceptionMessage": "Unable to process filter",
"exceptionType": "System.ArgumentException"

 

I'm going to move this thread to the WebAPI development board, and raise this with the API team.

 

I've also attached the stackTrace for this error for their reference.

Copper Super Contributor
Posts: 33
Country: Canada

Re: API Odata date filter on history module

thanks Jon!

Employee
Posts: 81
Country: USA

Re: API Odata date filter on history module

I was able to locate the exception when filtering on history dates.  I have fixed the problem and will get this in on the next release of the API.  This should be sometime this week.

Copper Super Contributor
Posts: 33
Country: Canada

Re: API Odata date filter on history module

Good. just let us know when it's available.

Employee
Posts: 81
Country: USA

Re: API Odata date filter on history module

Not sure if you already got the update, but this issue is fixed:

 

Get latest API build here.

 

https://www.act.com/download/download-act!-premium-v19

https://www.act.com/download/download-act!-premium-v20

Copper Super Contributor
Posts: 33
Country: Canada

Re: API Odata date filter on history module

good thanks!!