Elastic · Capability

Elasticsearch REST API — Security

Elasticsearch REST API — Security. 1 operations. Lead operation: Get a security role. Self-contained Naftiko capability covering one Elastic business surface.

Run with Naftiko ElasticSecurity

What You Can Do

GET
Getrole — Get a security role
/v1/security/role/{name}

MCP Tools

get-security-role

Get a security role

read-only idempotent

Capability Spec

elasticsearch-security.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Elasticsearch REST API — Security
  description: 'Elasticsearch REST API — Security. 1 operations. Lead operation: Get a security role. Self-contained Naftiko
    capability covering one Elastic business surface.'
  tags:
  - Elastic
  - Security
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    ELASTIC_API_KEY: ELASTIC_API_KEY
capability:
  consumes:
  - type: http
    namespace: elasticsearch-security
    baseUri: https://{deployment}.es.{region}.cloud.es.io:9243
    description: Elasticsearch REST API — Security business capability. Self-contained, no shared references.
    resources:
    - name: _security-role-name
      path: /_security/role/{name}
      operations:
      - name: getrole
        method: GET
        description: Get a security role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: name
          in: path
          type: string
          required: true
    authentication:
      type: apikey
      key: Authorization
      value: '{{env.ELASTIC_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: elasticsearch-security-rest
    port: 8080
    description: REST adapter for Elasticsearch REST API — Security. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/security/role/{name}
      name: security-role-name
      description: REST surface for _security-role-name.
      operations:
      - method: GET
        name: getrole
        description: Get a security role
        call: elasticsearch-security.getrole
        with:
          name: rest.name
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: elasticsearch-security-mcp
    port: 9090
    transport: http
    description: MCP adapter for Elasticsearch REST API — Security. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: get-security-role
      description: Get a security role
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: elasticsearch-security.getrole
      with:
        name: tools.name
      outputParameters:
      - type: object
        mapping: $.