IBM · Arazzo Workflow

IBM Cloud IAM Audit API Key Activity and History

Version 1.0.0

Authenticate, inventory an account's API keys, and pull the full history and activity for one.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub API ManagementArtificial IntelligenceBillingCloud ComputingContainersData GovernanceDatabasesDevOpsEnterpriseGenerative AIHybrid CloudInfrastructureMachine-LearningNetworkingObservabilitySecurityServerlessStorageWatsonWatsonxFortune 100ArazzoWorkflows

Provider

ibm

Workflows

audit-api-key-activity
Inventory account API keys and retrieve the history and activity of a single key.
Mints an access token, lists the account's API keys with pagination, and reads one key with its history and activity included to establish last authentication time and change provenance.
3 steps inputs: accountId, apikey, auditApiKeyId, keyType outputs: apiKeys, authenticationCount, history, lastAuthentication
1
authenticate
Exchange the auditor's API key for an IAM access token. The audit runs as whichever identity this key belongs to, so it must hold sufficient account privileges to enumerate keys.
2
inventoryAccountKeys
List every API key in the account, oldest first, so the longest-lived credentials — the usual audit finding — surface at the top of the report.
3
inspectKeyHistory
Pull the target key with its full change history and authentication activity so the reviewer can see the last authentication timestamp, the total authentication count, and every recorded modification to the key.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: IBM Cloud IAM Audit API Key Activity and History
  summary: Authenticate, inventory an account's API keys, and pull the full history and activity for one.
  description: >-
    The recurring credential hygiene sweep. Dormant and forgotten API keys are one
    of the largest standing risks in a cloud account, and this workflow surfaces
    them: it authenticates, inventories every API key in the account sorted by
    creation date, and then pulls one key's complete change history and
    authentication activity so a reviewer can see when it was last actually used
    and by whom it was changed. 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-620.20
  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-620.20
      capability_name: Identity & Access Management
      spec: ibm-tokens-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/ibm-api-keys-api-openapi.yml
  type: openapi
- name: tokensApi
  url: ../openapi/ibm-tokens-api-openapi.yml
  type: openapi
workflows:
- workflowId: audit-api-key-activity
  summary: Inventory account API keys and retrieve the history and activity of a single key.
  description: >-
    Mints an access token, lists the account's API keys with pagination, and reads
    one key with its history and activity included to establish last authentication
    time and change provenance.
  inputs:
    type: object
    required:
    - apikey
    - accountId
    - auditApiKeyId
    properties:
      apikey:
        type: string
        description: The API key used to authenticate the audit itself.
      accountId:
        type: string
        description: The IBM Cloud account ID whose API keys are being audited.
      auditApiKeyId:
        type: string
        description: The unique identifier of the API key to inspect in depth.
      keyType:
        type: string
        description: Restrict the inventory to user keys or service ID keys.
        enum:
        - user
        - serviceid
  steps:
  - stepId: authenticate
    description: >-
      Exchange the auditor's API key for an IAM access token. The audit runs as
      whichever identity this key belongs to, so it must hold sufficient account
      privileges to enumerate keys.
    operationId: createAccessToken
    requestBody:
      contentType: application/x-www-form-urlencoded
      payload:
        grant_type: urn:ibm:params:oauth:grant-type:apikey
        apikey: $inputs.apikey
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      accessToken: $response.body#/access_token
  - stepId: inventoryAccountKeys
    description: >-
      List every API key in the account, oldest first, so the longest-lived
      credentials — the usual audit finding — surface at the top of the report.
    operationId: listApiKeys
    parameters:
    - name: account_id
      in: query
      value: $inputs.accountId
    - name: scope
      in: query
      value: account
    - name: type
      in: query
      value: $inputs.keyType
    - name: sort
      in: query
      value: created_at
    - name: order
      in: query
      value: asc
    - name: pagesize
      in: query
      value: 100
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      apiKeys: $response.body#/apikeys
      nextPageToken: $response.body#/next
      limit: $response.body#/limit
  - stepId: inspectKeyHistory
    description: >-
      Pull the target key with its full change history and authentication activity
      so the reviewer can see the last authentication timestamp, the total
      authentication count, and every recorded modification to the key.
    operationId: getApiKey
    parameters:
    - name: id
      in: path
      value: $inputs.auditApiKeyId
    - name: include_history
      in: query
      value: true
    - name: include_activity
      in: query
      value: true
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      apiKeyId: $response.body#/id
      apiKeyName: $response.body#/name
      iamId: $response.body#/iam_id
      locked: $response.body#/locked
      disabled: $response.body#/disabled
      createdAt: $response.body#/created_at
      createdBy: $response.body#/created_by
      modifiedAt: $response.body#/modified_at
      history: $response.body#/history
      lastAuthentication: $response.body#/activity/last_authn
      authenticationCount: $response.body#/activity/authn_count
  outputs:
    apiKeys: $steps.inventoryAccountKeys.outputs.apiKeys
    lastAuthentication: $steps.inspectKeyHistory.outputs.lastAuthentication
    authenticationCount: $steps.inspectKeyHistory.outputs.authenticationCount
    history: $steps.inspectKeyHistory.outputs.history

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/ibm-api-key-audit-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.