IBM · Capability

IBM Cloud IAM API — API Keys

IBM Cloud IAM API — API Keys. 10 operations. Lead operation: List API keys. Self-contained Naftiko capability covering one Ibm business surface.

Run with Naftiko IbmAPI Keys

What You Can Do

GET
Listapikeys — List API keys
/v1/v1/apikeys
POST
Createapikey — Create an API key
/v1/v1/apikeys
GET
Getapikeysdetails — Get API key details by value
/v1/v1/apikeys/details
GET
Getapikey — Get an API key
/v1/v1/apikeys/{id}
PUT
Updateapikey — Update an API key
/v1/v1/apikeys/{id}
DELETE
Deleteapikey — Delete an API key
/v1/v1/apikeys/{id}
POST
Disableapikey — Disable an API key
/v1/v1/apikeys/{id}/disable
DELETE
Enableapikey — Enable an API key
/v1/v1/apikeys/{id}/disable
POST
Lockapikey — Lock an API key
/v1/v1/apikeys/{id}/lock
DELETE
Unlockapikey — Unlock an API key
/v1/v1/apikeys/{id}/lock

MCP Tools

list-api-keys

List API keys

read-only idempotent
create-api-key

Create an API key

get-api-key-details-value

Get API key details by value

read-only idempotent
get-api-key

Get an API key

read-only idempotent
update-api-key

Update an API key

idempotent
delete-api-key

Delete an API key

idempotent
disable-api-key

Disable an API key

enable-api-key

Enable an API key

idempotent
lock-api-key

Lock an API key

unlock-api-key

Unlock an API key

idempotent

Capability Spec

cloud-iam-api-keys.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: IBM Cloud IAM API — API Keys
  description: 'IBM Cloud IAM API — API Keys. 10 operations. Lead operation: List API keys. Self-contained Naftiko capability
    covering one Ibm business surface.'
  tags:
  - Ibm
  - API Keys
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    IBM_API_KEY: IBM_API_KEY
capability:
  consumes:
  - type: http
    namespace: cloud-iam-api-keys
    baseUri: https://iam.cloud.ibm.com
    description: IBM Cloud IAM API — API Keys business capability. Self-contained, no shared references.
    resources:
    - name: v1-apikeys
      path: /v1/apikeys
      operations:
      - name: listapikeys
        method: GET
        description: List API keys
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: account_id
          in: query
          type: string
          description: The account ID of the API keys to query.
        - name: iam_id
          in: query
          type: string
          description: The IAM ID associated with the API keys.
        - name: pagesize
          in: query
          type: integer
          description: Number of results per page.
        - name: pagetoken
          in: query
          type: string
          description: Page token from a previous request for pagination.
        - name: scope
          in: query
          type: string
          description: Scope of the query, either account or iam_id.
        - name: type
          in: query
          type: string
          description: Filter by API key type.
        - name: sort
          in: query
          type: string
          description: Field to sort by.
        - name: order
          in: query
          type: string
          description: Sort order.
      - name: createapikey
        method: POST
        description: Create an API key
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1-apikeys-details
      path: /v1/apikeys/details
      operations:
      - name: getapikeysdetails
        method: GET
        description: Get API key details by value
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: IAM-ApiKey
          in: header
          type: string
          description: The API key value to look up.
        - name: include_history
          in: query
          type: boolean
          description: Include activity history of the API key.
    - name: v1-apikeys-id
      path: /v1/apikeys/{id}
      operations:
      - name: getapikey
        method: GET
        description: Get an API key
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: include_history
          in: query
          type: boolean
          description: Include the history of the API key.
        - name: include_activity
          in: query
          type: boolean
          description: Include the activity of the API key.
      - name: updateapikey
        method: PUT
        description: Update an API key
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deleteapikey
        method: DELETE
        description: Delete an API key
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: v1-apikeys-id-disable
      path: /v1/apikeys/{id}/disable
      operations:
      - name: disableapikey
        method: POST
        description: Disable an API key
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: enableapikey
        method: DELETE
        description: Enable an API key
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: v1-apikeys-id-lock
      path: /v1/apikeys/{id}/lock
      operations:
      - name: lockapikey
        method: POST
        description: Lock an API key
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: unlockapikey
        method: DELETE
        description: Unlock an API key
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.IBM_API_KEY}}'
  exposes:
  - type: rest
    namespace: cloud-iam-api-keys-rest
    port: 8080
    description: REST adapter for IBM Cloud IAM API — API Keys. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/v1/apikeys
      name: v1-apikeys
      description: REST surface for v1-apikeys.
      operations:
      - method: GET
        name: listapikeys
        description: List API keys
        call: cloud-iam-api-keys.listapikeys
        with:
          account_id: rest.account_id
          iam_id: rest.iam_id
          pagesize: rest.pagesize
          pagetoken: rest.pagetoken
          scope: rest.scope
          type: rest.type
          sort: rest.sort
          order: rest.order
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createapikey
        description: Create an API key
        call: cloud-iam-api-keys.createapikey
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/apikeys/details
      name: v1-apikeys-details
      description: REST surface for v1-apikeys-details.
      operations:
      - method: GET
        name: getapikeysdetails
        description: Get API key details by value
        call: cloud-iam-api-keys.getapikeysdetails
        with:
          IAM-ApiKey: rest.IAM-ApiKey
          include_history: rest.include_history
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/apikeys/{id}
      name: v1-apikeys-id
      description: REST surface for v1-apikeys-id.
      operations:
      - method: GET
        name: getapikey
        description: Get an API key
        call: cloud-iam-api-keys.getapikey
        with:
          include_history: rest.include_history
          include_activity: rest.include_activity
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updateapikey
        description: Update an API key
        call: cloud-iam-api-keys.updateapikey
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteapikey
        description: Delete an API key
        call: cloud-iam-api-keys.deleteapikey
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/apikeys/{id}/disable
      name: v1-apikeys-id-disable
      description: REST surface for v1-apikeys-id-disable.
      operations:
      - method: POST
        name: disableapikey
        description: Disable an API key
        call: cloud-iam-api-keys.disableapikey
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: enableapikey
        description: Enable an API key
        call: cloud-iam-api-keys.enableapikey
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/apikeys/{id}/lock
      name: v1-apikeys-id-lock
      description: REST surface for v1-apikeys-id-lock.
      operations:
      - method: POST
        name: lockapikey
        description: Lock an API key
        call: cloud-iam-api-keys.lockapikey
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: unlockapikey
        description: Unlock an API key
        call: cloud-iam-api-keys.unlockapikey
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: cloud-iam-api-keys-mcp
    port: 9090
    transport: http
    description: MCP adapter for IBM Cloud IAM API — API Keys. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: list-api-keys
      description: List API keys
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-iam-api-keys.listapikeys
      with:
        account_id: tools.account_id
        iam_id: tools.iam_id
        pagesize: tools.pagesize
        pagetoken: tools.pagetoken
        scope: tools.scope
        type: tools.type
        sort: tools.sort
        order: tools.order
      outputParameters:
      - type: object
        mapping: $.
    - name: create-api-key
      description: Create an API key
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: cloud-iam-api-keys.createapikey
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-api-key-details-value
      description: Get API key details by value
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-iam-api-keys.getapikeysdetails
      with:
        IAM-ApiKey: tools.IAM-ApiKey
        include_history: tools.include_history
      outputParameters:
      - type: object
        mapping: $.
    - name: get-api-key
      description: Get an API key
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: cloud-iam-api-keys.getapikey
      with:
        include_history: tools.include_history
        include_activity: tools.include_activity
      outputParameters:
      - type: object
        mapping: $.
    - name: update-api-key
      description: Update an API key
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: cloud-iam-api-keys.updateapikey
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-api-key
      description: Delete an API key
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: cloud-iam-api-keys.deleteapikey
      outputParameters:
      - type: object
        mapping: $.
    - name: disable-api-key
      description: Disable an API key
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: cloud-iam-api-keys.disableapikey
      outputParameters:
      - type: object
        mapping: $.
    - name: enable-api-key
      description: Enable an API key
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: cloud-iam-api-keys.enableapikey
      outputParameters:
      - type: object
        mapping: $.
    - name: lock-api-key
      description: Lock an API key
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: cloud-iam-api-keys.lockapikey
      outputParameters:
      - type: object
        mapping: $.
    - name: unlock-api-key
      description: Unlock an API key
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: cloud-iam-api-keys.unlockapikey
      outputParameters:
      - type: object
        mapping: $.