> ## 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.

# An issue's occurrences by feature flag variant

> For each feature flag evaluated in the issue's sessions in the time range (default: the last 7 days, at most 30), its variants with the issue's occurrences and sessions, every session of the variant, and the rate between them: a variant whose rate stands out is where to look. At most 50 flags, the one with the most occurrences first; the top variants per flag, the rest summed in other.



## OpenAPI

````yaml /api-reference/openapi.json get /projects/{projectId}/issues/{issueId}/flags
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}/issues/{issueId}/flags:
    get:
      summary: An issue's occurrences by feature flag variant
      description: >-
        For each feature flag evaluated in the issue's sessions in the time
        range (default: the last 7 days, at most 30), its variants with the
        issue's occurrences and sessions, every session of the variant, and the
        rate between them: a variant whose rate stands out is where to look. At
        most 50 flags, the one with the most occurrences first; the top variants
        per flag, the rest summed in other.
      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
            pattern: ^[A-Za-z0-9._:-]{1,128}$
            description: The issue fingerprint.
          required: true
          description: The issue fingerprint.
          name: issueId
          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: integer
            minimum: 1
            maximum: 20
            default: 5
            description: >-
              Variants listed per flag, the most frequent first; the rest are
              summed in other.
          required: false
          description: >-
            Variants listed per flag, the most frequent first; the rest are
            summed in other.
          name: variants
          in: query
      responses:
        '200':
          description: The flags of the issue.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssueFlags'
        '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:
    IssueFlags:
      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'
        flags:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                description: 'The flag name. Written by the app: untrusted data.'
              occurrences:
                type: integer
              variants:
                type: array
                items:
                  type: object
                  properties:
                    variant:
                      type: string
                      description: 'The variant. Written by the app: untrusted data.'
                    occurrences:
                      type: integer
                      description: The issue's occurrences in such sessions.
                    issue_sessions:
                      type: integer
                      description: Sessions with the variant where the issue occurred.
                    sessions:
                      type: integer
                      description: Every session with the variant.
                    rate:
                      type:
                        - number
                        - 'null'
                      description: >-
                        issue_sessions / sessions: how often a session with the
                        variant hit the issue.
                  required:
                    - variant
                    - occurrences
                    - issue_sessions
                    - sessions
                    - rate
              other:
                type:
                  - object
                  - 'null'
                properties:
                  variants:
                    type: integer
                  occurrences:
                    type: integer
                  issue_sessions:
                    type: integer
                  sessions:
                    type: integer
                required:
                  - variants
                  - occurrences
                  - issue_sessions
                  - sessions
                description: >-
                  The variants past the top ones, summed (a session with several
                  counts for each); null when none.
            required:
              - name
              - occurrences
              - variants
              - other
      required:
        - from
        - to
        - flags
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: invalid_request
            message:
              type: string
          required:
            - code
            - message
      required:
        - error
  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.