Skip to main content

Authentication API 1.5.0

Authentication users, login and token-based access to the controller API.

Base path: https://{controller_ip}/api/v1. API description version: 1.5.0.

Examples use placeholder values for passwords, tokens, UUIDs, addresses and secrets. Replace them with values from your controller before sending requests.

The POST /login method returns a token. Pass the token in the Authorization: Bearer <token> header for subsequent authorized requests.

Section methods

MethodPath
GET/auth_users
GET/auth_users/{login}
POST/auth_users
POST/login
PUT/auth_users/{login}
DELETE/auth_users/{login}

GET /auth_users

Section: Authentication.

Returns data for the authentication endpoint /auth_users.

Request example

curl -k -X GET "https://{controller_ip}/api/v1/auth_users" \
-H "Authorization: Bearer <token>"

Response command example

curl -k -sS -X GET "https://{controller_ip}/api/v1/auth_users" \
-H "Authorization: Bearer <token>" | jq .

Response example

{
"data": [],
"meta": {
"api_version": "1.5.0",
"path": "/auth_users"
}
}

GET /auth_users/{login}

Section: Authentication.

Returns data for the authentication endpoint /auth_users/{login}.

Request example

curl -k -X GET "https://{controller_ip}/api/v1/auth_users/{login}" \
-H "Authorization: Bearer <token>"

Response command example

curl -k -sS -X GET "https://{controller_ip}/api/v1/auth_users/{login}" \
-H "Authorization: Bearer <token>" | jq .

Response example

{
"data": [],
"meta": {
"api_version": "1.5.0",
"path": "/auth_users/{login}"
}
}

POST /auth_users

Section: Authentication.

Creates a record or starts an operation for the authentication endpoint /auth_users.

Request example

curl -k -X POST "https://{controller_ip}/api/v1/auth_users" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"login": "operator-api",
"password": "<password>",
"role": "admin"
}'

Request body example

{
"login": "operator-api",
"password": "<password>",
"role": "admin"
}

Response command example

curl -k -sS -X POST "https://{controller_ip}/api/v1/auth_users" \
-H "Authorization: Bearer <token>" | jq .

Response example

{
"status": "success",
"data": {
"uuid": "<uuid>"
}
}

POST /login

Section: Authentication.

Creates a record or starts an operation for the authentication endpoint /login.

Request example

curl -k -X POST "https://{controller_ip}/api/v1/login" \
-H "Content-Type: application/json" \
--data-raw '{
"login": "api-user",
"password": "<password>"
}'

Request body example

{
"login": "api-user",
"password": "<password>"
}

Response command example

curl -k -sS -X POST "https://{controller_ip}/api/v1/login" \
-H "Authorization: Bearer <token>" | jq .

Response example

{
"user": {
"login": "api-user",
"role": "admin",
"exp": 600
},
"token": "<token>"
}

PUT /auth_users/{login}

Section: Authentication.

Updates data for the authentication endpoint /auth_users/{login}.

Request example

curl -k -X PUT "https://{controller_ip}/api/v1/auth_users/{login}" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data-raw '{
"login": "operator-api",
"password": "<password>",
"role": "admin"
}'

Request body example

{
"login": "operator-api",
"password": "<password>",
"role": "admin"
}

Response command example

curl -k -sS -X PUT "https://{controller_ip}/api/v1/auth_users/{login}" \
-H "Authorization: Bearer <token>" | jq .

Response example

{
"status": "success",
"data": {
"uuid": "<uuid>"
}
}

DELETE /auth_users/{login}

Section: Authentication.

Deletes data for the authentication endpoint /auth_users/{login}.

Request example

curl -k -X DELETE "https://{controller_ip}/api/v1/auth_users/{login}" \
-H "Authorization: Bearer <token>"

Response command example

curl -k -sS -X DELETE "https://{controller_ip}/api/v1/auth_users/{login}" \
-H "Authorization: Bearer <token>" | jq .

Response example

{
"status": "success",
"deleted": true
}