I am making a data call against the data.dol.gov API using R and the following works:

apikey = ####
query = "https://data.dol.gov/get/violation/limit/8/" 
getdata <- GET(url=query,add_headers("X-API-KEY"=apikey)) 
results <- fromJSON(content(getdata,type="text"))

However, when I try to add filters, they don't appear to work. I'm following what was provided in the developers http://developer.dol.gov/accessing-the-apis-using-http-requests/

Using the following command:

query = "https://data.dol.gov/get/violation/limit/8/issuance_date/start_date/2010-03-15/end_date/2015-04-15"

this does not work, even though I feel like i'm following what was provided in the developer's guide. Any help would be most appreciated.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.