🔗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.
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"
}
curl -u myUser:myPassword -k -X POST https://<<platform-server>>/ds-api/user-token
{
"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
{
"email": "[email protected]",
"expire_time": "2020-04-28 13:58:53",
"organization_name": "ds-data",
"user": "datasentinel"
}
export TOKEN=<<user_token>>
curl -u myUser:myPassword -k -X GET https://<<platform-server>>/ds-api/user-token?token=$TOKEN
{
"email": "[email protected]",
"expire_time": "2023-04-28 13:58:53",
"organization_name": "ds-data",
"user": "datasentinel"
}
Last updated