Skip to main content
POST
/
workspace
/
services
/
{service}
/
tokens
/
access
Create a Service Access Token
curl --request POST \
  --url https://wks-a1b2c3d4.provisionr.io/api/v1/workspace/services/{service}/tokens/access \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "expires_at": "2023-11-07T05:31:56Z"
}
'
{
  "id": "<string>",
  "name": "cli_activation",
  "description": "<string>",
  "abilities": [
    "<string>"
  ],
  "timestamp": {
    "created_at": "<string>",
    "last_used_at": "<string>",
    "expires_at": "<string>",
    "expires_at_mins": 123,
    "requested_at": "<string>"
  },
  "_embedded": [
    "<string>"
  ],
  "_links": {
    "self": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.provisionr.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

service
string
required

Workspace Service ID

Body

application/json

CreateWorkspaceServiceAccessTokenRequestData

name
string
required

The display name of the access token

Maximum string length: 55
Example:

"Helpdesk Ticket Automation"

description
string
required

A detailed description of the access token

Example:

"Production environment token managed by HashiCorp Vault."

expires_at
string<date-time> | null

The expiration date of this access token

Response

WorkspaceTokenDetailedResponseData

id
string
required
Example:

"wstok_01hq8xyzabc123def456ghi789"

name
enum<string>
required
cli_activation
CLI Activation Token
cli_access
CLI Access Token
cli_refresh
CLI Refresh Token
personal_access
Personal Access Token
svc_access
Service Account Access Token
Available options:
cli_activation,
cli_access,
cli_refresh,
personal_access,
svc_access
description
string
required

A internal business logic reference description for the token

Example:

"Token for Vendor X Integration (Prod)"

abilities
string[]
required
timestamp
object
required

The timestamps for the workspace token record

Example:
{
"created_at": "2024-03-15T10:30:00.000000Z",
"last_used_at": "2024-03-16T08:00:00.000000Z",
"expires_at": "2024-04-15T10:30:00.000000Z",
"expires_at_mins": 43200,
"requested_at": "2024-03-16T10:00:00.000000Z"
}
_embedded
string[]
required

API hyperlinks related to the workspace token record

Example:
{
"self": "https://ws-a1b2c3.provisionr.io/api/v1/workspace/tokens/wstok_01hq8xyzabc123def456ghi789"
}