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

# Get repository details

> Retrieves detailed repository information including:
- Name
- Description
- Size in bytes
- Owner ID
- Creation timestamp
- Digest method
- Default branch details
- Git sync configuration (if enabled)
- Organization ID (if part of an organization)
- Default auto-forwarding status

**Requirements:**
Requires READ access to the repository.

**Returns:**
- `404 Not Found` if the repository doesn't exist or user lacks access




## OpenAPI

````yaml get /repos/{repo_id}
openapi: 3.0.3
info:
  title: Diversion Core API
  description: >-
    Definition of the Core API used to access low-level functionality of
    Diversion
  version: 0.2.0
servers:
  - url: https://api.diversion.dev/v0
    description: Base endpoint
security: []
paths:
  /repos/{repo_id}:
    parameters:
      - $ref: '#/components/parameters/RepoParam'
    get:
      tags:
        - Repository Manipulation
      summary: Get details of an existing repo.
      description: Get details of an existing repo.
      operationId: src.handlersv2.repo.get
      responses:
        '200':
          description: Repo object with the requested identifier
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Repo'
        default:
          $ref: '#/components/responses/Error'
      security:
        - OAuth2:
            - coreapi/read
        - OAuth2:
            - coreapi/write
components:
  parameters:
    RepoParam:
      in: path
      name: repo_id
      required: true
      schema:
        type: string
        example: example_id
        minLength: 3
        maxLength: 128
      description: >-
        The repo ID of the repository. Repo _name_ can be used instead of the
        ID, but usage of ID for permanent linking and API requests is preferred.
  schemas:
    Repo:
      allOf:
        - $ref: '#/components/schemas/NewRepo'
        - type: object
          properties:
            repo_id:
              type: string
              example: example_id
            default_branch_id:
              type: string
            default_branch_name:
              type: string
            size_bytes:
              type: number
              format: float
            owner_user_id:
              type: string
            created_timestamp:
              type: integer
              description: Seconds since epoch UTC
              format: int64
            sync_git_repo_url:
              type: string
              description: Optional URL of the git repository being synced with the repo
          required:
            - repo_name
            - repo_id
            - size_bytes
            - owner_user_id
            - created_timestamp
    NewRepo:
      type: object
      properties:
        repo_name:
          type: string
          example: repo-name
          minLength: 1
          maxLength: 128
        description:
          type: string
      required:
        - repo_name
    Error:
      type: object
      properties:
        status:
          type: integer
          description: HTTP status code
          example: 403
        detail:
          type: string
          example: User not authorized to perform the requested action on the resource
        title:
          type: string
        type:
          type: string
      required:
        - status
        - detail
  responses:
    Error:
      description: An error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    OAuth2:
      type: oauth2
      x-tokenInfoFunc: src.token_info.token_auth
      description: This API uses OAuth 2 with the implicit grant flow
      flows:
        implicit:
          authorizationUrl: https://auth.diversion.dev/oauth2/authorize
          scopes:
            coreapi/read: Operations with no possible side-effects
            coreapi/write: Modifying operations
            coreapi/admin: >-
              Organizational operations like adding a repo or changing repo
              properties

````