Agenta Legacy API

Stable legacy endpoints retained for existing integrations — not deprecated, but new integrations should prefer the canonical surface.

Operations 1

POST /tracing/spans/analytics Fetch Legacy Analytics #

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/agenta:agenta-legacy-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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

agenta-legacy-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Agenta Legacy API
  description: Agenta API
  contact:
    name: Agenta
    url: https://agenta.ai/
    email: team@agenta.ai
  version: 0.1.0
servers:
- url: /api
- url: https://eu.cloud.agenta.ai/api
security:
- APIKeyHeader: []
tags:
- name: Legacy
  description: Stable legacy endpoints retained for existing integrations — not deprecated, but new integrations should prefer the canonical surface.
paths:
  /tracing/spans/analytics:
    post:
      tags:
      - Legacy
      summary: Fetch Legacy Analytics
      description: 'Aggregate span metrics using the fixed legacy schema.


        Returns time-bucketed aggregates with a fixed set of fields

        (`count`, `duration`, `costs`, `tokens`) split into `total` and

        `errors`. The shape predates `specs`-driven analytics and is kept

        for the existing observability dashboards that consume it.


        New integrations should prefer `POST /tracing/analytics/query`,

        which accepts `specs` and can summarize arbitrary span attributes,

        not just the four fixed metrics.'
      operationId: fetch_legacy_analytics
      parameters:
      - name: focus
        in: query
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/Focus'
          - type: 'null'
          title: Focus
      - name: format
        in: query
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/Format'
          - type: 'null'
          title: Format
      - name: oldest
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: integer
          - type: 'null'
          title: Oldest
      - name: newest
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: integer
          - type: 'null'
          title: Newest
      - name: limit
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Limit
      - name: interval
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Interval
      - name: rate
        in: query
        required: false
        schema:
          anyOf:
          - type: number
          - type: 'null'
          title: Rate
      - name: filter
        in: query
        required: false
        schema:
          title: Filter
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OldAnalyticsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    Analytics:
      properties:
        count:
          anyOf:
          - type: integer
          - type: 'null'
          title: Count
          default: 0
        duration:
          anyOf:
          - type: number
          - type: 'null'
          title: Duration
          default: 0.0
        costs:
          anyOf:
          - type: number
          - type: 'null'
          title: Costs
          default: 0.0
        tokens:
          anyOf:
          - type: number
          - type: 'null'
          title: Tokens
          default: 0.0
      type: object
      title: Analytics
    Format:
      type: string
      enum:
      - agenta
      - opentelemetry
      title: Format
    OldAnalyticsResponse:
      properties:
        count:
          type: integer
          title: Count
          description: Number of time buckets returned.
          default: 0
        buckets:
          items:
            $ref: '#/components/schemas/Bucket'
          type: array
          title: Buckets
          description: Time-bucketed aggregates with fixed fields (`total`, `errors`) holding `count`, `duration`, `costs`, and `tokens`, ordered oldest to newest.
          default: []
      type: object
      title: OldAnalyticsResponse
      description: Legacy analytics response with a fixed metric schema.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Bucket:
      properties:
        timestamp:
          type: string
          format: date-time
          title: Timestamp
        interval:
          type: integer
          title: Interval
        total:
          $ref: '#/components/schemas/Analytics'
        errors:
          $ref: '#/components/schemas/Analytics'
      type: object
      required:
      - timestamp
      - interval
      - total
      - errors
      title: Bucket
    Focus:
      type: string
      enum:
      - trace
      - span
      title: Focus
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      name: Authorization
      in: header