Community
Showing results for 
Search instead for 
Do you mean 
Reply

API Odata date filter on history module

Highlighted
Copper Super Contributor
Posts: 34
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,

 

Highlighted
Administrator
Posts: 1,379
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.

Highlighted
Copper Super Contributor
Posts: 34
Country: Canada

Re: API Odata date filter on history module

thanks Jon!

Highlighted
Employee
Posts: 123
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.

Highlighted
Copper Super Contributor
Posts: 34
Country: Canada

Re: API Odata date filter on history module

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

Highlighted
Employee
Posts: 123
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

Highlighted
Copper Super Contributor
Posts: 34
Country: Canada

Re: API Odata date filter on history module

good thanks!!