Before You Start
To use the DaaS API you will need the following:
- An x-api-key – which should be included in the header.
- A user_id and password – to generate token.
Both are provided by Gatehouse, and you can contact us here firstname.lastname@example.org
Generate your first token
We will first showcase how to retrieve the token from swagger and how it also can be accomplished by using curl.
Below you see the login for DaaS API using swagger, here we need update the x-api-key and json body with user_id and password values received
Swagger also conveniently generate the equivalent curl. You can copy the curl with the bottom in the lower right corner our swagger UI for DaaS API.
Using either of those two options will response with 201 HTML status code with a json body shown below.
Now with the token, we can start by retrieving the locodes
Return a list of locodes
Similar to the login we need the x-api-key, but the user_id and password is not need now that we have the token. So lets look at the GET request for locodes.
In the parameters tab, two variable needs to be set, the first one is for the x-api-key similar to the login request. The second uses the token, it needs a prefix like shown on the image (“Bearer” followed by a white-space and then the token value) Executing this request will response with the following.
#TODO when locodes are up and running