block-quote On this pagechevron-down
copy Copy chevron-down
Quick Start Authenticating Requests
Requests to the API are authenticated using a Bearer token header, the token being your API key.
Requests with a body must be formatted using JSON. Responses with content will be in JSON.
Make your first request
Before we start, lets set our API Key as a variable in our Shell session.
Copy APIKey = { Your API Key} To make your first request, send an authenticated request to the courses endpoint. This will list all of courses available to your organisation.
🔵 GET courses chevron-right See below for an example of how to perform this call using curl:
Copy curl https://training.tapintosafety.com.au/api/v2/courses \
-H " Authorization: Bearer $APIKey " That was a big list! Let's narrow it down a little.
Copy curl https://training.tapintosafety.com.au/api/v2/courses \
-G -d " categoryType=safety-training " -d " name=Safety " \
-H " Authorization: Bearer $APIKey " Much easier to read. At the time of writing this request returned just one course, however our library is updating all the time, so maybe you got a few more!