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

# Get static site repository

> Retrieve metadata about the Git repository connected to a static site: the source type, Git provider, repository URL, default branch, and the commit currently deployed (from the latest successful deployment). Call this first to discover the deployed commit SHA, then pass it as the `ref` to the tree and contents endpoints to inspect exactly the code that is deployed. Static sites always have a `privateGit` or `publicGit` source; the 422 response only occurs if the repository URL is missing.



## OpenAPI

````yaml https://api.sevalla.com/v3/openapi.json get /static-sites/{id}/repository
openapi: 3.1.0
info:
  title: Sevalla API docs
  version: 1.0.0
servers:
  - url: https://api.sevalla.com/v3
security:
  - bearerAuth: []
paths:
  /static-sites/{id}/repository:
    get:
      tags:
        - Static sites
      summary: Get static site repository
      description: >-
        Retrieve metadata about the Git repository connected to a static site:
        the source type, Git provider, repository URL, default branch, and the
        commit currently deployed (from the latest successful deployment). Call
        this first to discover the deployed commit SHA, then pass it as the
        `ref` to the tree and contents endpoints to inspect exactly the code
        that is deployed. Static sites always have a `privateGit` or `publicGit`
        source; the 422 response only occurs if the repository URL is missing.
      operationId: getStaticSiteRepositoryV3
      parameters:
        - schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            example: fb5e5168-4281-4bec-94c5-0d1584e9e657
          in: path
          name: id
          required: true
          description: Static site identifier
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  source:
                    type: string
                    enum:
                      - privateGit
                      - publicGit
                    description: >-
                      Where the static site source code comes from. `privateGit`
                      - private Git repository connected via OAuth. `publicGit`
                      - public Git repository URL.
                    example: privateGit
                  git_type:
                    anyOf:
                      - type: string
                        enum:
                          - github
                          - bitbucket
                          - gitlab
                      - type: 'null'
                    description: >-
                      Git hosting provider for the repository. `github` -
                      GitHub. `bitbucket` - Bitbucket. `gitlab` - GitLab. Null
                      for public git sources.
                    example: github
                  repo_url:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: Full URL of the Git repository
                    example: https://github.com/acme/my-site
                  default_branch:
                    anyOf:
                      - type: string
                      - type: 'null'
                    description: Default branch configured for deployments
                    example: main
                  deployed_commit:
                    anyOf:
                      - type: object
                        properties:
                          sha:
                            type: string
                            description: >-
                              Commit SHA currently deployed, taken from the
                              latest successful deployment
                            example: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0
                          message:
                            anyOf:
                              - type: string
                              - type: 'null'
                            description: Commit message
                            example: Fix homepage layout
                          author_login:
                            anyOf:
                              - type: string
                              - type: 'null'
                            description: Commit author login
                            example: octocat
                        required:
                          - sha
                          - message
                          - author_login
                        additionalProperties: false
                      - type: 'null'
                    description: >-
                      The commit currently deployed from the static site's
                      current repository. Null if the static site has never
                      deployed successfully, or if its repository was changed
                      after the last successful deployment (the deployed commit
                      belongs to the old repo and no longer applies).
                required:
                  - source
                  - git_type
                  - repo_url
                  - default_branch
                  - deployed_commit
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unauthorized
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code
                    example: 401
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err-abc-123
                        type: string
                      message:
                        description: Additional error details or instructions
                        example: >-
                          If you need assistance, please contact support and
                          provide this error code.
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Forbidden
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code
                    example: 403
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err-abc-123
                        type: string
                      message:
                        description: Additional error details or instructions
                        example: >-
                          If you need assistance, please contact support and
                          provide this error code.
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Not found
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code
                    example: 404
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err-abc-123
                        type: string
                      message:
                        description: Additional error details or instructions
                        example: >-
                          If you need assistance, please contact support and
                          provide this error code.
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Unprocessable entity
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code
                    example: 422
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err-abc-123
                        type: string
                      message:
                        description: Additional error details or instructions
                        example: >-
                          If you need assistance, please contact support and
                          provide this error code.
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
        '429':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Too many requests
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code
                    example: 429
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err-abc-123
                        type: string
                      message:
                        description: Additional error details or instructions
                        example: >-
                          If you need assistance, please contact support and
                          provide this error code.
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                    example: Internal Server Error
                  status:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: HTTP status code
                    example: 500
                  data:
                    type: object
                    properties:
                      code:
                        description: Error tracking code for support reference
                        example: err-abc-123
                        type: string
                      message:
                        description: Additional error details or instructions
                        example: >-
                          If you need assistance, please contact support and
                          provide this error code.
                        type: string
                    additionalProperties: false
                required:
                  - message
                  - status
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authentication. Pass your API key as a Bearer token in the
        Authorization header.

````