Get and delete API key

Circularo REST API example

Gets API key existing for current account and deletes it.

Step 1 - Sign in

Sign user in.

Endpoint

POST - /login

Example

/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 “kzSZTjzZBtcHJJR0MZKF8se9rgO8IxxXiU6OltxdzeamFnqHDsKk0uJ18qv9PibU“.

Step 2 - Get API keys

Get all API keys existing for current account.

Endpoint

GET - /api/key

Example

/api/key?token=kzSZTjzZBtcHJJR0MZKF8se9rgO8IxxXiU6OltxdzeamFnqHDsKk0uJ18qv9PibU

Response

Note following properties in response object:

  • apiKey - In response object at position ‘results[0].id‘. It may have value of “jT4bA6tPVqNvCBoBxDPEeXfm4l3FyezKPKaQBm3G7RVg4255UfW3oQwERrdtoGbU“.

Returned array contains all existing API keys for current account.

Step 3 - Delete API key

Deletes given API key.

Endpoint

DELETE - /api/key/:key

Example

/api/key/jT4bA6tPVqNvCBoBxDPEeXfm4l3FyezKPKaQBm3G7RVg4255UfW3oQwERrdtoGbU

Step 4 - Sign out (Optional)

Sign user out.

Endpoint

GET - /logout

Example

/logout?token=kzSZTjzZBtcHJJR0MZKF8se9rgO8IxxXiU6OltxdzeamFnqHDsKk0uJ18qv9PibU

The API key is now deleted and can’t be used anymore.