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

# Returns the contents of a file

> Return the raw contents of a file in a project at given commit.



## OpenAPI

````yaml /api-specs/cloud/public-api.json get /api/projects/v1/projects/{projectId}/files/{commitId}/{path}/content
openapi: 3.0.3
info:
  title: Domino Public API
  description: Reference for Domino's public REST API endpoints.
  version: 6.4.0
  x-catalog-key: nucleus
servers:
  - url: https://mycluster.domino.tech
    description: >-
      Replace 'mycluster.domino.tech' with your Domino cluster hostname. For
      Domino Cloud customers, that is `your-subdomain`.domino.tech (e.g.,
      acme.domino.tech). For self-hosted deployments, it is the hostname you
      reach the Domino UI at.
security: []
tags:
  - name: Projects
  - name: Project templates
  - name: Workspaces
  - name: Jobs
  - name: HPC Jobs
  - name: Environments
  - name: Hardware Tiers
  - name: Datasets
  - name: Data Sources
  - name: GenAI
  - name: AI Systems
  - name: Apps
  - name: App versions
  - name: App instances
  - name: Model APIs
  - name: Registered models
  - name: Model deployment
  - name: Extensions
  - name: Cost and billing
  - name: Users and organizations
  - name: Service accounts
  - name: Personal Access Tokens
  - name: Personal Access Tokens (admin)
  - name: Audit Trail
  - name: Custom metrics
  - name: PPM
  - name: Model Monitoring models
  - name: Model Monitoring drift and quality
  - name: Model Monitoring settings
  - name: Model Monitoring authentication
  - name: Governance bundles
  - name: Governance policies
  - name: Governance evidence and results
  - name: Governance operations
  - name: NetApp Volumes
  - name: NetApp Volumes snapshots
  - name: NetApp Volumes filesystems
  - name: NetApp Volumes transfers
  - name: Tags
  - name: Properties
externalDocs:
  description: OpenAPI
  url: https://swagger.io/resources/open-api/
paths:
  /api/projects/v1/projects/{projectId}/files/{commitId}/{path}/content:
    get:
      tags:
        - Projects
      summary: Returns the contents of a file
      description: Return the raw contents of a file in a project at given commit.
      operationId: getProjectFileContents
      parameters:
        - description: Id of the project to return files for
          in: path
          name: projectId
          required: true
          schema:
            type: string
        - description: Id of a commit in the project repository to list files from
          in: path
          name: commitId
          required: true
          schema:
            type: string
        - description: >-
            Path in the project's repository to the file. It must be url-encoded
            and is case-sensitive.
          example: nested%2Ffolder%2Ffile.ext
          in: path
          name: path
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/octet-stream:
              schema:
                format: binary
                type: string
          description: >
            Success. It returns a stream of data with the file content,
            specifying the appropriate

            media type based on the file extension in a best-effort basis.
          x-domino-binary-stream: true
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '404':
          $ref: '#/components/responses/404'
        '500':
          $ref: '#/components/responses/500'
      security:
        - DominoApiKey: []
        - BearerAuthentication: []
components:
  responses:
    '400':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Bad Request
    '401':
      content:
        application/json:
          example:
            code: UNAUTHORIZED
            message: Authentication is required to access this resource.
          schema:
            $ref: '#/components/schemas/ErrorV1'
      description: Unauthorized - authentication is required or has failed.
    '403':
      content:
        application/json:
          example:
            code: FORBIDDEN
            message: You do not have permission to perform this action.
          schema:
            $ref: '#/components/schemas/ErrorV1'
      description: Forbidden - the caller lacks permission to perform this action.
    '404':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Not Found
    '500':
      content:
        application/json:
          schema:
            properties:
              error:
                type: string
            type: object
      description: Internal Server Error
  schemas:
    ErrorV1:
      properties:
        code:
          description: Machine-readable error code.
          example: NOT_FOUND
          type: string
        message:
          description: Human-readable description of the error.
          example: The requested HPC Job could not be found.
          type: string
      required:
        - message
      type: object
  securitySchemes:
    DominoApiKey:
      type: apiKey
      in: header
      name: X-Domino-Api-Key
    BearerAuthentication:
      type: apiKey
      name: Authorization
      in: header

````

## Related topics

- [Returns the contents of a file (deprecated, use v1 endpoint instead)](/api-reference/projects/returns-the-contents-of-a-file-deprecated-use-v1-endpoint-instead.md)
- [Returns whether this upload chunk has already been sent](/api-reference/netapp-volumes/returns-whether-this-upload-chunk-has-already-been-sent.md)
- [Returns whether or not this upload chunk has already been sent](/api-reference/datasets/returns-whether-or-not-this-upload-chunk-has-already-been-sent.md)
- [The python-domino library](/cloud/reference/python-sdk/python-domino.md)
