Skip to main content
Skip table of contents

Raw reports example with Postman

Other API platforms are available. This example uses Postman.

You’re going to be following links in responses using the same headers, so check that this is enabled in settings:

Initial request:

CODE
GET https://reports.openathens.net/api/v1/example.org/rawreport?date=2023-05-22 
Authorization: OAApiKey <api-key>

Replace example.org with your domain name - e.g. wessex.ac.uk or holby.edu.

The API key goes in the headers section.

Check status:

Click on the href in the response to the initial request. This will open a new tab where you can click on send. The response to that will have a status of RUNNING or FINISHED:

If the status was RUNNING, then the report hasn't been completely built yet and the href will be to itself - click the href to open a new tab but wait a bit before hitting send. If you were coding this you'd set a wait of about 20s per cycle, and that's about right here too.

If as above the status says FINISHED, then the href will open a tab where you can download the results.

Download:

The download is a zipped CSV file so you will want to use the arrow next to send to let you download the response instead of displaying it.

You can also add a filename parameter to the URL if you like. If you don’t the job ID is used as the filename.

Unzip the file and open the CSV in your spreadsheet or BI program of choice.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.