Measure Traces API

Root spans, span listings and traces.

GitHub OpenAPI

Operations 4

GET /apps/{id}/spans/roots/names Fetch an app's root span names #
GET /apps/{id}/spans Fetch a span's list of instances #
GET /apps/{id}/spans/plots/metrics Fetch a span's metrics plot #
GET /apps/{id}/traces/{traceId} Fetch a trace #

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/measure-sh:measure-sh-traces-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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

measure-sh-traces-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Measure Dashboard Traces API
  version: 1.0.0
  description: 'Reference for Measure''s Dashboard REST API. Every endpoint, request body,

    response format and status code.


    Requests are authenticated with the user''s access token in

    `Authorization: Bearer ` format, unless cookies are used to

    send tokens. Set `Content-Type: application/json; charset=utf-8` on each

    request.


    Failed requests have the following response shape:


    ```json

    {

    "error": "Error message",

    "details": "Additional error details, when available"

    }

    ```'
servers:
- url: https://api.measure.sh
  description: Measure cloud
- url: http://localhost:8080
  description: Self-hosted Measure API origin
security:
- bearerAuth: []
tags:
- name: Traces
  description: Root spans, span listings and traces.
paths:
  /apps/{id}/spans/roots/names:
    get:
      operationId: getRootSpanNames
      tags:
      - Traces
      summary: Fetch an app's root span names
      description: Fetch an app's root span names list with optional filters.
      parameters:
      - name: id
        in: path
        required: true
        description: App's UUID.
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Successful response, no errors.
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      type: string
              examples:
                response:
                  value:
                    results:
                    - activity.onCreate
                    - SampleApp.onCreate
        '400':
          description: Request URI is malformed or does not meet one or more acceptance criteria. Check the `error` field for more details.
        '401':
          description: Either the user's access token is invalid or has expired.
        '403':
          description: Requester does not have access to this resource.
        '429':
          description: Rate limit of the requester has crossed maximum limits.
        '500':
          description: Measure server encountered an unfortunate error. Report this to your server administrator.
  /apps/{id}/spans:
    get:
      operationId: getSpansForSpanName
      tags:
      - Traces
      summary: Fetch a span's list of instances
      description: 'Fetch a span''s list of instances, optionally narrowed by a filter

        expression.


        Pass `limit` and `offset` values to paginate results.'
      parameters:
      - name: id
        in: path
        required: true
        description: App's UUID.
        schema:
          type: string
          format: uuid
      - name: span_name
        in: query
        required: true
        description: Name of the span for which instances list is being fetched.
        schema:
          type: string
      - $ref: '#/components/parameters/From'
      - $ref: '#/components/parameters/To'
      - $ref: '#/components/parameters/FilterExpr'
      - name: offset
        in: query
        required: false
        description: Number of items to skip when paginating. Use with `limit` parameter to control amount of items fetched.
        schema:
          type: integer
      - name: limit
        in: query
        required: false
        description: Number of items to return. Used for pagination. Should be used along with `offset`.
        schema:
          type: integer
      responses:
        '200':
          description: Successful response, no errors.
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
                    properties:
                      next:
                        type: boolean
                      previous:
                        type: boolean
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        app_id:
                          type: string
                        span_name:
                          type: string
                        span_id:
                          type: string
                        trace_id:
                          type: string
                        status:
                          type: integer
                          description: 0 (Unset), 1 (Ok) or 2 (Error).
                        start_time:
                          type: string
                        end_time:
                          type: string
                        duration:
                          type: number
                        app_version:
                          type: string
                        app_build:
                          type: string
                        os_name:
                          type: string
                        os_version:
                          type: string
                        device_model:
                          type: string
                        device_manufacturer:
                          type: string
              examples:
                response:
                  value:
                    meta:
                      next: false
                      previous: false
                    results:
                    - app_id: e963e98a-aca9-4bab-bd62-70a74801384e
                      span_name: activity.onCreate
                      span_id: 54b40eb484ade006
                      trace_id: e0826847053bb9e539c9dc4d4da793ad
                      status: 0
                      start_time: '2024-11-18T14:14:55.491Z'
                      end_time: '2024-11-18T14:14:55.573Z'
                      duration: 82
                      app_version: 0.9.0-SNAPSHOT.debug
                      app_build: '900'
                      os_name: android
                      os_version: '35'
                      device_model: sdk_gphone16k_arm64
                      device_manufacturer: Google
                    - app_id: e963e98a-aca9-4bab-bd62-70a74801384e
                      span_name: activity.onCreate
                      span_id: 9f1890db9aedb305
                      trace_id: d71f3d909689859469a7d9b38e605d56
                      status: 0
                      start_time: '2024-11-18T14:14:40.545Z'
                      end_time: '2024-11-18T14:14:40.62Z'
                      duration: 75
                      app_version: 0.9.0-SNAPSHOT.debug
                      app_build: '900'
                      os_name: android
                      os_version: '35'
                      device_model: sdk_gphone16k_arm64
                      device_manufacturer: Google
        '400':
          description: Request URI is malformed or does not meet one or more acceptance criteria. Check the `error` field for more details.
        '401':
          description: Either the user's access token is invalid or has expired.
        '403':
          description: Requester does not have access to this resource.
        '429':
          description: Rate limit of the requester has crossed maximum limits.
        '500':
          description: Measure server encountered an unfortunate error. Report this to your server administrator.
  /apps/{id}/spans/plots/metrics:
    get:
      operationId: getMetricsPlotForSpanName
      tags:
      - Traces
      summary: Fetch a span's metrics plot
      description: 'Fetch a span''s metrics plot, optionally narrowed by a filter

        expression.'
      parameters:
      - name: id
        in: path
        required: true
        description: App's UUID.
        schema:
          type: string
          format: uuid
      - name: span_name
        in: query
        required: true
        description: Name of the span for which metrics plot is being fetched.
        schema:
          type: string
      - $ref: '#/components/parameters/From'
      - $ref: '#/components/parameters/To'
      - $ref: '#/components/parameters/FilterExpr'
      - $ref: '#/components/parameters/Timezone'
      - $ref: '#/components/parameters/PlotTimeGroup'
      responses:
        '200':
          description: Successful response, no errors.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      description: App version identifier for the series.
                    data:
                      type: array
                      items:
                        type: object
                        properties:
                          datetime:
                            type: string
                          p50:
                            type: number
                          p90:
                            type: number
                          p95:
                            type: number
                          p99:
                            type: number
              examples:
                response:
                  value:
                  - id: 0.9.0-SNAPSHOT.debug (900)
                    data:
                    - datetime: '2024-11-18'
                      p50: 82
                      p90: 85
                      p95: 85
                      p99: 85
        '400':
          description: Request URI is malformed or does not meet one or more acceptance criteria. Check the `error` field for more details.
        '401':
          description: Either the user's access token is invalid or has expired.
        '403':
          description: Requester does not have access to this resource.
        '429':
          description: Rate limit of the requester has crossed maximum limits.
        '500':
          description: Measure server encountered an unfortunate error. Report this to your server administrator.
  /apps/{id}/traces/{traceId}:
    get:
      operationId: getTrace
      tags:
      - Traces
      summary: Fetch a trace
      description: Fetch a trace.
      parameters:
      - name: id
        in: path
        required: true
        description: App's UUID.
        schema:
          type: string
          format: uuid
      - name: traceId
        in: path
        required: true
        description: Trace Id.
        schema:
          type: string
      responses:
        '200':
          description: Successful response, no errors.
          content:
            application/json:
              schema:
                type: object
                properties:
                  app_id:
                    type: string
                  trace_id:
                    type: string
                  session_id:
                    type: string
                  has_replay:
                    type: boolean
                    description: Whether the session has events other than `session_start`, indicating that a session replay is available.
                  user_id:
                    type: string
                  start_time:
                    type: string
                  end_time:
                    type: string
                  duration:
                    type: number
                  app_version:
                    type: string
                  os_version:
                    type: string
                  device_manufacturer:
                    type: string
                  device_model:
                    type: string
                  network_type:
                    type: string
                  spans:
                    type: array
                    items:
                      type: object
                      properties:
                        span_name:
                          type: string
                        span_id:
                          type: string
                        parent_id:
                          type: string
                        status:
                          type: integer
                        start_time:
                          type: string
                        end_time:
                          type: string
                        duration:
                          type: number
                        thread_name:
                          type: string
                        device_low_power_mode:
                          type: boolean
                        device_thermal_throttling_enabled:
                          type: boolean
                        checkpoints:
                          type: array
                          items:
                            type: object
                            additionalProperties: true
              examples:
                response:
                  value:
                    app_id: e963e98a-aca9-4bab-bd62-70a74801384e
                    trace_id: e0826847053bb9e539c9dc4d4da793ad
                    session_id: 9b33b3cd-2588-46b4-9b1e-19d7d2c462fa
                    has_replay: true
                    user_id: ''
                    start_time: '2024-11-18T14:14:55.491Z'
                    end_time: '2024-11-18T14:14:55.573Z'
                    duration: 82
                    app_version: 0.9.0-SNAPSHOT.debug(900)
                    os_version: android 35
                    device_manufacturer: Google
                    device_model: sdk_gphone16k_arm64
                    network_type: wifi
                    spans:
                    - span_name: activity.onCreate
                      span_id: 54b40eb484ade006
                      parent_id: ''
                      status: 0
                      start_time: '2024-11-18T14:14:55.491Z'
                      end_time: '2024-11-18T14:14:55.573Z'
                      duration: 82
                      thread_name: main
                      device_low_power_mode: false
                      device_thermal_throttling_enabled: false
                      checkpoints: []
        '400':
          description: Request URI is malformed or does not meet one or more acceptance criteria. Check the `error` field for more details.
        '401':
          description: Either the user's access token is invalid or has expired.
        '403':
          description: Requester does not have access to this resource.
        '429':
          description: Rate limit of the requester has crossed maximum limits.
        '500':
          description: Measure server encountered an unfortunate error. Report this to your server administrator.
components:
  parameters:
    Timezone:
      name: timezone
      in: query
      required: true
      description: 'IANA timezone used to bucket and format datetime values in the response. Example: `Asia/Kolkata`.'
      schema:
        type: string
    FilterExpr:
      name: filter_expr
      in: query
      required: false
      description: 'Conditions joined by `AND` or `OR` and grouped with parentheses,

        each reading `key:operator:values` with the names

        `/apps/{id}/filters/keys` publishes. `AND` binds tighter than `OR`.


        ```

        version_name:in:[1.2.0,1.1.9] AND mapping_type:not_in:jsbundle

        (version_name:contains:SNAPSHOT AND mapping_type:in:proguard) OR patch_id:is_set

        ```


        An operator taking no values ends its condition, as

        `patch_id:is_set` does. Double-quote a value holding a space,

        comma, bracket, colon or quote, with `\"` and `\\` inside.


        At most 4096 bytes, 32 conditions, 4 levels of nesting and 200

        values in one condition.

        '
      schema:
        type: string
    PlotTimeGroup:
      name: plot_time_group
      in: query
      required: false
      description: Time bucket used for plot aggregation. Defaults to `days`.
      schema:
        type: string
        enum:
        - minutes
        - hours
        - days
        - months
    To:
      name: to
      in: query
      required: false
      description: 'ISO 8601 UTC string in milliseconds precision. Example: `2023-11-01T18:30:00.000Z`. Omitting both `from` and `to` returns the last seven days.'
      schema:
        type: string
    From:
      name: from
      in: query
      required: false
      description: 'ISO 8601 UTC string in milliseconds precision. Example: `2023-11-01T18:30:00.000Z`. Omitting both `from` and `to` returns the last seven days.'
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'User access token issued at sign-in. Sent as

        `Authorization: Bearer <access-token>` unless cookies are used to send

        tokens. The `/auth/refresh` and `/auth/signout` endpoints expect the

        session''s refresh token in the same header format instead.

        '