Elastic.io · Capability

elastic.io Platform REST API — Roles

elastic.io Platform REST API — Roles. 5 operations. Lead operation: Elastic.io List roles. Self-contained Naftiko capability covering one Elastic Io business surface.

Run with Naftiko Elastic IoRoles

What You Can Do

GET
Listroles — Elastic.io List roles
/v1/tenants/{tenant-id}/roles
POST
Createrole — Elastic.io Create a role
/v1/tenants/{tenant-id}/roles
GET
Getrole — Elastic.io Get a role
/v1/tenants/{tenant-id}/roles/{role-id}
PATCH
Updaterole — Elastic.io Update a role
/v1/tenants/{tenant-id}/roles/{role-id}
DELETE
Deleterole — Elastic.io Delete a role
/v1/tenants/{tenant-id}/roles/{role-id}

MCP Tools

elastic-io-list-roles

Elastic.io List roles

read-only idempotent
elastic-io-create-role

Elastic.io Create a role

elastic-io-get-role

Elastic.io Get a role

read-only idempotent
elastic-io-update-role

Elastic.io Update a role

idempotent
elastic-io-delete-role

Elastic.io Delete a role

idempotent

Capability Spec

platform-roles.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: elastic.io Platform REST API — Roles
  description: 'elastic.io Platform REST API — Roles. 5 operations. Lead operation: Elastic.io List roles. Self-contained
    Naftiko capability covering one Elastic Io business surface.'
  tags:
  - Elastic Io
  - Roles
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    ELASTIC_IO_API_KEY: ELASTIC_IO_API_KEY
capability:
  consumes:
  - type: http
    namespace: platform-roles
    baseUri: https://api.elastic.io/v2
    description: elastic.io Platform REST API — Roles business capability. Self-contained, no shared references.
    resources:
    - name: tenants-tenant_id-roles
      path: /tenants/{tenant_id}/roles
      operations:
      - name: listroles
        method: GET
        description: Elastic.io List roles
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createrole
        method: POST
        description: Elastic.io Create a role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: tenants-tenant_id-roles-role_id
      path: /tenants/{tenant_id}/roles/{role_id}
      operations:
      - name: getrole
        method: GET
        description: Elastic.io Get a role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: role_id
          in: path
          type: string
          required: true
      - name: updaterole
        method: PATCH
        description: Elastic.io Update a role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: role_id
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deleterole
        method: DELETE
        description: Elastic.io Delete a role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: role_id
          in: path
          type: string
          required: true
    authentication:
      type: bearer
      token: '{{env.ELASTIC_IO_API_KEY}}'
  exposes:
  - type: rest
    namespace: platform-roles-rest
    port: 8080
    description: REST adapter for elastic.io Platform REST API — Roles. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/tenants/{tenant-id}/roles
      name: tenants-tenant-id-roles
      description: REST surface for tenants-tenant_id-roles.
      operations:
      - method: GET
        name: listroles
        description: Elastic.io List roles
        call: platform-roles.listroles
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createrole
        description: Elastic.io Create a role
        call: platform-roles.createrole
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/tenants/{tenant-id}/roles/{role-id}
      name: tenants-tenant-id-roles-role-id
      description: REST surface for tenants-tenant_id-roles-role_id.
      operations:
      - method: GET
        name: getrole
        description: Elastic.io Get a role
        call: platform-roles.getrole
        with:
          role_id: rest.role_id
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updaterole
        description: Elastic.io Update a role
        call: platform-roles.updaterole
        with:
          role_id: rest.role_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleterole
        description: Elastic.io Delete a role
        call: platform-roles.deleterole
        with:
          role_id: rest.role_id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: platform-roles-mcp
    port: 9090
    transport: http
    description: MCP adapter for elastic.io Platform REST API — Roles. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: elastic-io-list-roles
      description: Elastic.io List roles
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: platform-roles.listroles
      outputParameters:
      - type: object
        mapping: $.
    - name: elastic-io-create-role
      description: Elastic.io Create a role
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: platform-roles.createrole
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: elastic-io-get-role
      description: Elastic.io Get a role
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: platform-roles.getrole
      with:
        role_id: tools.role_id
      outputParameters:
      - type: object
        mapping: $.
    - name: elastic-io-update-role
      description: Elastic.io Update a role
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: platform-roles.updaterole
      with:
        role_id: tools.role_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: elastic-io-delete-role
      description: Elastic.io Delete a role
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: platform-roles.deleterole
      with:
        role_id: tools.role_id
      outputParameters:
      - type: object
        mapping: $.