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

# List session diffs

> List persisted session diff metadata with cursor pagination.



## OpenAPI

````yaml https://api.tembo.io/public-api/openapi/public get /v1/sessions/{sessionId}/diffs
openapi: 3.1.0
info:
  title: Tembo Public API
  description: Public API Endpoints for Tembo
  version: 1.0.0
servers:
  - url: https://api.tembo.io
    description: Tembo API
  - url: https://{deployment-origin}/api/public-api
    description: Self-hosted Tembo
    variables:
      deployment-origin:
        default: tembo.example.com
        description: Hostname of your self-hosted Tembo deployment
security: []
paths:
  /v1/sessions/{sessionId}/diffs:
    get:
      tags:
        - Sessions
      summary: List session diffs
      description: List persisted session diff metadata with cursor pagination.
      operationId: listSessionDiffs
      parameters:
        - in: path
          name: sessionId
          schema:
            type: string
            format: uuid
          required: true
        - in: query
          name: cursor
          schema:
            type: string
            format: uuid
        - in: query
          name: hasChanges
          schema:
            anyOf:
              - type: string
                enum:
                  - 'true'
                  - 'false'
              - type: boolean
        - in: query
          name: limit
          schema:
            anyOf:
              - type: string
                pattern: ^\d+$
              - type: integer
            default: 50
      responses:
        '200':
          description: List session diffs
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        additions:
                          type: integer
                        baselineSha:
                          type:
                            - string
                            - 'null'
                        branch:
                          type:
                            - string
                            - 'null'
                        capturedAt:
                          type: string
                          format: date-time
                        changedFiles:
                          type: integer
                        codeRepositoryId:
                          type:
                            - string
                            - 'null'
                          format: uuid
                        deletions:
                          type: integer
                        hasChanges:
                          type: boolean
                        headSha:
                          type:
                            - string
                            - 'null'
                        id:
                          type: string
                          format: uuid
                        remoteKey:
                          type:
                            - string
                            - 'null'
                        root:
                          type: string
                        sessionId:
                          type: string
                          format: uuid
                        untrackedFiles:
                          type: integer
                      required:
                        - additions
                        - baselineSha
                        - branch
                        - capturedAt
                        - changedFiles
                        - codeRepositoryId
                        - deletions
                        - hasChanges
                        - headSha
                        - id
                        - remoteKey
                        - root
                        - sessionId
                        - untrackedFiles
                      additionalProperties: false
                  nextCursor:
                    type:
                      - string
                      - 'null'
                    format: uuid
                required:
                  - items
                  - nextCursor
                additionalProperties: false
        '400':
          description: Invalid request or missing resource scope
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '401':
          description: The session is private
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '403':
          description: The caller is not permitted to perform this operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '404':
          description: Session resource not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '409':
          description: Session operation conflicts with existing data
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '500':
          description: Session operation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '502':
          description: Session runtime or provider operation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````