LOGO MET WIT STREEPJE

How to use the documentation

Instructions

  1. Navigate to www.cabmandata.nl and log in as a user.
  2. https://services.cabmandata.com/ReportService/swagger/index.html
  3. Navigate to https://services.cabmandata.com/ReportService/swagger/index.html and follow the steps like the example below and execute a report.
iStock-1299100148-1
Screen_Recording_2020-12-16_at_10.22.07 (1)

How to use an Access Token

Example access token

POST to https://services.cabmandata.com/authentication/connect/token with form-data or x-www-form-urlencoded in the body:

    • grant_type: password
    • username: <username>
    • password: <password>
    • client_id: ExternalClient
Example urlencoded:
POST /authentication/connect/token HTTP/1.1 Host: services.cabmandata.com Accept: application/json Content-Type: application/
x-www-form-urlencoded grant_type=password&username=<username>&password=<password>&client_id=ExternalClient
curl --location --request POST 'https://services.cabmandata.com/authentication/connect/token' \ --header 'Accept: application/json' 
\ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'grant_type=password' \ --data-urlencode
'username=<username>' \ --data-urlencode 'password=<password>' \ --data-urlencode 'client_id=ExternalClient'
var settings = {   "url": "https://services.cabmandata.com/authentication/connect/token",   "method": "POST",   "timeout": 0,   
"headers": { "Accept": "application/json", "Content-Type": "application/x-www-form-urlencoded" }, "data":
{ "grant_type": "password", "username": "<username>", "password": "<password>", "client_id": "ExternalClient" } };
$.ajax(settings).done(function (response) { console.log(response); });

Access token
{ "access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjlGNzdCRDEwRkUzMDYyQ0U1OTMyM0ExQ0JFNjlGQ0MyRURBNTg0MjEiLCJ0eXAiOiJKV1QiLCJ4NXQiOiJuM2U
5RVA0d1lzNVpNam9jdm1uOHd1MmxoQ0UifQ.eyJuYmYiOjE1OTA3NDk2OTEsImV4cCI6MTU5MzM0MTY5MSwiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NTAwMiIsImF1ZCI6Wy
JodHRwczovL2xvY2FsaG9zdDo1MDAyL3Jlc291cmNlcyIsInJlcG9ydHNlcnZpY2VfYXBpIl0sImNsaWVudF9pZCI6Ik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VxaJ3VYe4etiQa5PZw", "expires_in": 2592000,
"token_type": "Bearer", "refresh_token": "ec1539159f4a55fa2263525f80b408685aa8c35a2ff41f1cc7557c82749fb357", "scope": "offline_access
openid reportservice_api" }

When there is a username/password combination and the client is valid a JSON response will be returned including an access_token. In the response it is indicated how long the token will be valid. Periodically refresh the access_token using the provided refresh_token. In case a request is invalid, an error will be returned.

How to use a Refresh token

With a refresh_token a new combination of access_token and refresh_token can be requested. We advise to remain access until the token is expired permanently. Usually an acces_token is valid for an hour. During the change in this period, the token will be extended to one month. After this transmission the expiration date will be set to the standard. After then it is necessary to request through the refresh_token a new token to keep access with the service. In practice, this will mean that a new access_token needs to be requested upon requesting for a report.

A refresh_token is valid for 15 days. You can only refresh an access_token through a refresh_token within one month. After this you will need to authenticate again.

A new access_token can be requested through a refresh_token en is similar to authentication, except the fields will be different in the body.

Example refresh token
POST /authentication/connect/token HTTP/1.1 Host: services.cabmandata.com Accept: application/json Content-Type: application
/x-www-form-urlencoded grant_type=refresh_token&client_id=ExternalClient&refresh_token=ec1539159f4a55fa2263525f80b408685aa8c
35a2ff41f1cc7557c82749fb357
var settings = {   "url": "https://services.cabmandata.com/authentication/connect/token",   "method": "POST",   "timeout": 0,
"headers": { "Accept": "application/json", "Content-Type": "application/x-www-form-urlencoded" }, "data":
{ "grant_type": "refresh_token", "refresh_token": "ec1539159f4a55fa2263525f80b408685aa8c35a2ff41f1cc7557c82749fb357",
"client_id": "ExternalClient" } }; $.ajax(settings).done(function (response) { console.log(response); });

A response when a token is valid is displayed below. The token is invalid when a status 401 is returned. In the response there is a new refresh_token in which an access_token can be requested with the next interval.


Refresh token
{ "id_token":"eyJhbGciOiJSUzI1NiIsImtpZCI6IjlGNzdCRDEwRkUzMDYyQ0U1OTMyM0ExQ0JFNjlGQ0MyRURBNTg0MjEiLCJ0eXAiOiJKV1QiLCJ4NXQiOi
JuM2U5RVA0d1lzNVpNam9jdm1uOHd1MmxoQ0UifQ.eyJuYmYiOjE1OTA3N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yoSBKKm1gA-DAI0gZEEJhuKTMKope7JD1VVLtRfSEY1JUX0L7d2diNUXCiZNJpB_0_3
yF6qJQUv_K3a5DyefVBFHNnLnGX1T8PD0JkgBDERZ9JqnxymbAvmMIc-SaQ9l76IBE2K3IDUOl3etKbVVcOcBHpHzFF2KLtjQ-C5UbesrDSzYv2g_TB3R0TyNHdk
GKVse7caxOurhS6VfiyWR7zhFesuF6rbVYjKTScI5Vy4c84q4sQKe_0FA87KpIx-vaKdHpxcZ9waqTRqnyTCBwB0lQbeX9jngBJIgBcp6k3u0M3H1nugfzJ_FOYm
3Ltkvoqnlg", "expires_in": 2592000, "token_type": "Bearer", "refresh_token": "e643bea2210c1e1d5eb50364fe7ac485e288ecd33376fd
5c72ee192870fc172c", "scope": "openid reportservice_api offline_access" }