Get and delete API token
Gets API token existing for a current account and deletes it.
Step 1 - Sign in
Sign user in.
Endpoint
POST /login
Request
POST /login
Content-Type: application/json
{
"name": "mary.griffin@circularo.com",
"password": "#32Password1!",
"tenant": "default"
}
Response
Note following properties in response object:
token - In response object at position
token
.It may have value of
YPakh9H3fC77WeQi3KsSpLVh5T0u2jQqV6bR8iMdN27MQaAr1FsMiJa3Dpwo17xI
.
Step 2 - Get API tokens
Get all API tokens existing for a current account.
Endpoint
GET /api/key
Request
GET /api/key?token=YPakh9H3fC77WeQi3KsSpLVh5T0u2jQqV6bR8iMdN27MQaAr1FsMiJa3Dpwo17xI
Response
Note following properties in response object:
apiToken - In response object at position
results[0].id
.It may have value of
kjIXWsazIIg61nHDrobfMRkegCA3r4CbNVaukbJmLORiUZ5j4jIgfom9XrRSCNDp
.
Returned array contains all existing API tokens for current account.
Step 3 - Delete API token
Deletes given API token.
Endpoint
DELETE /api/key/:token
Request
DELETE /api/key/kjIXWsazIIg61nHDrobfMRkegCA3r4CbNVaukbJmLORiUZ5j4jIgfom9XrRSCNDp
Step 4 - Sign out (Optional)
Sign user out.
Endpoint
GET /logout
Request
GET /logout?token=YPakh9H3fC77WeQi3KsSpLVh5T0u2jQqV6bR8iMdN27MQaAr1FsMiJa3Dpwo17xI
The API token is now deleted and can't be used anymore.