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

# A repo's branches and tags

> With the commit each is at, and the default branch. A repo with no push yet has none. At most 1,000 of each, and `truncated` says when there are more.



## OpenAPI

````yaml /api-reference/openapi.json get /projects/{owner}/{slug}/repo/refs
openapi: 3.1.0
info:
  title: Patch API
  version: 1.0.0
  description: >-
    The public API behind patch.gg, the desktop app and pch. Changes within v1
    are additive only. Errors are { error: { code, message, details } }; branch
    on code.
servers:
  - url: https://patch.gg/api/v1
security: []
paths:
  /projects/{owner}/{slug}/repo/refs:
    get:
      tags:
        - Repos
      summary: A repo's branches and tags
      description: >-
        With the commit each is at, and the default branch. A repo with no push
        yet has none. At most 1,000 of each, and `truncated` says when there are
        more.
      parameters:
        - schema:
            type: string
            example: patch
          required: true
          name: owner
          in: path
        - schema:
            type: string
            example: demo-mod
          required: true
          name: slug
          in: path
      responses:
        '200':
          description: Its refs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RepoRefs'
        '308':
          description: Renamed; follow the Location header
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Not signed in
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Not allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: '`on_github`: its home is GitHub, which has its files'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            Too many requests: wait as long as `Retry-After` says
            (`retry_after_s` in `details`), then retry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: It couldn't be read
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Reading repos isn't set up here, or the repo is waking up
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    RepoRefs:
      type: object
      properties:
        default_branch:
          type: string
          example: main
        branches:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                example: main
              commit:
                type: string
                description: The commit it's at, annotated tags included.
            required:
              - name
              - commit
          description: By name.
        tags:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
                example: main
              commit:
                type: string
                description: The commit it's at, annotated tags included.
            required:
              - name
              - commit
          description: By name, newest versions first.
        truncated:
          type: boolean
          description: 'Whether any were left out: there are at most 1,000 of each.'
      required:
        - default_branch
        - branches
        - tags
        - truncated
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: version_exists
            message:
              type: string
            details: {}
          required:
            - code
            - message
      required:
        - error

````

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