Unleash · Capability

Unleash Admin API — API tokens

Unleash Admin API — API tokens. 5 operations. Lead operation: Get API Tokens. Self-contained Naftiko capability covering one Unleash business surface.

Run with Naftiko UnleashAPI tokens

What You Can Do

GET
Getallapitokens — Get API Tokens
/v1/api/admin/api-tokens
POST
Createapitoken — Create API Token
/v1/api/admin/api-tokens
GET
Getapitokensbyname — Get API Tokens by Name
/v1/api/admin/api-tokens/{name}
PUT
Updateapitoken — Update API Token
/v1/api/admin/api-tokens/{token}
DELETE
Deleteapitoken — Delete API Token
/v1/api/admin/api-tokens/{token}

MCP Tools

get-api-tokens

Get API Tokens

read-only idempotent
create-api-token

Create API Token

get-api-tokens-name

Get API Tokens by Name

read-only idempotent
update-api-token

Update API Token

idempotent
delete-api-token

Delete API Token

idempotent

Capability Spec

admin-api-tokens.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Unleash Admin API — API tokens
  description: 'Unleash Admin API — API tokens. 5 operations. Lead operation: Get API Tokens. Self-contained Naftiko capability
    covering one Unleash business surface.'
  tags:
  - Unleash
  - API tokens
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    UNLEASH_API_KEY: UNLEASH_API_KEY
capability:
  consumes:
  - type: http
    namespace: admin-api-tokens
    baseUri: https://app.unleash-instance.example.com
    description: Unleash Admin API — API tokens business capability. Self-contained, no shared references.
    resources:
    - name: api-admin-api-tokens
      path: /api/admin/api-tokens
      operations:
      - name: getallapitokens
        method: GET
        description: Get API Tokens
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createapitoken
        method: POST
        description: Create API Token
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: api-admin-api-tokens-name
      path: /api/admin/api-tokens/{name}
      operations:
      - name: getapitokensbyname
        method: GET
        description: Get API Tokens by Name
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
    - name: api-admin-api-tokens-token
      path: /api/admin/api-tokens/{token}
      operations:
      - name: updateapitoken
        method: PUT
        description: Update API Token
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: token
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deleteapitoken
        method: DELETE
        description: Delete API Token
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: token
          in: path
          type: string
          required: true
    authentication:
      type: bearer
      token: '{{env.UNLEASH_API_KEY}}'
  exposes:
  - type: rest
    namespace: admin-api-tokens-rest
    port: 8080
    description: REST adapter for Unleash Admin API — API tokens. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/api/admin/api-tokens
      name: api-admin-api-tokens
      description: REST surface for api-admin-api-tokens.
      operations:
      - method: GET
        name: getallapitokens
        description: Get API Tokens
        call: admin-api-tokens.getallapitokens
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createapitoken
        description: Create API Token
        call: admin-api-tokens.createapitoken
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/admin/api-tokens/{name}
      name: api-admin-api-tokens-name
      description: REST surface for api-admin-api-tokens-name.
      operations:
      - method: GET
        name: getapitokensbyname
        description: Get API Tokens by Name
        call: admin-api-tokens.getapitokensbyname
        with:
          name: rest.name
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/admin/api-tokens/{token}
      name: api-admin-api-tokens-token
      description: REST surface for api-admin-api-tokens-token.
      operations:
      - method: PUT
        name: updateapitoken
        description: Update API Token
        call: admin-api-tokens.updateapitoken
        with:
          token: rest.token
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteapitoken
        description: Delete API Token
        call: admin-api-tokens.deleteapitoken
        with:
          token: rest.token
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: admin-api-tokens-mcp
    port: 9090
    transport: http
    description: MCP adapter for Unleash Admin API — API tokens. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: get-api-tokens
      description: Get API Tokens
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: admin-api-tokens.getallapitokens
      outputParameters:
      - type: object
        mapping: $.
    - name: create-api-token
      description: Create API Token
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: admin-api-tokens.createapitoken
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-api-tokens-name
      description: Get API Tokens by Name
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: admin-api-tokens.getapitokensbyname
      with:
        name: tools.name
      outputParameters:
      - type: object
        mapping: $.
    - name: update-api-token
      description: Update API Token
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: admin-api-tokens.updateapitoken
      with:
        token: tools.token
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-api-token
      description: Delete API Token
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: admin-api-tokens.deleteapitoken
      with:
        token: tools.token
      outputParameters:
      - type: object
        mapping: $.