Measure Sessions API

Session listing, session plots and session replays.

GitHub OpenAPI

Operations 3

GET /apps/{id}/sessions Fetch an app's sessions #
GET /apps/{id}/sessions/plots/instances Fetch an app's sessions instances plot #
GET /apps/{id}/sessions/{sessionId} Fetch an app's session replay #

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-sessions-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-sessions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Measure Dashboard Sessions 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: Sessions
  description: Session listing, session plots and session replays.
paths:
  /apps/{id}/sessions:
    get:
      operationId: getSessionsOverview
      tags:
      - Sessions
      summary: Fetch an app's sessions
      description: 'Fetch an app''s sessions, optionally narrowed by a filter expression.


        Pass `limit` and `offset` values to paginate results.


        In the response, `meta.next` / `meta.previous` are booleans indicating

        whether more pages exist in the respective direction. `events` is

        always `null` in list responses; it is populated only on the

        single-session detail endpoint. `duration` is the session duration in

        milliseconds.


        Sessions that contain only a session start event, with no other

        activity, are always excluded from results regardless of filters.'
      parameters:
      - name: id
        in: path
        required: true
        description: App's UUID.
        schema:
          type: string
          format: uuid
      - $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:
                        session_id:
                          type: string
                        app_id:
                          type: string
                        attribute:
                          type: object
                          additionalProperties: true
                        events:
                          type:
                          - array
                          - 'null'
                          description: Always `null` in list responses; populated only on the single-session detail endpoint.
                        first_event_time:
                          type: string
                        last_event_time:
                          type: string
                        duration:
                          type: number
                          description: Session duration in milliseconds.
              examples:
                response:
                  value:
                    meta:
                      next: true
                      previous: false
                    results:
                    - session_id: 295842e1-7cd9-4ca3-8545-d6a5b36be9a4
                      app_id: 36e1b948-3a0a-4e71-80f3-625e61d6c832
                      attribute:
                        installation_id: 00000000-0000-0000-0000-000000000000
                        app_version: 0.8.0-SNAPSHOT.debug
                        app_build: '800'
                        device_name: emu64a16k
                        device_model: sdk_gphone16k_arm64
                        device_manufacturer: Google
                        os_name: android
                        os_version: '35'
                      events: null
                      first_event_time: '2024-10-26T05:52:43.104Z'
                      last_event_time: '2024-10-26T05:53:58.596Z'
                      duration: 75492
                    - session_id: 2cc9ffd2-9f9d-40a7-9f55-d802a460507a
                      app_id: 36e1b948-3a0a-4e71-80f3-625e61d6c832
                      attribute:
                        installation_id: 00000000-0000-0000-0000-000000000000
                        app_version: 0.8.0-SNAPSHOT.debug
                        app_build: '800'
                        device_name: emu64a
                        device_model: sdk_gphone64_arm64
                        device_manufacturer: Google
                        os_name: android
                        os_version: '33'
                      events: null
                      first_event_time: '2024-10-02T18:26:58.226Z'
                      last_event_time: '2024-10-02T18:27:09.151Z'
                      duration: 10925
        '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}/sessions/plots/instances:
    get:
      operationId: getSessionsOverviewPlotInstances
      tags:
      - Sessions
      summary: Fetch an app's sessions instances plot
      description: 'Fetch an app''s sessions instances plot, optionally narrowed by a

        filter expression.


        Sessions that contain only a session start event, with no other

        activity, are always excluded from the instance counts regardless of

        filters.'
      parameters:
      - name: id
        in: path
        required: true
        description: App's UUID.
        schema:
          type: string
          format: uuid
      - $ref: '#/components/parameters/From'
      - $ref: '#/components/parameters/To'
      - $ref: '#/components/parameters/Timezone'
      - $ref: '#/components/parameters/PlotTimeGroup'
      - $ref: '#/components/parameters/FilterExpr'
      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
                          instances:
                            type: number
              examples:
                response:
                  value:
                  - id: 1.0 (1)
                    data:
                    - datetime: '2024-10-02'
                      instances: 12
        '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}/sessions/{sessionId}:
    get:
      operationId: getSession
      tags:
      - Sessions
      summary: Fetch an app's session replay
      description: 'Fetch an app''s session replay. The response contains the session''s

        attributes, CPU and memory usage series, and the session''s events

        grouped by thread name under `threads`.'
      parameters:
      - name: id
        in: path
        required: true
        description: App's UUID.
        schema:
          type: string
          format: uuid
      - name: sessionId
        in: path
        required: true
        description: Session's UUID.
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Successful response, no errors.
          content:
            application/json:
              schema:
                type: object
                properties:
                  app_id:
                    type: string
                  session_id:
                    type: string
                  duration:
                    type: number
                    description: Session duration in milliseconds.
                  attribute:
                    type: object
                    additionalProperties: true
                  cpu_usage:
                    type: array
                    items:
                      type: object
                      properties:
                        timestamp:
                          type: string
                        value:
                          type: number
                  memory_usage:
                    type: array
                    items:
                      type: object
                      properties:
                        java_max_heap:
                          type: number
                        java_total_heap:
                          type: number
                        java_free_heap:
                          type: number
                        total_pss:
                          type: number
                        rss:
                          type: number
                        anon_rss:
                          type: number
                          description: Anonymous resident memory in KB (1024 bytes).
                        swap:
                          type: number
                          description: Swapped-out memory in KB (1024 bytes).
                        dynamic_memory:
                          type:
                          - number
                          - 'null'
                          description: Anonymous RSS + swap in KB (1024 bytes), also used by the Memory page. Null when either value is unavailable, including samples from older SDKs.
                        app_importance:
                          type: string
                          description: App importance at collection time; empty for older samples.
                          enum:
                          - ''
                          - foreground
                          - user_service
                          - background
                        native_total_heap:
                          type: number
                        native_free_heap:
                          type: number
                        interval:
                          type: number
                        timestamp:
                          type: string
                  memory_usage_absolute:
                    type:
                    - array
                    - 'null'
                    description: iOS/iPadOS memory readings; used_memory is also used by the Memory page.
                    items:
                      type: object
                      properties:
                        max_memory:
                          type: number
                          description: Total device RAM in KB (1024 bytes).
                        used_memory:
                          type: number
                          description: Physical footprint (or resident-size fallback) in KB (1024 bytes).
                        available_memory:
                          type: integer
                          minimum: 0
                          description: Memory available to the app in KB (1024 bytes). Omitted when unavailable; zero means no memory available for additional allocation.
                        interval:
                          type: number
                          description: Collection interval in milliseconds.
                        timestamp:
                          type: string
                          format: date-time
                  threads:
                    type: object
                    description: Session events grouped by thread name. Each event carries an `event_type` and type-specific fields.
                    additionalProperties:
                      type: array
                      items:
                        type: object
                        additionalProperties: true
              examples:
                response:
                  value:
                    app_id: 2b7ddad4-40a6-42a7-9e21-a90577e08263
                    attribute:
                      installation_id: ee40eb0e-c579-473d-bc10-557049f51cda
                      app_version: '1.0'
                      app_build: '1'
                      app_unique_id: sh.measure.sample
                      measure_sdk_version: 0.1.0
                      device_name: emu64a
                      device_manufacturer: Google
                      device_locale: en-US
                      os_name: android
                      os_version: '33'
                      network_type: wifi
                    cpu_usage:
                    - timestamp: '2024-05-03T23:34:17.591Z'
                      value: 6.999999999999999
                    - timestamp: '2024-05-03T23:34:20.567Z'
                      value: 24
                    duration: 22084
                    memory_usage:
                    - java_max_heap: 196608
                      java_total_heap: 196608
                      java_free_heap: 183734
                      total_pss: 63702
                      rss: 171692
                      native_total_heap: 21872
                      native_free_heap: 1299
                      interval: 2000
                      timestamp: '2024-05-03T23:34:17.607Z'
                    session_id: 58e94ae9-a084-479f-9049-2c5135f6090f
                    threads:
                      OkHttp https://httpbin.org/...:
                      - event_type: http
                        user_defined_attribute:
                          username: alice
                          paid_user: true
                        thread_name: OkHttp https://httpbin.org/...
                        user_triggered: false
                        url: https://httpbin.org/
                        method: get
                        status_code: 200
                        start_time: 5128127
                        end_time: 5129475
                        request_headers:
                          accept-encoding: gzip
                          host: httpbin.org
                        response_headers:
                          content-type: text/html; charset=utf-8
                          server: gunicorn/19.9.0
                        client: okhttp
                        duration: 1348
                        timestamp: '2024-05-03T23:34:19.979Z'
                      Thread-2:
                      - event_type: anr
                        user_defined_attribute:
                          username: alice
                          paid_user: true
                        title: sh.measure.android.anr.AnrError@ExceptionDemoActivity.kt:66
                        thread_name: Thread-2
                        stacktrace: "sh.measure.android.anr.AnrError: Application Not Responding for at least 5000 ms.\n\tat sh.measure.sample.ExceptionDemoActivity.deadLock$lambda$10(ExceptionDemoActivity.kt:66)"
                        foreground: true
                        timestamp: '2024-05-03T23:34:27.578Z'
                        attachments:
                        - id: 63fb0950-faff-4028-bf3d-354559e4e540
                          name: screenshot.png
                          type: screenshot
                          key: 63fb0950-faff-4028-bf3d-354559e4e540.png
                          location: http://localhost:9111/msr-attachments-sandbox/63fb0950-faff-4028-bf3d-354559e4e540.png
                      main:
                      - event_type: log
                        user_defined_attribute:
                          username: alice
                          paid_user: true
                        thread_name: main
                        severity_text: info
                        severity_number: 12
                        body: Loading user profile
                        timestamp: '2024-05-03T23:34:17.75Z'
        '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.
        '404':
          description: No session with this id exists for this app.
        '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.

        '