Red Hat 3scale · Capability

Red Hat 3scale Analytics API — Services

Red Hat 3scale Analytics API — Services. 2 operations. Lead operation: Get Top Applications by Usage. Self-contained Naftiko capability covering one Red Hat 3scale business surface.

Run with Naftiko Red Hat 3scaleServices

What You Can Do

GET
Gettopapplications — Get Top Applications by Usage
/v1/services/{service-id}/top-applications-json
GET
Getserviceusage — Get Service Usage
/v1/services/{service-id}/usage-json

MCP Tools

get-top-applications-usage

Get Top Applications by Usage

read-only idempotent
get-service-usage

Get Service Usage

read-only idempotent

Capability Spec

analytics-services.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Red Hat 3scale Analytics API — Services
  description: 'Red Hat 3scale Analytics API — Services. 2 operations. Lead operation: Get Top Applications by Usage. Self-contained
    Naftiko capability covering one Red Hat 3scale business surface.'
  tags:
  - Red Hat 3scale
  - Services
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    RED_HAT_3SCALE_API_KEY: RED_HAT_3SCALE_API_KEY
capability:
  consumes:
  - type: http
    namespace: analytics-services
    baseUri: https://{domain}-admin.3scale.net/stats
    description: Red Hat 3scale Analytics API — Services business capability. Self-contained, no shared references.
    resources:
    - name: services-service_id-top_applications.json
      path: /services/{service_id}/top_applications.json
      operations:
      - name: gettopapplications
        method: GET
        description: Get Top Applications by Usage
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: service_id
          in: path
          type: integer
          description: The ID of the API service
          required: true
        - name: metric_name
          in: query
          type: string
          description: The metric to rank by
          required: true
        - name: period
          in: query
          type: string
          required: true
    - name: services-service_id-usage.json
      path: /services/{service_id}/usage.json
      operations:
      - name: getserviceusage
        method: GET
        description: Get Service Usage
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: service_id
          in: path
          type: integer
          description: The ID of the API service
          required: true
        - name: metric_name
          in: query
          type: string
          description: The name of the metric to retrieve (e.g., hits)
          required: true
        - name: period
          in: query
          type: string
          description: The time period for the statistics
          required: true
        - name: since
          in: query
          type: string
          description: Start date for custom date range (ISO 8601 format)
        - name: until
          in: query
          type: string
          description: End date for custom date range (ISO 8601 format)
        - name: granularity
          in: query
          type: string
          description: Granularity of data points within the period
        - name: skip_change
          in: query
          type: boolean
          description: Skip change data in response
    authentication:
      type: apikey
      key: access_token
      value: '{{env.RED_HAT_3SCALE_API_KEY}}'
      placement: query
  exposes:
  - type: rest
    namespace: analytics-services-rest
    port: 8080
    description: REST adapter for Red Hat 3scale Analytics API — Services. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/services/{service-id}/top-applications-json
      name: services-service-id-top-applications-json
      description: REST surface for services-service_id-top_applications.json.
      operations:
      - method: GET
        name: gettopapplications
        description: Get Top Applications by Usage
        call: analytics-services.gettopapplications
        with:
          service_id: rest.service_id
          metric_name: rest.metric_name
          period: rest.period
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/services/{service-id}/usage-json
      name: services-service-id-usage-json
      description: REST surface for services-service_id-usage.json.
      operations:
      - method: GET
        name: getserviceusage
        description: Get Service Usage
        call: analytics-services.getserviceusage
        with:
          service_id: rest.service_id
          metric_name: rest.metric_name
          period: rest.period
          since: rest.since
          until: rest.until
          granularity: rest.granularity
          skip_change: rest.skip_change
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: analytics-services-mcp
    port: 9090
    transport: http
    description: MCP adapter for Red Hat 3scale Analytics API — Services. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: get-top-applications-usage
      description: Get Top Applications by Usage
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: analytics-services.gettopapplications
      with:
        service_id: tools.service_id
        metric_name: tools.metric_name
        period: tools.period
      outputParameters:
      - type: object
        mapping: $.
    - name: get-service-usage
      description: Get Service Usage
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: analytics-services.getserviceusage
      with:
        service_id: tools.service_id
        metric_name: tools.metric_name
        period: tools.period
        since: tools.since
        until: tools.until
        granularity: tools.granularity
        skip_change: tools.skip_change
      outputParameters:
      - type: object
        mapping: $.