Sageox Admin API

Administrative analytics, session management, and system operations. Includes active session counts, user analytics, and management endpoints restricted to admin roles.

Operations 6

GET /api/v1/admin/sessions/top Get top sessions by token usage #
GET /api/v1/admin/sessions/{sid} Get session details #
GET /api/v1/admin/paths/top Get top paths by TF-IDF score #
GET /api/v1/admin/agents/top Get top agents by usage #
GET /api/v1/admin/models/top Get top models by usage #
GET /api/v1/admin/versions/top Get top ox-cli versions by usage #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sageox-admin-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

sageox-admin-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SageOx Admin API
  version: 1.0.0
  description: '# API Reference


    ## Overview


    SageOx is a platform that captures team knowledge from discussions, decisions, and work context into a Ledger (per-repo historical record) and Team Context (team-wide shared knowledge).'
  contact:
    name: SageOx Team
  license:
    name: MIT
servers:
- url: http://localhost:3000
  description: Devcontainer
- url: https://test.sageox.ai
  description: Test
- url: https://sageox.ai
  description: Production
security:
- bearerAuth: []
tags:
- name: Admin
  description: Administrative analytics, session management, and system operations. Includes active session counts, user analytics, and management endpoints restricted to admin roles.
paths:
  /api/v1/admin/sessions/top:
    get:
      tags:
      - Admin
      summary: Get top sessions by token usage
      description: 'Returns the top 5 sessions ranked by total token consumption

        in the last 7 days. Sessions are grouped by ox_sid and include

        agent/model metadata.'
      operationId: getTopSessions
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Top sessions retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  sessions:
                    type: array
                    items:
                      type: object
                      properties:
                        ox_sid:
                          type: string
                          description: Session identifier
                          example: oxsid_abc123xyz
                        total_tokens:
                          type: integer
                          format: int64
                          description: Total tokens consumed
                          example: 12450
                        path_count:
                          type: integer
                          format: int64
                          description: Number of path accesses
                          example: 23
                        duration_seconds:
                          type: integer
                          description: Session duration in seconds
                          example: 272
                        agent:
                          type: string
                          nullable: true
                          description: Coding agent platform
                          example: claude-code
                        model:
                          type: string
                          nullable: true
                          description: AI model used
                          example: claude-opus-4-5
                        first_access:
                          type: string
                          format: date-time
                          description: First access timestamp
                        last_access:
                          type: string
                          format: date-time
                          description: Last access timestamp
                      required:
                      - ox_sid
                      - total_tokens
                      - path_count
                      - duration_seconds
                      - first_access
                      - last_access
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
        '403':
          description: Admin access required
          content:
            application/json:
              schema:
                $ref: '#/paths/~1api~1v1~1admin~1sessions~1top/get/responses/401/content/application~1json/schema'
  /api/v1/admin/sessions/{sid}:
    get:
      tags:
      - Admin
      summary: Get session details
      description: 'Returns detailed analytics for a specific session including

        timeline of accesses, path exploration tree, and metadata.'
      operationId: getSessionDetail
      security:
      - bearerAuth: []
      parameters:
      - name: sid
        in: path
        required: true
        schema:
          type: string
        description: Session ID (ox_sid)
        example: oxsid_abc123xyz
      responses:
        '200':
          description: Session details retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  ox_sid:
                    type: string
                  user_id:
                    type: string
                    nullable: true
                  total_tokens:
                    type: integer
                    format: int64
                  path_count:
                    type: integer
                    format: int64
                  unique_paths:
                    type: integer
                    format: int64
                  duration_seconds:
                    type: integer
                  agent:
                    type: string
                    nullable: true
                  model:
                    type: string
                    nullable: true
                  first_access:
                    type: string
                    format: date-time
                  last_access:
                    type: string
                    format: date-time
                  timeline:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                          example: infra/aws/lambda
                        tokens:
                          type: integer
                          example: 450
                        timestamp:
                          type: string
                          format: date-time
                        metadata:
                          type: object
                          additionalProperties: true
                          nullable: true
                  path_tree:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                        segment:
                          type: string
                        tokens:
                          type: integer
                        access_count:
                          type: integer
                        children:
                          type: array
                          items:
                            $ref: '#/paths/~1api~1v1~1admin~1sessions~1%7Bsid%7D/get/responses/200/content/application~1json/schema/properties/path_tree/items'
        '404':
          description: Session not found
          content:
            application/json:
              schema:
                $ref: '#/paths/~1api~1v1~1admin~1sessions~1top/get/responses/401/content/application~1json/schema'
  /api/v1/admin/paths/top:
    get:
      tags:
      - Admin
      summary: Get top paths by TF-IDF score
      description: 'Returns the top 10 guidance paths weighted by TF-IDF score.

        This highlights paths that are unexpectedly popular relative

        to their baseline expectation (deeper paths get a bonus).'
      operationId: getTopPaths
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Top paths retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  paths:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                          example: infra/aws/lambda/edge-functions
                        access_count:
                          type: integer
                          format: int64
                          example: 42
                        unique_sessions:
                          type: integer
                          format: int64
                          example: 15
                        total_tokens:
                          type: integer
                          format: int64
                          example: 8500
                        tfidf_score:
                          type: number
                          format: float
                          description: TF-IDF weighted score
                          example: 12.45
  /api/v1/admin/agents/top:
    get:
      tags:
      - Admin
      summary: Get top agents by usage
      description: 'Returns top coding agents (claude-code, cursor, windsurf, etc.)

        ranked by total token usage in the last 7 days.'
      operationId: getTopAgents
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Top agents retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  agents:
                    type: array
                    items:
                      type: object
                      properties:
                        agent:
                          type: string
                          example: claude-code
                        session_count:
                          type: integer
                          format: int64
                          example: 150
                        request_count:
                          type: integer
                          format: int64
                          example: 3200
                        total_tokens:
                          type: integer
                          format: int64
                          example: 450000
                        avg_tokens_per_request:
                          type: integer
                          example: 140
  /api/v1/admin/models/top:
    get:
      tags:
      - Admin
      summary: Get top models by usage
      description: 'Returns top AI models (claude-opus-4-5, gpt-4o, etc.)

        ranked by total token usage in the last 7 days.'
      operationId: getTopModels
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Top models retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  models:
                    type: array
                    items:
                      type: object
                      properties:
                        model:
                          type: string
                          example: claude-opus-4-5
                        session_count:
                          type: integer
                          format: int64
                          example: 120
                        request_count:
                          type: integer
                          format: int64
                          example: 2800
                        total_tokens:
                          type: integer
                          format: int64
                          example: 380000
                        avg_tokens_per_request:
                          type: integer
                          example: 135
  /api/v1/admin/versions/top:
    get:
      tags:
      - Admin
      summary: Get top ox-cli versions by usage
      description: 'Returns top ox-cli versions ranked by total token usage

        in the last 7 days. Version is parsed from User-Agent header.'
      operationId: getTopCliVersions
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Top CLI versions retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  versions:
                    type: array
                    items:
                      type: object
                      properties:
                        client_version:
                          type: string
                          description: ox-cli version from User-Agent header
                          example: 1.2.3
                        session_count:
                          type: integer
                          format: int64
                          example: 85
                        request_count:
                          type: integer
                          format: int64
                          example: 1900
                        total_tokens:
                          type: integer
                          format: int64
                          example: 280000
                        avg_tokens_per_request:
                          type: integer
                          example: 147
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'JWT token obtained from the auth service (/api/auth/token).

        Token is validated using JWKS from the auth service.

        Required claims: sub (user_id), email, name, tier.

        '