🔗Access Token

To enable interaction with the Platform API, it is necessary to generate an access token.This access token is subsequently used when making calls to the API.

This access token will remain operational for a 24-hour period.

Access Token

Token Creation

POST https://<<platform-server>>/ds-api/user-token

Authentication is mandatory, requiring a valid username and password.

Response

{
  "user-token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1ODAyMTYyMjQsImlhdCI6MTU4MDEyOTgxOSwiZGF0YWJhc2UiOiJNYWluIE9yZy4iLCJlbWFpbCI6InRlc3RAZGF0YXNlbnRpbmVsLmlvIiwidXNlciI6InRlc3QifQ.JMDvq2JPcqz9M0_it_0UtP9y79dClVwx9pDEzCl9HTk"
}
Example
curl -u myUser:myPassword -k -X POST https://<<platform-server>>/ds-api/user-token
output
{
  "user-token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1ODAyMTYyMjQsImlhdCI6MTU4MDEyOTgxOSwiZGF0YWJhc2UiOiJNYWluIE9yZy4iLCJlbWFpbCI6InRlc3RAZGF0YXNlbnRpbmVsLmlvIiwidXNlciI6InRlc3QifQ.JMDvq2JPcqz9M0_it_0UtP9y79dClVwx9pDEzCl9HTk"
}

Token Infos

GET https://<<platform-server>>/ds-api/user-token?token={user-token}

Authentication is mandatory, requiring a valid username and password.

Query Parameters

Name
Type
Description

user-token*

String

Access Token

Response

Output example
{
    "email": "contact@datasentinel.io",
    "expire_time": "2020-04-28 13:58:53",
    "organization_name": "ds-data",
    "user": "datasentinel"
}
Example
export TOKEN=<<user_token>>
curl -u myUser:myPassword -k -X GET https://<<platform-server>>/ds-api/user-token?token=$TOKEN
output
{
    "email": "contact@datasentinel.io",
    "expire_time": "2023-04-28 13:58:53",
    "organization_name": "ds-data",
    "user": "datasentinel"
}

Last updated