Swetrix · Capability

Swetrix Statistics API — Custom Events

Swetrix Statistics API — Custom Events. 1 operations. Lead operation: Get Custom Events Data. Self-contained Naftiko capability covering one Swetrix business surface.

Run with Naftiko SwetrixCustom Events

What You Can Do

GET
Getcustomevents — Get Custom Events Data
/v1/v1/log/custom-events

MCP Tools

get-custom-events-data

Get Custom Events Data

read-only idempotent

Capability Spec

statistics-custom-events.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Swetrix Statistics API — Custom Events
  description: 'Swetrix Statistics API — Custom Events. 1 operations. Lead operation: Get Custom Events Data. Self-contained
    Naftiko capability covering one Swetrix business surface.'
  tags:
  - Swetrix
  - Custom Events
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SWETRIX_API_KEY: SWETRIX_API_KEY
capability:
  consumes:
  - type: http
    namespace: statistics-custom-events
    baseUri: https://api.swetrix.com
    description: Swetrix Statistics API — Custom Events business capability. Self-contained, no shared references.
    resources:
    - name: v1-log-custom-events
      path: /v1/log/custom-events
      operations:
      - name: getcustomevents
        method: GET
        description: Get Custom Events Data
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: customEvents
          in: query
          type: string
          description: JSON array of custom event names to query
          required: true
    authentication:
      type: apikey
      key: X-Api-Key
      value: '{{env.SWETRIX_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: statistics-custom-events-rest
    port: 8080
    description: REST adapter for Swetrix Statistics API — Custom Events. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/v1/log/custom-events
      name: v1-log-custom-events
      description: REST surface for v1-log-custom-events.
      operations:
      - method: GET
        name: getcustomevents
        description: Get Custom Events Data
        call: statistics-custom-events.getcustomevents
        with:
          customEvents: rest.customEvents
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: statistics-custom-events-mcp
    port: 9090
    transport: http
    description: MCP adapter for Swetrix Statistics API — Custom Events. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: get-custom-events-data
      description: Get Custom Events Data
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: statistics-custom-events.getcustomevents
      with:
        customEvents: tools.customEvents
      outputParameters:
      - type: object
        mapping: $.