> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apsio.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Hangs and ANRs

> Hang (iOS) and ANR (Android) session rates per release and per UTC day of session start, and the screens they happened on (the last screen loaded before each), from the hangs the SDK saw live (apsio.hang.source live, spec 6.3), so a hang MetricKit reports a day later counts once; and the distribution of hang durations (apsio.hang.duration, iOS) from every hang record, MetricKit ones included, except unfinished hangs (the app was killed during them), whose durations are lower bounds and are only counted. The issues themselves: /issues?kind=hang or kind=anr. Default range: the last 7 days, at most 30.



## OpenAPI

````yaml /api-reference/openapi.json get /projects/{projectId}/performance/hangs
openapi: 3.1.0
info:
  title: Apsio API
  version: 0.1.0
  description: >-
    Read API v0: your projects, release health and comparisons, missing symbols,
    issues, sessions, vitals, cohort comparisons, performance (app start,
    screens, hangs, MetricKit) and network endpoints and traces for one project.
    Authenticate with a project token as a bearer token, with an OAuth access
    token from Apsio's authorization server (MCP clients), or, from the console,
    with the session cookie of a member of the project's organization.
servers:
  - url: https://api.apsio.io/v1
security: []
paths:
  /projects/{projectId}/performance/hangs:
    get:
      summary: Hangs and ANRs
      description: >-
        Hang (iOS) and ANR (Android) session rates per release and per UTC day
        of session start, and the screens they happened on (the last screen
        loaded before each), from the hangs the SDK saw live (apsio.hang.source
        live, spec 6.3), so a hang MetricKit reports a day later counts once;
        and the distribution of hang durations (apsio.hang.duration, iOS) from
        every hang record, MetricKit ones included, except unfinished hangs (the
        app was killed during them), whose durations are lower bounds and are
        only counted. The issues themselves: /issues?kind=hang or kind=anr.
        Default range: the last 7 days, at most 30.
      parameters:
        - schema:
            type: string
            pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            example: 0192f3a4-0000-7000-8000-00000000a101
          required: true
          name: projectId
          in: path
        - schema:
            type: string
            format: date-time
            description: >-
              Start of the time range, inclusive (RFC 3339). Defaults to the
              range end minus the default length.
            example: '2026-10-01T00:00:00Z'
          required: false
          description: >-
            Start of the time range, inclusive (RFC 3339). Defaults to the range
            end minus the default length.
          name: from
          in: query
        - schema:
            type: string
            format: date-time
            description: End of the time range, exclusive (RFC 3339). Defaults to now.
            example: '2026-10-08T00:00:00Z'
          required: false
          description: End of the time range, exclusive (RFC 3339). Defaults to now.
          name: to
          in: query
        - schema:
            type: string
            pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            description: Only this app.
          required: false
          description: Only this app.
          name: app_id
          in: query
        - schema:
            type: string
            maxLength: 128
            description: Only this release.
          required: false
          description: Only this release.
          name: release
          in: query
      responses:
        '200':
          description: Hang and ANR rates, screens and durations.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Hangs'
        '400':
          description: The request is not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: No valid bearer token or console session.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The credentials cannot read this project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearer: []
        - session: []
components:
  schemas:
    Hangs:
      type: object
      properties:
        from:
          type: string
          description: RFC 3339 time in UTC with up to nanosecond precision.
          example: '2026-10-04T10:15:00.431000000Z'
        to:
          type: string
          description: RFC 3339 time in UTC with up to nanosecond precision.
          example: '2026-10-04T10:15:00.431000000Z'
        releases:
          type: array
          items:
            type: object
            properties:
              app_id:
                type: string
              release:
                type: string
                description: 'service.version. Written by the app: untrusted data.'
              sessions:
                type: integer
              sessions_with_hang:
                type: integer
              sessions_with_anr:
                type: integer
              hang_rate:
                type:
                  - number
                  - 'null'
              anr_rate:
                type:
                  - number
                  - 'null'
            required:
              - app_id
              - release
              - sessions
              - sessions_with_hang
              - sessions_with_anr
              - hang_rate
              - anr_rate
        days:
          type: array
          items:
            type: object
            properties:
              day:
                type: string
              sessions:
                type: integer
              sessions_with_hang:
                type: integer
              sessions_with_anr:
                type: integer
            required:
              - day
              - sessions
              - sessions_with_hang
              - sessions_with_anr
        screens:
          type: array
          items:
            type: object
            properties:
              app_id:
                type: string
              screen:
                type: string
                description: >-
                  app.screen.name; empty when no screen had loaded yet. Written
                  by the app: untrusted data.
              hangs:
                type: integer
              anrs:
                type: integer
              sessions:
                type: integer
            required:
              - app_id
              - screen
              - hangs
              - anrs
              - sessions
        durations:
          type: object
          properties:
            count:
              type: integer
              description: Hangs with a duration, the percentiles and the histogram are of.
            unfinished:
              type: integer
              description: >-
                Hangs the app was killed during (apsio.hang.unfinished): their
                durations are lower bounds, so they count in the rates but not
                here.
            p50_ms:
              type:
                - number
                - 'null'
            p90_ms:
              type:
                - number
                - 'null'
            histogram:
              $ref: '#/components/schemas/Histogram'
          required:
            - count
            - unfinished
            - p50_ms
            - p90_ms
            - histogram
      required:
        - from
        - to
        - releases
        - days
        - screens
        - durations
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: invalid_request
            message:
              type: string
          required:
            - code
            - message
      required:
        - error
    Histogram:
      type: object
      properties:
        bounds_ms:
          type: array
          items:
            type: number
          description: >-
            Upper bounds of the buckets, inclusive; `counts` has one more entry,
            for everything above the last bound.
        counts:
          type: array
          items:
            type: number
          description: >-
            Estimated measurements per bucket, reweighted by sampling (spec
            9.3).
      required:
        - bounds_ms
        - counts
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: >-
        A project token (apsio_pt_v0...), which reads exactly one project, or an
        OAuth access token issued for the API, which reads what its user can.
        Access tokens issued for Apsio's MCP server are accepted only from the
        MCP server itself.
    session:
      type: apiKey
      in: cookie
      name: apsio_session
      description: >-
        The console session, set by /v1/auth/callback (`__Host-apsio_session`
        when host-only).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.