Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API query failed return HTML page #1292

Closed
RemiDesgrange opened this issue Mar 19, 2018 · 4 comments
Closed

API query failed return HTML page #1292

RemiDesgrange opened this issue Mar 19, 2018 · 4 comments

Comments

@RemiDesgrange
Copy link

RemiDesgrange commented Mar 19, 2018

I query the api with this request (ona.io site) :

https://api.ona.io/api/v1/data/<myID>?query={"_submission_time":{"$gt":"2018-02-12"}}

and it gave me this error :
image

The problem here is not that I misformed my request but the return value which is HTML and not json erro payload.

Aha! Link: https://ona.aha.io/features/PROD-420

@ukanga
Copy link
Member

ukanga commented Mar 19, 2018

All 500 errors will likely always be HTML pages, in this case, it seems we may not be interpreting the query correctly.

I will suggest you use the date_created field which is exactly the same as the _submission_time field. See https://api.ona.io/static/docs/data.html#query-submitted-data-of-a-specific-form-using-date-created for details.

@RemiDesgrange
Copy link
Author

Ok good to know ;-)

@ukanga
Copy link
Member

ukanga commented Mar 19, 2018

Created an issue for the 500 error, see #1293.

@pld
Copy link
Member

pld commented Apr 5, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants