Skip to content

Create an API token (admin)​

POST
/api/v1/tokens

Only this response contains the token. Keep it.

Authorizations​

session
Type
API Key (cookie: pvmon_session)
or
token

API token pvm_<id>_<secret>.

Type
HTTP (bearer)

Request Body​

application/json
JSON
{
  
"name": "string",
  
"expires_days": 0
}

Responses​

Created.

application/json
JSON
{
  
"id": "string",
  
"name": "string",
  
"scope": "string",
  
"created_at": "2024-01-01T00:00:00Z",
  
"expires_at": "2024-01-01T00:00:00Z",
  
"last_used": "2024-01-01T00:00:00Z",
  
"token": "pvm_<id>_<secret>"
}

Samples​

Version 0.4.0-66c93c2. MIT license.