Create new API token
API tokens are tokens with long time validity.
You can create an API token and then use it instead of classic token to access endpoints without need to log in multiple times.
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
pDtBnfhHGWTj73M8EE7n3lCUigSPIdZFvjAgzBxOnCfqUMLT1KOw5QC3jEaWyuGC
.
Step 2 - Create API token
Creates new API token.
Endpoint
POST /api/key
Request
POST /api/key?token=pDtBnfhHGWTj73M8EE7n3lCUigSPIdZFvjAgzBxOnCfqUMLT1KOw5QC3jEaWyuGC
Response
Note following properties in response object:
apiKey - In response object at position
id
.It may have value of
A3LaqS5IRG3PMAp7h1O6FrvMT5srTK6QAzDwJXw9dNxAPML1qWVJPmAMPGkp5Qgq
.
Step 3 - Sign out (Optional)
Sign user out.
Endpoint
GET /logout
Request
GET /logout?token=pDtBnfhHGWTj73M8EE7n3lCUigSPIdZFvjAgzBxOnCfqUMLT1KOw5QC3jEaWyuGC
The API token can be now used instead of a normal token.
This token has the same rights as the user who created it. Standard time validity is 10 years.