Apache Pulsar · Capability

Apache Pulsar Admin REST API — Namespaces

Apache Pulsar Admin REST API — Namespaces. 6 operations. Lead operation: List namespaces within a tenant. Self-contained Naftiko capability covering one Apache Pulsar business surface.

Run with Naftiko Apache PulsarNamespaces

What You Can Do

GET
Gettenantnamespaces — List namespaces within a tenant
/v1/namespaces/{tenant}
GET
Getnamespacepolicies — Get namespace policies
/v1/namespaces/{tenant}/{namespace}
PUT
Createnamespace — Create namespace
/v1/namespaces/{tenant}/{namespace}
DELETE
Deletenamespace — Delete namespace
/v1/namespaces/{tenant}/{namespace}
GET
Getretention — Get retention configuration
/v1/namespaces/{tenant}/{namespace}/retention
POST
Setretention — Set retention configuration
/v1/namespaces/{tenant}/{namespace}/retention

MCP Tools

list-namespaces-within-tenant

List namespaces within a tenant

read-only idempotent
get-namespace-policies

Get namespace policies

read-only idempotent
create-namespace

Create namespace

idempotent
delete-namespace

Delete namespace

idempotent
get-retention-configuration

Get retention configuration

read-only idempotent
set-retention-configuration

Set retention configuration

Capability Spec

pulsar-admin-namespaces.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Apache Pulsar Admin REST API — Namespaces
  description: 'Apache Pulsar Admin REST API — Namespaces. 6 operations. Lead operation: List namespaces within a tenant.
    Self-contained Naftiko capability covering one Apache Pulsar business surface.'
  tags:
  - Apache Pulsar
  - Namespaces
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    APACHE_PULSAR_API_KEY: APACHE_PULSAR_API_KEY
capability:
  consumes:
  - type: http
    namespace: pulsar-admin-namespaces
    baseUri: http://localhost:8080/admin/v2
    description: Apache Pulsar Admin REST API — Namespaces business capability. Self-contained, no shared references.
    resources:
    - name: namespaces-tenant
      path: /namespaces/{tenant}
      operations:
      - name: gettenantnamespaces
        method: GET
        description: List namespaces within a tenant
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: tenant
          in: path
          type: string
          required: true
    - name: namespaces-tenant-namespace
      path: /namespaces/{tenant}/{namespace}
      operations:
      - name: getnamespacepolicies
        method: GET
        description: Get namespace policies
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: tenant
          in: path
          type: string
          required: true
        - name: namespace
          in: path
          type: string
          required: true
      - name: createnamespace
        method: PUT
        description: Create namespace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: tenant
          in: path
          type: string
          required: true
        - name: namespace
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: deletenamespace
        method: DELETE
        description: Delete namespace
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: tenant
          in: path
          type: string
          required: true
        - name: namespace
          in: path
          type: string
          required: true
        - name: force
          in: query
          type: boolean
    - name: namespaces-tenant-namespace-retention
      path: /namespaces/{tenant}/{namespace}/retention
      operations:
      - name: getretention
        method: GET
        description: Get retention configuration
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: tenant
          in: path
          type: string
          required: true
        - name: namespace
          in: path
          type: string
          required: true
      - name: setretention
        method: POST
        description: Set retention configuration
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: tenant
          in: path
          type: string
          required: true
        - name: namespace
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
  exposes:
  - type: rest
    namespace: pulsar-admin-namespaces-rest
    port: 8080
    description: REST adapter for Apache Pulsar Admin REST API — Namespaces. One Spectral-compliant resource per consumed
      operation, prefixed with /v1.
    resources:
    - path: /v1/namespaces/{tenant}
      name: namespaces-tenant
      description: REST surface for namespaces-tenant.
      operations:
      - method: GET
        name: gettenantnamespaces
        description: List namespaces within a tenant
        call: pulsar-admin-namespaces.gettenantnamespaces
        with:
          tenant: rest.tenant
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/namespaces/{tenant}/{namespace}
      name: namespaces-tenant-namespace
      description: REST surface for namespaces-tenant-namespace.
      operations:
      - method: GET
        name: getnamespacepolicies
        description: Get namespace policies
        call: pulsar-admin-namespaces.getnamespacepolicies
        with:
          tenant: rest.tenant
          namespace: rest.namespace
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: createnamespace
        description: Create namespace
        call: pulsar-admin-namespaces.createnamespace
        with:
          tenant: rest.tenant
          namespace: rest.namespace
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletenamespace
        description: Delete namespace
        call: pulsar-admin-namespaces.deletenamespace
        with:
          tenant: rest.tenant
          namespace: rest.namespace
          force: rest.force
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/namespaces/{tenant}/{namespace}/retention
      name: namespaces-tenant-namespace-retention
      description: REST surface for namespaces-tenant-namespace-retention.
      operations:
      - method: GET
        name: getretention
        description: Get retention configuration
        call: pulsar-admin-namespaces.getretention
        with:
          tenant: rest.tenant
          namespace: rest.namespace
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: setretention
        description: Set retention configuration
        call: pulsar-admin-namespaces.setretention
        with:
          tenant: rest.tenant
          namespace: rest.namespace
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: pulsar-admin-namespaces-mcp
    port: 9090
    transport: http
    description: MCP adapter for Apache Pulsar Admin REST API — Namespaces. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: list-namespaces-within-tenant
      description: List namespaces within a tenant
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: pulsar-admin-namespaces.gettenantnamespaces
      with:
        tenant: tools.tenant
      outputParameters:
      - type: object
        mapping: $.
    - name: get-namespace-policies
      description: Get namespace policies
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: pulsar-admin-namespaces.getnamespacepolicies
      with:
        tenant: tools.tenant
        namespace: tools.namespace
      outputParameters:
      - type: object
        mapping: $.
    - name: create-namespace
      description: Create namespace
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: pulsar-admin-namespaces.createnamespace
      with:
        tenant: tools.tenant
        namespace: tools.namespace
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-namespace
      description: Delete namespace
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: pulsar-admin-namespaces.deletenamespace
      with:
        tenant: tools.tenant
        namespace: tools.namespace
        force: tools.force
      outputParameters:
      - type: object
        mapping: $.
    - name: get-retention-configuration
      description: Get retention configuration
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: pulsar-admin-namespaces.getretention
      with:
        tenant: tools.tenant
        namespace: tools.namespace
      outputParameters:
      - type: object
        mapping: $.
    - name: set-retention-configuration
      description: Set retention configuration
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: pulsar-admin-namespaces.setretention
      with:
        tenant: tools.tenant
        namespace: tools.namespace
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.