List repositories GET `/auth/v1/repository/{namespace}`
Retrieve all repositories within a namespace.
Path parameters namespace type: string (required)
The namespace (user or organization) that owns the repositories.
Query parameters page type: integer
Page number for pagination.
default: 1 per_page type: integer
Number of results per page. Maximum `100`.
default: 20 sort type: string
Sort field. One of `name`, `created_at`, `updated_at`, `size`.
default: updated_at order type: string
Sort order. One of `asc`, `desc`.
default: desc visibility type: string
Filter by visibility. One of `public`, `private`, `internal`.
Request Response 200 Get a repository GET `/auth/v1/repository/{namespace}/{id}`
Retrieve details for a single repository by its ID.
Path parameters namespace type: string (required)
The namespace (user or organization) that owns the repository.
id type: string (required)
Request Response 200 Create a repository POST `/auth/v1/repository/{namespace}`
Create a new repository in a namespace.
Path parameters namespace type: string (required)
The namespace (user or organization) to create the repository in.
Body parameters name type: string (required)
Repository name. Must be unique within the namespace. Allowed characters: alphanumeric, hyphens, underscores, and dots.
description type: string
A short description of the repository. Maximum 512 characters.
visibility type: string
Repository visibility. One of `public`, `private`, `internal`.
default: private default_branch type: string
Name of the default branch created on initialization.
default: main auto_init type: boolean
Initialize the repository with an empty commit on the default branch.
default: true content_addressed type: boolean
Enable content-addressed storage with deduplication. Default for all repositories.
default: true gitignore_template type: string
Name of a `.gitignore` template to include. For example, `Python`, `Go`, `Node`.
Request Response 201 Rename a repository PUT `/auth/v1/repository/{namespace}/{id}/name`
Rename an existing repository.
Path parameters namespace type: string (required)
The namespace (user or organization) that owns the repository.
id type: string (required)
Body parameters name type: string (required)
The new repository name. Must be unique within the namespace.
Request Response 200 [Warning] Renaming breaks existing clone URLs. After renaming, existing clone URLs will stop working. Update any CI/CD pipelines, deployment configs, or local remotes that reference the old name.
[Warning] Renaming breaks existing clone URLs. After renaming, existing clone URLs will stop working. Update any CI/CD pipelines, deployment configs, or local remotes that reference the old name.
Change repository visibility POST `/auth/v1/repository/{namespace}/{id}/visibility`
Change the visibility of a repository between public, private, and internal.
Path parameters namespace type: string (required)
The namespace (user or organization) that owns the repository.
id type: string (required)
Body parameters visibility type: string (required)
New visibility. One of `public`, `private`, `internal`.
Request Response 200 Transfer a repository POST `/auth/v1/repository/{namespace}/{id}/transfer`
Transfer a repository to a different namespace.
Path parameters namespace type: string (required)
The current namespace that owns the repository.
id type: string (required)
Body parameters new_namespace type: string (required)
The target namespace to transfer the repository to. You must have admin access in the target namespace.
Request Response 200 Delete a repository DELETE `/auth/v1/repository/{namespace}/{id}`
Permanently delete a repository and all its data, including branches, commits, and LFS objects.
Path parameters namespace type: string (required)
The namespace (user or organization) that owns the repository.
id type: string (required)
Request Response 204 Returns an empty response body on success.
Get directory tree GET `/auth/v1/repository/{namespace}/{id}/tree/{path}`
Retrieve the directory listing (tree) at a given path within a repository.
Path parameters namespace type: string (required)
The namespace (user or organization) that owns the repository.
id type: string (required)
path type: string (required)
The directory path within the repository. Use an empty string or `/` for the root directory.
Query parameters ref type: string
The branch, tag, or commit SHA to read the tree from.
default: main Request Response 200 Get file contents GET `/auth/v1/repository/{namespace}/{id}/file/{path}`
Retrieve the contents of a single file from a repository.
Path parameters namespace type: string (required)
The namespace (user or organization) that owns the repository.
id type: string (required)
path type: string (required)
The file path within the repository.
Query parameters ref type: string
The branch, tag, or commit SHA to read the file from.
default: main Request Response 200 [Note] Large files. For files larger than 1 MB, the content field may be omitted and a download_url field will be provided instead. Binary files always return a download_url.
[Note] Large files. For files larger than 1 MB, the content field may be omitted and a download_url field will be provided instead. Binary files always return a download_url.
Get commits GET `/auth/v1/repository/{namespace}/{id}/commits/{revision}`
Retrieve the commit history for a given branch, tag, or commit SHA.
Path parameters namespace type: string (required)
The namespace (user or organization) that owns the repository.
id type: string (required)
revision type: string (required)
The branch name, tag name, or commit SHA to list commits from.
Query parameters page type: integer
Page number for pagination.
default: 1 per_page type: integer
Number of commits per page. Maximum `100`.
default: 20 Request Response 200 Error responses All repository endpoints may return the following errors:
Status Description 400 Bad request -- invalid parameters or body 401 Unauthorized -- missing or invalid credentials 403 Forbidden -- insufficient permissions for this namespace 404 Not found -- repository or namespace does not exist 409 Conflict -- a repository with the same name already exists 422 Unprocessable entity -- validation error