Scale AI · Schema

SpansMetricsRequest

Data EngineLabelingRLHFGenAI PlatformDonovanDefense AILiDARSensor FusionREST API

Properties

Name Type Description
parents_only boolean Only fetch spans that are the top-level (ie. have no parent_id)
span_ids array Filter by span IDs
trace_ids array Filter by trace IDs. The combined count of trace_ids, span_ids, excluded_span_ids, excluded_trace_ids, and parent_ids may not exceed 10000. A request over that returns 422.
excluded_span_ids array List of span IDs to exclude from results
excluded_trace_ids array List of trace IDs to exclude from results
group_id string Filter by group ID
parent_ids array Filter to the direct children of any of these parent span IDs
names array Filter by trace/span name
statuses array Filter on span status
types array
search_texts array Case-insensitive substring search across span name, input, output, and metadata (no tokenization or stemming). Multiple terms are ANDed, and UUID-shaped terms match trace IDs instead. Substring means
extra_metadata object Filter on custom metadata key-value pairs
application_variant_ids array Filter by application variant IDs
assessment_types array Filter to spans that have at least one assessment of these types
acp_types array Filter by ACP types
agentex_agent_names array Filter by Agentex agent names
agentex_agent_ids array Filter by Agentex agent IDs
min_duration_ms integer Minimum span duration in milliseconds (inclusive). An in-flight span with no end time has no known duration and is treated as unbounded, so it matches every minimum.
max_duration_ms integer Maximum span duration in milliseconds (inclusive). An in-flight span with no end time has no known duration and is treated as unbounded, so it never falls within a maximum and is excluded.
bucket_minutes integer Size of each time bucket in minutes
metrics array Metric groups to compute. Omit or pass an empty list to compute all groups.
View JSON Schema on GitHub

JSON Schema

scale-ai-spans-metrics-request-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scale-ai/json-schema/scale-ai-spans-metrics-request-schema.json",
  "title": "SpansMetricsRequest",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scale-ai-sgp-v5-openapi.yml#/components/schemas/SpansMetricsRequest",
  "properties": {
    "parents_only": {
      "title": "Parents Only",
      "description": "Only fetch spans that are the top-level (ie. have no parent_id)",
      "type": "boolean"
    },
    "span_ids": {
      "title": "Span Ids",
      "description": "Filter by span IDs",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "trace_ids": {
      "title": "Trace Ids",
      "description": "Filter by trace IDs. The combined count of trace_ids, span_ids, excluded_span_ids, excluded_trace_ids, and parent_ids may not exceed 10000. A request over that returns 422.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "excluded_span_ids": {
      "title": "Excluded Span Ids",
      "description": "List of span IDs to exclude from results",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "excluded_trace_ids": {
      "title": "Excluded Trace Ids",
      "description": "List of trace IDs to exclude from results",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "group_id": {
      "title": "Group Id",
      "description": "Filter by group ID",
      "type": "string"
    },
    "parent_ids": {
      "title": "Parent Ids",
      "description": "Filter to the direct children of any of these parent span IDs",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "names": {
      "title": "Names",
      "description": "Filter by trace/span name",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "statuses": {
      "title": "Statuses",
      "description": "Filter on span status",
      "items": {
        "$ref": "#/$defs/ApplicationOperationStatus"
      },
      "type": "array"
    },
    "types": {
      "title": "Types",
      "items": {
        "$ref": "#/$defs/ApplicationOperationType"
      },
      "type": "array"
    },
    "search_texts": {
      "title": "Search Texts",
      "description": "Case-insensitive substring search across span name, input, output, and metadata (no tokenization or stemming). Multiple terms are ANDed, and UUID-shaped terms match trace IDs instead. Substring means mid-word fragments match, while an inflected form such as a plural matches only where it appears literally. A span must match every non-UUID term, and each term may match any of the searched fields. UUID matches are ORed onto the text match. Each term must be at least 2 characters. For exact trace ID lookup, use the `trace_ids` filter. Accounts still served by the legacy trace store match differently until migrated: terms match as stemmed whole words rather than substrings, only input and output are searched, the 2-character minimum is not enforced, and characters like `:`, `|`, or `!` inside a term may be interpreted as query operators or cause an error.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "extra_metadata": {
      "title": "Extra Metadata",
      "description": "Filter on custom metadata key-value pairs",
      "additionalProperties": true,
      "type": "object"
    },
    "application_variant_ids": {
      "title": "Application Variant Ids",
      "description": "Filter by application variant IDs",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "assessment_types": {
      "title": "Assessment Types",
      "description": "Filter to spans that have at least one assessment of these types",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "acp_types": {
      "title": "Acp Types",
      "description": "Filter by ACP types",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "agentex_agent_names": {
      "title": "Agentex Agent Names",
      "description": "Filter by Agentex agent names",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "agentex_agent_ids": {
      "title": "Agentex Agent Ids",
      "description": "Filter by Agentex agent IDs",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "min_duration_ms": {
      "title": "Min Duration Ms",
      "description": "Minimum span duration in milliseconds (inclusive). An in-flight span with no end time has no known duration and is treated as unbounded, so it matches every minimum.",
      "type": "integer"
    },
    "max_duration_ms": {
      "title": "Max Duration Ms",
      "description": "Maximum span duration in milliseconds (inclusive). An in-flight span with no end time has no known duration and is treated as unbounded, so it never falls within a maximum and is excluded.",
      "type": "integer"
    },
    "bucket_minutes": {
      "type": "integer",
      "title": "Bucket Minutes",
      "description": "Size of each time bucket in minutes",
      "default": 30
    },
    "metrics": {
      "items": {
        "$ref": "#/$defs/SpanMetric"
      },
      "type": "array",
      "title": "Metrics",
      "description": "Metric groups to compute. Omit or pass an empty list to compute all groups."
    }
  },
  "type": "object",
  "$defs": {
    "ApplicationOperationStatus": {
      "type": "string",
      "enum": [
        "SUCCESS",
        "ERROR",
        "CANCELED"
      ],
      "title": "ApplicationOperationStatus"
    },
    "ApplicationOperationType": {
      "type": "string",
      "enum": [
        "TEXT_INPUT",
        "TEXT_OUTPUT",
        "COMPLETION_INPUT",
        "COMPLETION",
        "KB_RETRIEVAL",
        "KB_INPUT",
        "RERANKING",
        "EXTERNAL_ENDPOINT",
        "PROMPT_ENGINEERING",
        "DOCUMENT_INPUT",
        "MAP_REDUCE",
        "DOCUMENT_SEARCH",
        "DOCUMENT_PROMPT",
        "CUSTOM",
        "CODE_EXECUTION",
        "DATA_MANIPULATION",
        "EVALUATION",
        "FILE_RETRIEVAL",
        "KB_ADD_CHUNK",
        "KB_MANAGEMENT",
        "GUARDRAIL",
        "OUTPUT_GUARDRAIL",
        "TRACER",
        "AGENT_TRACER",
        "AGENT_WORKFLOW",
        "STANDALONE"
      ],
      "title": "ApplicationOperationType"
    },
    "SpanMetric": {
      "type": "string",
      "enum": [
        "count",
        "errors",
        "latency"
      ],
      "title": "SpanMetric",
      "description": "An independently loadable metric group for the traces chart."
    }
  }
}

Work with this as data

Every JSON Schema 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 schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • 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 JSON Schema
curl "https://apis.io/api/v1/json-schemas/scale-ai-spans-metrics-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?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.