> ## Documentation Index
> Fetch the complete documentation index at: https://allhandsai-chore-regenerate-agent-sdk-openapi.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Git Changes Query

> Get git changes using query parameter (preferred method).



## OpenAPI

````yaml /openapi/agent-sdk.json get /api/conversations/{runtime_conversation_id}/git/changes
openapi: 3.1.0
info:
  description: OpenHands Agent Server - REST/WebSocket interface for OpenHands AI Agent
  title: OpenHands Agent Server
  version: 1.52.0
servers: []
security: []
paths:
  /api/conversations/{runtime_conversation_id}/git/changes:
    get:
      tags:
        - Git
      summary: Git Changes Query
      description: Get git changes using query parameter (preferred method).
      operationId: >-
        git_changes_query_api_conversations__runtime_conversation_id__git_changes_get
      parameters:
        - in: path
          name: runtime_conversation_id
          required: true
          schema:
            format: uuid
            title: Runtime Conversation Id
            type: string
        - description: The git repository path
          in: query
          name: path
          required: true
          schema:
            description: The git repository path
            title: Path
            type: string
        - description: >-
            Optional git ref to diff against (e.g. 'HEAD' for git status-style
            changes, or a commit hash). When omitted, the upstream/default
            branch is auto-detected.
          in: query
          name: ref
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Optional git ref to diff against (e.g. 'HEAD' for git status-style
              changes, or a commit hash). When omitted, the upstream/default
              branch is auto-detected.
            title: Ref
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/GitChange'
                title: >-
                  Response Git Changes Query Api Conversations  Runtime
                  Conversation Id  Git Changes Get
                type: array
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - APIKeyHeader: []
components:
  schemas:
    GitChange:
      properties:
        path:
          format: path
          title: Path
          type: string
        status:
          $ref: '#/components/schemas/GitChangeStatus'
      required:
        - status
        - path
      title: GitChange
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    GitChangeStatus:
      enum:
        - MOVED
        - ADDED
        - DELETED
        - UPDATED
      title: GitChangeStatus
      type: string
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-Session-API-Key
      type: apiKey

````

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