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

# Sessions in a repository

> <Badge color="blue" size="sm" shape="pill">Users</Badge> <Badge color="blue" size="sm" shape="pill">Plugins</Badge>

**Accepted credentials:** User token, Plugin installation token.



Use an own-account bearer token (including supported service accounts) or a Core-issued plugin installation bearer token, subject to the permissions and restrictions below. Plugin assertion JWTs and plugin OAuth user-delegation tokens are not accepted here.

Requires live repository pull permission (contents:read for plugin installations). Other authorized automation principals can also use this operation. Also requires pull on a separate checkpoint-storage repository when configured; denial on that repository returns 404. Separate anonymous exception: with no bearer, X-Anon-Repo can authorize public-repository reads when anonymous signing is configured; a separate checkpoint-storage repository must also be public. This exception is outside the user/plugin credential labels.



## OpenAPI

````yaml /openapi/generated/sessions.json get /repos/{repo_id}/sessions
openapi: 3.1.0
info:
  description: >-
    Unified Entire API gateway. Aggregates the control plane and regional
    repository-operation services behind a single endpoint.
  title: Entire API
  version: 0.1.0
servers:
  - url: https://aws-us-east-2.api.entire.io/api/v1
security:
  - bearerAuth: []
tags:
  - description: Operations under the /search surface.
    name: search
  - description: Operations under the /semantic-search surface.
    name: semantic-search
  - description: Operations served by the brainstore service.
    name: brainstore
  - description: >-
      The authenticated caller's own cross-repo activity, commits, checkpoints,
      sessions, and recap.
    name: me
    x-group: Your activity
  - description: >-
      Residency-aware previews of the caller's surface, served under
      /experimental. Shapes may change without notice.
    name: experimental
  - description: >-
      Per-user settings: pinned and recent repos, diff view, and saved filter
      tabs.
    name: preferences
  - description: >-
      Repository discovery list, metadata, and headline rollups (summary,
      activity, contributors, agents).
    name: repos
  - description: >-
      Git browsing for a repo: commits, commit detail, branch compare, tree
      listings, raw file bytes, and branches.
    name: code
  - description: >-
      Checkpoint listing, resolution, LLM analysis, transcripts, and per-repo
      checkpoint status.
    name: checkpoints
    x-group: Checkpoints
  - description: >-
      Materialised sessions: listing, detail, transcripts, rename, and the
      public-share toggle.
    name: sessions
    x-group: Sessions
  - description: >-
      Repo dashboard aggregates under /overview: commit and checkpoint stats,
      contributor breakdowns, and session patterns.
    name: overview
  - description: Live ref-change stream for a repo (SSE).
    name: refs
    x-group: Ref events
  - description: >-
      Trails themselves: list, create, read, update, delete, plus per-repo
      counts, claimed branches, and the body-document ensure.
    name: trails
    x-group: Trails
  - description: >-
      What has happened on a trail: the merged timeline, the event stream, and
      who is watching (per trail, plus a repo-wide roll-up).
    name: trail-activity
    x-group: Activity
  - description: >-
      Conversation on a trail: discussions, their messages, and the live
      discussion-event stream.
    name: trail-discussions
    x-group: Discussions
  - description: >-
      Code review on a trail: review state, comments, diffs, reviewed files, and
      review re-runs.
    name: trail-reviews
    x-group: Reviews
  - description: >-
      Runner output on a trail: the latest result per configured runner, monitor
      results, and manual launches.
    name: trail-runs
  - description: >-
      Quality gates: repo gate definitions, gate settings, repo-authored monitor
      definitions, and a trail's gate evaluation.
    name: trail-gates
    x-group: Gates
  - description: >-
      Getting a trail landed: approval decisions, merge readiness, and the merge
      itself.
    name: trail-approvals
    x-group: Approvals
  - description: >-
      Trail attachment blobs: upload intent, completion, retrieval, and
      deletion.
    name: trail-attachments
  - description: Project-scoped Trails, and their owned repository Changes and discussions.
    name: projects
  - description: Agent-provenance ranking for a repo's code scopes.
    name: experts
    x-group: Experts
  - description: >-
      git-meta-compatible repo metadata read and write (git is the source of
      truth).
    name: git-meta
  - description: >-
      A project's versioned agents — what each runs (its own runner or an Entire
      preset), what it is called, the environment it runs in, the repositories
      it reviews and its trigger — and Entire's presets. Saving one runs
      nothing.
    name: agents
  - description: >-
      A project's saved, versioned Environments — where an agent runs: provider
      and sandbox lifetime — reusable across the project's repositories and
      agents. Configuration only: saving one provisions nothing.
    name: environments
  - description: >-
      Runs of a project's agents, each on one Change: starting one, the
      immutable snapshot each captured, status, output and results, retry and
      cancel.
    name: runs
  - description: >-
      Mutating repo configuration: runner, trail, public-sharing, and
      gate-enforcement settings (requires repo manage_settings for every forge).
    name: repo-settings
  - description: The caller's open pull requests across their repositories.
    name: pull-requests
  - description: 'Service-authed only: editor-document sync behind the trail body editor.'
    name: trails-internal
  - description: The runner OIDC issuer's discovery document and JWKS. Machine-consumed.
    name: runner-issuer
  - name: repositories
    x-group: Git
paths:
  /repos/{repo_id}/sessions:
    get:
      tags:
        - sessions
      summary: Sessions in a repository
      description: >-
        <Badge color="blue" size="sm" shape="pill">Users</Badge> <Badge
        color="blue" size="sm" shape="pill">Plugins</Badge>


        **Accepted credentials:** User token, Plugin installation token.




        Use an own-account bearer token (including supported service accounts)
        or a Core-issued plugin installation bearer token, subject to the
        permissions and restrictions below. Plugin assertion JWTs and plugin
        OAuth user-delegation tokens are not accepted here.


        Requires live repository pull permission (contents:read for plugin
        installations). Other authorized automation principals can also use this
        operation. Also requires pull on a separate checkpoint-storage
        repository when configured; denial on that repository returns 404.
        Separate anonymous exception: with no bearer, X-Anon-Repo can authorize
        public-repository reads when anonymous signing is configured; a separate
        checkpoint-storage repository must also be public. This exception is
        outside the user/plugin credential labels.
      operationId: repoSessions
      parameters:
        - in: path
          name: repo_id
          required: true
          schema:
            type: string
        - description: >-
            Set to all to include every historically linked repo session; omit
            for branch/default-branch or base/head reachability
          explode: false
          in: query
          name: scope
          schema:
            description: >-
              Set to all to include every historically linked repo session; omit
              for branch/default-branch or base/head reachability
            enum:
              - all
            type: string
        - description: Branch to filter to; empty = the repo's default branch
          explode: false
          in: query
          name: branch
          schema:
            description: Branch to filter to; empty = the repo's default branch
            type: string
        - description: >-
            Base branch or commit SHA to exclude; must be supplied with head and
            without branch
          explode: false
          in: query
          name: base
          schema:
            description: >-
              Base branch or commit SHA to exclude; must be supplied with head
              and without branch
            type: string
        - description: >-
            Head branch or commit SHA to include; must be supplied with base and
            without branch
          explode: false
          in: query
          name: head
          schema:
            description: >-
              Head branch or commit SHA to include; must be supplied with base
              and without branch
            type: string
        - explode: false
          in: query
          name: cursor
          schema:
            type: string
        - description: Page size, clamped to 1..200
          explode: false
          in: query
          name: limit
          schema:
            default: 50
            description: Page size, clamped to 1..200
            format: int64
            type: integer
        - description: >-
            RFC 3339 lower bound on last_activity_at, inclusive (optional;
            unbounded by default)
          explode: false
          in: query
          name: since
          schema:
            description: >-
              RFC 3339 lower bound on last_activity_at, inclusive (optional;
              unbounded by default)
            type: string
        - description: >-
            RFC 3339 upper bound on last_activity_at, exclusive (optional;
            unbounded by default — in practice capped 100 years out, an
            unreachable bound for any real session)
          explode: false
          in: query
          name: until
          schema:
            description: >-
              RFC 3339 upper bound on last_activity_at, exclusive (optional;
              unbounded by default — in practice capped 100 years out, an
              unreachable bound for any real session)
            type: string
        - description: >-
            Include complete scoped author, agent, and model filter choices on
            the first page; ignored with cursor
          explode: false
          in: query
          name: includeFacets
          schema:
            description: >-
              Include complete scoped author, agent, and model filter choices on
              the first page; ignored with cursor
            type: boolean
        - description: Match any author facet key (repeatable or comma-separated)
          explode: true
          in: query
          name: authorFacet
          schema:
            description: Match any author facet key (repeatable or comma-separated)
            items:
              type: string
            type:
              - array
              - 'null'
        - description: Exclude author facet keys (repeatable or comma-separated)
          explode: true
          in: query
          name: authorFacetNot
          schema:
            description: Exclude author facet keys (repeatable or comma-separated)
            items:
              type: string
            type:
              - array
              - 'null'
        - description: Match any agent (repeatable or comma-separated)
          explode: true
          in: query
          name: agent
          schema:
            description: Match any agent (repeatable or comma-separated)
            items:
              type: string
            type:
              - array
              - 'null'
        - description: Exclude agents (repeatable or comma-separated)
          explode: true
          in: query
          name: agentNot
          schema:
            description: Exclude agents (repeatable or comma-separated)
            items:
              type: string
            type:
              - array
              - 'null'
        - description: Match any model (repeatable or comma-separated)
          explode: true
          in: query
          name: model
          schema:
            description: Match any model (repeatable or comma-separated)
            items:
              type: string
            type:
              - array
              - 'null'
        - description: Exclude models (repeatable or comma-separated)
          explode: true
          in: query
          name: modelNot
          schema:
            description: Exclude models (repeatable or comma-separated)
            items:
              type: string
            type:
              - array
              - 'null'
        - description: Match Review sessions when true, or non-Review sessions when false
          explode: false
          in: query
          name: isReview
          schema:
            description: Match Review sessions when true, or non-Review sessions when false
            enum:
              - 'true'
              - 'false'
            type: string
        - description: >-
            Case-insensitive literal substring over effective name, prompt, and
            agent
          explode: false
          in: query
          name: search
          schema:
            description: >-
              Case-insensitive literal substring over effective name, prompt,
              and agent
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RepoSessionsOutputBody'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Unprocessable Entity
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Bad Gateway
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
          description: Service Unavailable
      security:
        - oauth2: []
        - oidc: []
        - bearerAuth: []
components:
  schemas:
    RepoSessionsOutputBody:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - /api/v1/schemas/RepoSessionsOutputBody.json
          format: uri
          readOnly: true
          type: string
        app_has_access:
          type: boolean
        facets:
          $ref: '#/components/schemas/SessionListFacets'
        history_complete:
          type: boolean
        history_status:
          type: string
        next_cursor:
          type:
            - string
            - 'null'
        repo_full_name:
          type: string
        session_branch_exists:
          type: boolean
        sessions:
          items:
            $ref: '#/components/schemas/SessionListItem'
          type:
            - array
            - 'null'
        source:
          type: string
      required:
        - sessions
        - next_cursor
        - repo_full_name
        - app_has_access
        - session_branch_exists
        - history_status
        - history_complete
        - source
      type: object
    ApiError:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - /api/v1/schemas/ApiError.json
          format: uri
          readOnly: true
          type: string
        code:
          type: string
        detail:
          type: string
        error:
          type: string
      required:
        - error
      type: object
    SessionListFacets:
      additionalProperties: false
      properties:
        agents:
          items:
            type: string
          type:
            - array
            - 'null'
        authors:
          items:
            $ref: '#/components/schemas/SessionFacetOption'
          type:
            - array
            - 'null'
        models:
          items:
            type: string
          type:
            - array
            - 'null'
      required:
        - authors
        - agents
        - models
      type: object
    SessionListItem:
      additionalProperties: false
      properties:
        $schema:
          description: A URL to the JSON Schema for this object.
          examples:
            - /api/v1/schemas/SessionListItem.json
          format: uri
          readOnly: true
          type: string
        agent:
          type:
            - string
            - 'null'
        attributionAgentLines:
          format: int64
          type:
            - integer
            - 'null'
        attributionCalculatedAt:
          type:
            - string
            - 'null'
        attributionHumanAdded:
          format: int64
          type:
            - integer
            - 'null'
        attributionHumanModified:
          format: int64
          type:
            - integer
            - 'null'
        attributionHumanRemoved:
          format: int64
          type:
            - integer
            - 'null'
        attributionTotalCommitted:
          format: int64
          type:
            - integer
            - 'null'
        cacheCreationTokens:
          format: int64
          type:
            - integer
            - 'null'
        cacheReadTokens:
          format: int64
          type:
            - integer
            - 'null'
        checkpointCount:
          format: int64
          type: integer
        customName:
          type:
            - string
            - 'null'
        displayName:
          type: string
        firstCommitAuthorAvatarUrl:
          type: string
        firstCommitAuthorUsername:
          type:
            - string
            - 'null'
        inputTokens:
          format: int64
          type:
            - integer
            - 'null'
        isPublic:
          type: boolean
        kind:
          type:
            - string
            - 'null'
        lastActivityAt:
          type: string
        model:
          type:
            - string
            - 'null'
        outputTokens:
          format: int64
          type:
            - integer
            - 'null'
        prompt:
          type:
            - string
            - 'null'
        sessionId:
          type: string
        startedAt:
          type: string
        stepCount:
          format: int64
          type: integer
        subagentCount:
          format: int64
          type: integer
      required:
        - sessionId
        - displayName
        - customName
        - isPublic
        - agent
        - model
        - kind
        - prompt
        - firstCommitAuthorUsername
        - startedAt
        - lastActivityAt
        - checkpointCount
        - subagentCount
        - stepCount
        - inputTokens
        - outputTokens
        - cacheCreationTokens
        - cacheReadTokens
        - attributionAgentLines
        - attributionHumanAdded
        - attributionHumanModified
        - attributionHumanRemoved
        - attributionTotalCommitted
        - attributionCalculatedAt
      type: object
    SessionFacetOption:
      additionalProperties: false
      properties:
        label:
          type: string
        value:
          type: string
      required:
        - value
        - label
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: >-
        Bearer token authorizing this operation's repository action. Each
        operation's security requirement names the resource action the token
        must be authorized for (pull or push).
      scheme: bearer
      type: http
    oauth2:
      description: OAuth 2.0 authorization code flow.
      flows:
        authorizationCode:
          authorizationUrl: https://us.auth.entire.io/authorize
          scopes:
            offline_access: Stay signed in and receive a refresh token.
            openid: Verify your identity.
          tokenUrl: https://us.auth.entire.io/oauth/token
      type: oauth2
    oidc:
      description: >-
        OpenID Connect discovery document:
        https://us.auth.entire.io/.well-known/openid-configuration
      openIdConnectUrl: https://us.auth.entire.io/.well-known/openid-configuration
      type: openIdConnect

````