Tokens and Permissions

Update token

Updates token properties. Beware that all current bucket permissions are replaced. If you want to add new bucket permissions, don't forget to specify the previous permissions.

put/v2/storage/tokens/{id}

Request

Path parameters

idinteger required

Token ID.

Request body

descriptionstring nullable

Token description.

bucketPermissionsobject

Permissions per bucket, keyed by bucket ID. Available permissions: read, write. All current bucket permissions are replaced.

componentAccessstring[] nullable

Grants access for component configurations. Allowed values are valid component IDs.

canReadAllFileUploadsboolean nullable

Allows access to all file uploads. When set to false, only files uploaded by the current token are accessible.

canPurgeTrashboolean nullable

Allows permanently removing deleted configurations.

Example request

{
  "description": "New Description",
  "bucketPermissions": {
    "in.c-main": "write"
  },
  "componentAccess": [
    "keboola.ex-db-mysql"
  ]
}

Response

Updated token. The decrypted token value is never returned.

idstring required

Unique identifier of the token.

createdstring nullable required

Token creation timestamp, ISO 8601 with a +hhmm offset.

refreshedstring nullable required

Token last refresh timestamp, ISO 8601 with a +hhmm offset.

descriptionstring required

User-provided description of the token.

uristring required

URI of the token detail.

isMasterTokenboolean required

Whether this is a master (admin) token.

canManageBucketsboolean required

Token permission to manage all buckets.

canManageTokensboolean required

Token permission to manage tokens.

canReadAllFileUploadsboolean required

Token permission to read all file uploads.

canPurgeTrashboolean required

Token permission to permanently remove deleted configurations.

canManageProtectedDefaultBranchboolean required

Token permission to manage the protected default branch.

canCreateJobsboolean required

Token permission to create jobs.

canReadAllProjectEventsboolean required

Token permission to read all project events.

canManageDevBranchesboolean required

Token permission to manage development branches.

expiresstring nullable required

Expiration timestamp of the token, ISO 8601 with a +hhmm offset; null when the token never expires.

isExpiredboolean required

Whether the token is expired.

isDisabledboolean required

Whether the token is disabled.

dailyCapacityinteger required

Daily capacity of the token.

tokenstring

Decrypted token value. Present only in the create response; omitted on update.

componentAccessstring[]

Component IDs the token may access. Present only when at least one component is granted.

bucketPermissionsobject required

Bucket permissions keyed by bucket ID (read, write or manage).

Example response

{
  "id": "484",
  "created": "2017-02-13T12:01:05+0100",
  "refreshed": "2017-02-13T12:01:05+0100",
  "description": "my-new-token",
  "uri": "https://connection.keboola.com/v2/storage/tokens/484",
  "dailyCapacity": 5,
  "token": "75-12d4bfa4995694a1c956e7bb1eea0df5cc53acdb",
  "creatorToken": {
    "id": 1,
    "description": "dev@keboola.com"
  },
  "componentAccess": [
    "keboola.ex-db-mysql"
  ],
  "bucketPermissions": {
    "in.c-main": "read"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.