SPA API Tokens

SPA: Creates a new API Token

Creates a new API token for the authenticated user's client. Token value is auto-generated. Requires ROLE_INTEGRATOR or ROLE_ADMIN.

POST/api/spa/api-tokens

Authorizations

X-AUTH-TOKEN
stringheaderrequired

Value for the X-AUTH-TOKEN header parameter.

Request Body

application/json
required

The new ApiToken resource

{
  "identifier": "default",
  "description": "Any description",
  "active": true,
  "activeFrom": "2024-01-01"
}

Response

201application/json

ApiToken resource created

id
integer

Identifier generated by Output.Rocks.

Example: 12345

identifier
stringrequired

Unique identifier

Example: "default"

description
stringrequired

ApiToken description

Example: "Any description"

token
string

Token, to be used in API requests to Output.Rocks API

Example: "Any description"

createdAt
string<date-time>

UTC date time of entry creation

Example: "2024-08-23T00:00:00+00:00"

updatedAt
string<date-time>

UTC date time of last entry update

Example: "2024-08-23T00:00:00+00:00"

active
boolean

Active flag. Default: true

Available options: truefalse

Example: true

activeFrom
string<date-time>

Date to activate the entry. Default: today

Example: "2024-01-01"