Skip to main content
PUT
/
access-tokens
/
tokens
/
{access_token_id}
Update a System Access Token
curl --request PUT \
  --url https://api-dev.narrative.io/access-tokens/tokens/{access_token_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "My Token",
  "permissions": [
    {
      "access": "read",
      "resource": "datasets"
    },
    {
      "access": "write",
      "resource": "datasets"
    },
    {
      "access": "read",
      "resource": "subscriptions"
    },
    {
      "access": "write",
      "resource": "subscriptions"
    }
  ],
  "expires_at": "2023-10-31T11:19:13.400498Z"
}
'
{
  "id": "546c65d6-e589-4d3c-b1fe-7e61711cc418",
  "name": "My Token",
  "permissions": [
    {
      "access": "read",
      "resource": "datasets"
    },
    {
      "access": "write",
      "resource": "datasets"
    },
    {
      "access": "read",
      "resource": "subscriptions"
    },
    {
      "access": "write",
      "resource": "subscriptions"
    }
  ],
  "expires_at": "2023-10-31T11:19:13.400498Z"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

access_token_id
string<uuid>
required

.

Body

application/json
name
string

The name of the token

permissions
object[]

The requested permissions

expires_at

The requested token expiration timestamp

Response

OK

id
string<uuid>
required

The id of the token

name
string
required

The name of the token

permissions
object[]
required

The permissions granted to the token

expires_at
string<date-time>
required

The token expiration timestamp

access_token
string

The access token