Swetrix · Capability

Swetrix Statistics API — Sessions

Swetrix Statistics API — Sessions. 2 operations. Lead operation: Get Session Details. Self-contained Naftiko capability covering one Swetrix business surface.

Run with Naftiko SwetrixSessions

What You Can Do

GET
Getsession — Get Session Details
/v1/v1/log/session
GET
Listsessions — List Sessions
/v1/v1/log/sessions

MCP Tools

get-session-details

Get Session Details

read-only idempotent
list-sessions

List Sessions

read-only idempotent

Capability Spec

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