Auth Service icon

Auth Service

Interact with an Auth Service instance — validate tokens, manage zones and tokens

Edit Token

AI-generated

Summary

Updates an existing Auth Service API token via a PATCH request to /tokens/{tokenId}, sending only the fields you fill in (name, grants, active state, expiration) and returning the API's response.

Inputs

  • Token ID (required) — UUID of the token to edit; inserted into the request URL (/tokens/{id}).
  • Name — New token name. Left empty, the field is omitted and the current name is kept.
  • Grants — Zero or more Zone + Level (read, write, delete, all) pairs. If at least one is provided, they are sent as the token's new grants list. If none are provided, grants are not sent and the current ones are kept. Zones are loaded from the service's /tokens/zones endpoint.
  • Active — No Change (default, omitted), Active (sends isActive: true) or Inactive (sends isActive: false).
  • Expires At — New expiration date/time. Left empty, it is omitted and the current expiration is kept.

Output shape

One output item per input item, containing the JSON response returned by the Auth Service PATCH endpoint (presumably the updated token).

Requires the authServiceApi credential, and the token needs tokens:write scope. The exact response fields depend on the service. With Continue On Fail enabled, a failed item yields {error, operation} instead of stopping the workflow. If every optional field is empty, an empty body is sent. Provided grants replace the token's grants rather than being merged, which is implied by the 'new zone permissions' description but not confirmed in the source.

Examples

Example 1: Disable a compromised token

Token ID = the token's UUID; Active = Inactive; leave Name, Grants and Expires At empty.

Example 2: Extend a token's lifetime and rename it

Token ID = UUID; Name = 'CI pipeline'; Expires At = a new future date.

Example 3: Change a token's permissions

Token ID = UUID; Grants: add Zone 'orders' with Level 'write' and Zone 'billing' with Level 'read'.

Links

Discussion