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

# Read one bounded commit-pinned repository file



## OpenAPI

````yaml /openapi.json get /api/repositories/{repoRef}/file
openapi: 3.1.0
info:
  title: Atoll API
  version: 1.0.0
  description: >-
    REST API for Atoll project management, agent collaboration, strategy
    tracking, and integrations.
servers:
  - url: https://atollhq.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Authentication
  - name: Organizations
  - name: Projects
  - name: Project access
  - name: Issues
  - name: Issue details
  - name: Milestones
  - name: Artifacts
  - name: Strategy
  - name: Members and agents
  - name: Planning
  - name: Setup
  - name: Integrations and billing
  - name: Notifications and public
  - name: Private inbox
  - name: Agent executions
  - name: Human attention
paths:
  /api/repositories/{repoRef}/file:
    get:
      tags:
        - Projects
      summary: Read one bounded commit-pinned repository file
      operationId: get_repository_file
      parameters:
        - name: repoRef
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: ref
          in: query
          required: false
          schema:
            type: string
        - name: path
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: UTF-8 file content capped at 1 MB
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RepositoryFileResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '413':
          $ref: '#/components/responses/BadRequest'
        '415':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/ServerError'
        '503':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    RepositoryFileResponse:
      allOf:
        - $ref: '#/components/schemas/RepositoryProvenance'
      type: object
      required:
        - path
        - content
        - encoding
        - size
      properties:
        path:
          type: string
        content:
          type: string
          maxLength: 1000000
        encoding:
          type: string
          const: utf-8
        size:
          type: integer
          maximum: 1000000
      additionalProperties: true
    RepositoryProvenance:
      type: object
      required:
        - repo_ref
        - repository
        - requested_ref
        - resolved_commit_sha
      properties:
        repo_ref:
          type: string
          format: uuid
        repository:
          type: object
          required:
            - owner
            - name
            - full_name
          properties:
            owner:
              type: string
            name:
              type: string
            full_name:
              type: string
          additionalProperties: false
        requested_ref:
          type: string
        resolved_commit_sha:
          type: string
          pattern: ^[0-9a-fA-F]{40}$
      additionalProperties: true
    Error:
      type: object
      description: >-
        Common error responses contain error. Shared missing-auth and
        unknown-API responses also contain a stable code.
      properties:
        error:
          type: string
        code:
          type: string
      required:
        - error
      examples:
        - error: Unauthorized
          code: unauthorized
        - error: Not found
          code: not_found
      additionalProperties: true
  responses:
    BadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found or not visible
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: Unexpected server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: sk_atoll_<key>

````