Temporal · Arazzo Workflow

Temporal Rotate an API Key for an Owner

Version 1.0.0

Read the owner of an existing key, mint a replacement key, then revoke the old one.

1 workflow 1 source API 1 provider
View Spec View on GitHub Pro-Code-API-CompositionWorkflowsArazzoWorkflows

Provider

temporal

Workflows

rotate-api-key
Issue a replacement API key for the same owner and revoke the old key.
Chains getApiKey to read the existing key owner, createApiKey to mint a replacement bound to that same owner, and deleteApiKey to revoke the original.
3 steps inputs: bearerToken, keyId, newDisplayName, newExpiryTime outputs: ownerId, revokeStatus
1
readExistingKey
Read the existing API key to capture its owner id and owner type so the replacement can be bound to the same principal.
2
createReplacement
Create the replacement API key for the same owner with the new expiry.
3
revokeOldKey
Delete the original API key now that the replacement has been issued.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: Temporal Rotate an API Key for an Owner
  summary: Read the owner of an existing key, mint a replacement key, then revoke the old one.
  description: >-
    Key rotation keeps Temporal Cloud automation credentials fresh. This workflow
    reads an existing API key to capture its owner, creates a replacement key for
    the same owner with a new expiry, and then deletes the original key. Reading
    the owner before issuing the new key guarantees the replacement is bound to
    the same principal. Every step spells out its request inline so the flow can
    be read and executed without opening the underlying OpenAPI description.
  version: 1.0.0
  x-realizes-capability-ids:
  - BC-4270.40
  x-capability-derivation:
    method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
    min_confidence: 0.7
    sources:
    - capability_id: BC-4270.40
      capability_name: Developer Identity & Credential Management
      spec: temporal-api-keys-api-openapi.yml
      confidence: 0.7
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: apiKeysApi
  url: ../openapi/temporal-api-keys-api-openapi.yml
  type: openapi
workflows:
- workflowId: rotate-api-key
  summary: Issue a replacement API key for the same owner and revoke the old key.
  description: >-
    Chains getApiKey to read the existing key owner, createApiKey to mint a
    replacement bound to that same owner, and deleteApiKey to revoke the original.
  inputs:
    type: object
    required:
    - bearerToken
    - keyId
    - newDisplayName
    - newExpiryTime
    properties:
      bearerToken:
        type: string
        description: API key used as the Bearer token for Authorization.
      keyId:
        type: string
        description: The identifier of the existing API key to rotate out.
      newDisplayName:
        type: string
        description: The display name for the replacement API key.
      newExpiryTime:
        type: string
        description: RFC3339 timestamp at which the replacement key expires.
  steps:
  - stepId: readExistingKey
    description: >-
      Read the existing API key to capture its owner id and owner type so the
      replacement can be bound to the same principal.
    operationId: getApiKey
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.bearerToken"
    - name: keyId
      in: path
      value: $inputs.keyId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      ownerId: $response.body#/spec/ownerId
      ownerType: $response.body#/spec/ownerType
  - stepId: createReplacement
    description: >-
      Create the replacement API key for the same owner with the new expiry.
    operationId: createApiKey
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.bearerToken"
    requestBody:
      contentType: application/json
      payload:
        spec:
          displayName: $inputs.newDisplayName
          ownerId: $steps.readExistingKey.outputs.ownerId
          ownerType: $steps.readExistingKey.outputs.ownerType
          expiryTime: $inputs.newExpiryTime
    successCriteria:
    - condition: $statusCode == 200
    onSuccess:
    - name: revokeOld
      type: goto
      stepId: revokeOldKey
      criteria:
      - condition: $statusCode == 200
  - stepId: revokeOldKey
    description: >-
      Delete the original API key now that the replacement has been issued.
    operationId: deleteApiKey
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.bearerToken"
    - name: keyId
      in: path
      value: $inputs.keyId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      revokeStatus: $statusCode
  outputs:
    ownerId: $steps.readExistingKey.outputs.ownerId
    revokeStatus: $steps.revokeOldKey.outputs.revokeStatus

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/temporal-rotate-api-key-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.