Splunk · Capability

Splunk Enterprise REST API — Index

Splunk Enterprise REST API — Index. 5 operations. Lead operation: List Indexes. Self-contained Naftiko capability covering one Splunk business surface.

Run with Naftiko SplunkIndex

What You Can Do

GET
Listindexes — List Indexes
/v1/services/data/indexes
POST
Createindex — Create a New Index
/v1/services/data/indexes
GET
Getindex — Get Index Details
/v1/services/data/indexes/{name}
POST
Updateindex — Update Index Configuration
/v1/services/data/indexes/{name}
DELETE
Deleteindex — Delete an Index
/v1/services/data/indexes/{name}

MCP Tools

list-indexes

List Indexes

read-only idempotent
create-new-index

Create a New Index

get-index-details

Get Index Details

read-only idempotent
update-index-configuration

Update Index Configuration

delete-index

Delete an Index

idempotent

Capability Spec

enterprise-rest-index.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Splunk Enterprise REST API — Index
  description: 'Splunk Enterprise REST API — Index. 5 operations. Lead operation: List Indexes. Self-contained Naftiko capability
    covering one Splunk business surface.'
  tags:
  - Splunk
  - Index
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SPLUNK_API_KEY: SPLUNK_API_KEY
capability:
  consumes:
  - type: http
    namespace: enterprise-rest-index
    baseUri: https://{host}:{port}
    description: Splunk Enterprise REST API — Index business capability. Self-contained, no shared references.
    resources:
    - name: services-data-indexes
      path: /services/data/indexes
      operations:
      - name: listindexes
        method: GET
        description: List Indexes
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: search
          in: query
          type: string
          description: Filter indexes by name or properties
        - name: sort_key
          in: query
          type: string
          description: Field to sort by
        - name: sort_dir
          in: query
          type: string
          description: Sort direction
        - name: datatype
          in: query
          type: string
          description: Filter by data type
      - name: createindex
        method: POST
        description: Create a New Index
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: services-data-indexes-name
      path: /services/data/indexes/{name}
      operations:
      - name: getindex
        method: GET
        description: Get Index Details
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updateindex
        method: POST
        description: Update Index Configuration
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deleteindex
        method: DELETE
        description: Delete an Index
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.SPLUNK_API_KEY}}'
  exposes:
  - type: rest
    namespace: enterprise-rest-index-rest
    port: 8080
    description: REST adapter for Splunk Enterprise REST API — Index. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/services/data/indexes
      name: services-data-indexes
      description: REST surface for services-data-indexes.
      operations:
      - method: GET
        name: listindexes
        description: List Indexes
        call: enterprise-rest-index.listindexes
        with:
          search: rest.search
          sort_key: rest.sort_key
          sort_dir: rest.sort_dir
          datatype: rest.datatype
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createindex
        description: Create a New Index
        call: enterprise-rest-index.createindex
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/services/data/indexes/{name}
      name: services-data-indexes-name
      description: REST surface for services-data-indexes-name.
      operations:
      - method: GET
        name: getindex
        description: Get Index Details
        call: enterprise-rest-index.getindex
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: updateindex
        description: Update Index Configuration
        call: enterprise-rest-index.updateindex
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteindex
        description: Delete an Index
        call: enterprise-rest-index.deleteindex
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: enterprise-rest-index-mcp
    port: 9090
    transport: http
    description: MCP adapter for Splunk Enterprise REST API — Index. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: list-indexes
      description: List Indexes
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: enterprise-rest-index.listindexes
      with:
        search: tools.search
        sort_key: tools.sort_key
        sort_dir: tools.sort_dir
        datatype: tools.datatype
      outputParameters:
      - type: object
        mapping: $.
    - name: create-new-index
      description: Create a New Index
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: enterprise-rest-index.createindex
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-index-details
      description: Get Index Details
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: enterprise-rest-index.getindex
      outputParameters:
      - type: object
        mapping: $.
    - name: update-index-configuration
      description: Update Index Configuration
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: enterprise-rest-index.updateindex
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-index
      description: Delete an Index
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: enterprise-rest-index.deleteindex
      outputParameters:
      - type: object
        mapping: $.