Request and response structure
The API is HTTP and JSON-based. Data passed in POST and PUT requests is stored in the body as JSON. In responses, the data is also stored in the body response and structured as JSON.
Before requesting any endpoint, you will need to get a bearer token.
A "Bearer Token" is a JSON Web Token whose role is to indicate that you are authenticated when you consult resources.
To send requests to the web service in charge of attributing a token, you need :
- a client ID
- a client secret
- a host
please contact your Teach on Mars Project Manager to get them.
You retrieve this token as shown below. The grant_type, client_id and client_id are sent as form-data.
The Mission Center response should be
Then you must send the bearer token with each request to ensure it is valid.
Find all the technical information in the swagger
Once you have your bearer token, you can start sending request to the Teach on Mars web services. If you want to get the learners from all your Mission Center, you can omit the instance Id
But if you want to send requests to a specific Mission Center instance, you can add the parameters.