Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Broken orderby and column filtering on violation API #126

Open
chrisgillis opened this issue Jun 18, 2018 · 1 comment
Open

Broken orderby and column filtering on violation API #126

chrisgillis opened this issue Jun 18, 2018 · 1 comment
Labels

Comments

@chrisgillis
Copy link

I'm having some serious looking issues with the Department of Labor Violation APIs.

This request seems to work alright. curl -k --globoff -H "X-API-KEY: YOUR_API_KEY_HERE" https://data.dol.gov/get/violation/limit/1/orderby/asc

But order the other way and you get the same exact result. curl -k --globoff -H "X-API-KEY: YOUR_API_KEY_HERE" https://data.dol.gov/get/violation/limit/1/orderby/desc

Try sending this request as noted in their documentation to select a limited set of data: curl -k --globoff -H "X-API-KEY: YOUR_API_KEY_HERE" https://data.dol.gov/get/violation/limit/1/offset/0/orderby/desc/columns/[ACTIVITY_NR:VIOL_TYPE]

And you'll get the error message

The URI you submitted has disallowed characters.

Assuming their API docs have diverged from the production API, through some trial and error I tried: curl -k --globoff -H "X-API-KEY: YOUR_API_KEY_HERE" https://data.dol.gov/get/violation/limit/1/offset/0/orderby/desc/columns/ACTIVITY_NR:VIOL_TYPE

Which rewards you with curl: (52) Empty reply from server.

What am I missing here?

@giridhar giridhar added the bug label Jun 18, 2018
@giridhar
Copy link
Contributor

we have observed this issues while applying filters recently on OSHA dataset. And I agree the documentation for API v2 is also needed some fixing which is underway.

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

No branches or pull requests

2 participants