5

I am trying got download OSHA data via API. I have registered my email and got key. When i sent request its throwing invalid API KEY.

https://data.dol.gov/get/accident?KEY=REMOVED

What should we give for "Application Name" when creating Tokens ?

https://data.dol.gov/get/violation_gen_duty_std?KEY=REMOVED

I gave 'violation_gen_duty_std" for the above one.

Any help appreciated . API Details are found at http://developer.dol.gov/health-and-safety/dol-osha-enforcement/#osha_inspection

4

Looks like you got it right in your answer. The "data.dol.gov" URLs use the newer Department of Labor API (v2), which sends the Key in the http headers.

See the data.dol.gov tab for more information at:

http://developer.dol.gov/beginners-guide/

As far as the application name goes when creating a Key/token, you can use whatever you would like -- generally it is the name of your software application, project, product, etc.

2
import com.sun.jersey.api.client.WebResource; 

   WebResource webResource = client.resource("https://data.dol.gov/get/inspection/limit/0");
    webResource.header("X-API-KEY", "REMOVED");

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.