# Codeberg Repository API

**Canonical:** https://apis.io/apis/codeberg/codeberg-repository-api/  
**Provider:** Codeberg — https://apis.io/providers/codeberg/  
**Base URL:** https://codeberg.org/api/v1  
**Documentation:** https://codeberg.org/api/swagger

Codeberg Repository API is one of 10 APIs that [Codeberg](https://apis.io/providers/codeberg/) publishes on the [APIs.io](https://apis.io/) network, described by a machine-readable OpenAPI specification. Tagged areas include Repository. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and an API reference.

The repository API from Codeberg — 126 operation(s) for repository.

## Operations (60 of 198)

| Method | Path | Summary |
|---|---|---|
| POST | `/repos/migrate` | Migrate a remote git repository |
| GET | `/repos/search` | Search for repositories |
| GET | `/repos/{owner}/{repo}` | Get a repository |
| DELETE | `/repos/{owner}/{repo}` | Delete a repository |
| PATCH | `/repos/{owner}/{repo}` | Edit a repository's properties. Only fields that are set will be changed |
| GET | `/repos/{owner}/{repo}/actions/artifacts` | List a repository's artifacts |
| GET | `/repos/{owner}/{repo}/actions/artifacts/{artifact_id}` | Get an artifact by ID |
| DELETE | `/repos/{owner}/{repo}/actions/artifacts/{artifact_id}` | Mark an artifact for deletion |
| GET | `/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/zip` | Download an artifact |
| GET | `/repos/{owner}/{repo}/actions/jobs/{job_id}/logs` | Download the plaintext logs of an action job |
| GET | `/repos/{owner}/{repo}/actions/runners` | Get runners belonging to the repository |
| POST | `/repos/{owner}/{repo}/actions/runners` | Register a new repository-level runner |
| GET | `/repos/{owner}/{repo}/actions/runners/jobs` | Search for repository's action jobs according filter conditions |
| GET | `/repos/{owner}/{repo}/actions/runners/registration-token` | Get a repository's runner registration token |
| GET | `/repos/{owner}/{repo}/actions/runners/{runner_id}` | Get a particular runner that belongs to the repository |
| DELETE | `/repos/{owner}/{repo}/actions/runners/{runner_id}` | Delete a particular runner that belongs to a repository |
| GET | `/repos/{owner}/{repo}/actions/runs` | List a repository's action runs |
| GET | `/repos/{owner}/{repo}/actions/runs/{run_id}` | Get an action run |
| DELETE | `/repos/{owner}/{repo}/actions/runs/{run_id}` | Delete a completed workflow run |
| GET | `/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts` | List artifacts of a workflow run |
| POST | `/repos/{owner}/{repo}/actions/runs/{run_id}/cancel` | Cancel a pending or running workflow run |
| GET | `/repos/{owner}/{repo}/actions/runs/{run_id}/jobs` | List jobs of a workflow run |
| GET | `/repos/{owner}/{repo}/actions/runs/{run_id}/logs` | Download a ZIP of plaintext logs for every job in an action run |
| GET | `/repos/{owner}/{repo}/actions/secrets` | List an repo's actions secrets |
| PUT | `/repos/{owner}/{repo}/actions/secrets/{secretname}` | Create or Update a secret value in a repository |
| DELETE | `/repos/{owner}/{repo}/actions/secrets/{secretname}` | Delete a secret in a repository |
| GET | `/repos/{owner}/{repo}/actions/tasks` | List a repository's action tasks |
| GET | `/repos/{owner}/{repo}/actions/variables` | Get repo-level variables list |
| GET | `/repos/{owner}/{repo}/actions/variables/{variablename}` | Get a repo-level variable |
| PUT | `/repos/{owner}/{repo}/actions/variables/{variablename}` | Update a repo-level variable |
| POST | `/repos/{owner}/{repo}/actions/variables/{variablename}` | Create a repo-level variable |
| DELETE | `/repos/{owner}/{repo}/actions/variables/{variablename}` | Delete a repo-level variable |
| POST | `/repos/{owner}/{repo}/actions/workflows/{workflowfilename}/dispatches` | Dispatches a workflow |
| GET | `/repos/{owner}/{repo}/activities/feeds` | List a repository's activity feeds |
| GET | `/repos/{owner}/{repo}/archive/{archive}` | Get an archive of a repository |
| GET | `/repos/{owner}/{repo}/assignees` | Return all users that have write access and can be assigned to issues |
| POST | `/repos/{owner}/{repo}/avatar` | Update a repository's avatar |
| DELETE | `/repos/{owner}/{repo}/avatar` | Delete a repository's avatar |
| GET | `/repos/{owner}/{repo}/branch_protections` | List branch protections for a repository |
| POST | `/repos/{owner}/{repo}/branch_protections` | Create a branch protections for a repository |
| GET | `/repos/{owner}/{repo}/branch_protections/{name}` | Get a specific branch protection for the repository |
| DELETE | `/repos/{owner}/{repo}/branch_protections/{name}` | Delete a specific branch protection for the repository |
| PATCH | `/repos/{owner}/{repo}/branch_protections/{name}` | Edit a branch protections for a repository. |
| GET | `/repos/{owner}/{repo}/branches` | List a repository's branches |
| POST | `/repos/{owner}/{repo}/branches` | Create a branch |
| GET | `/repos/{owner}/{repo}/branches/{branch}` | Retrieve a specific branch from a repository, including its effective branch… |
| DELETE | `/repos/{owner}/{repo}/branches/{branch}` | Delete a specific branch from a repository |
| PATCH | `/repos/{owner}/{repo}/branches/{branch}` | Update a branch |
| GET | `/repos/{owner}/{repo}/collaborators` | List a repository's collaborators |
| GET | `/repos/{owner}/{repo}/collaborators/{collaborator}` | Check if a user is a collaborator of a repository |
| PUT | `/repos/{owner}/{repo}/collaborators/{collaborator}` | Add a collaborator to a repository |
| DELETE | `/repos/{owner}/{repo}/collaborators/{collaborator}` | Delete a collaborator from a repository |
| GET | `/repos/{owner}/{repo}/collaborators/{collaborator}/permission` | Get repository permissions for a user |
| GET | `/repos/{owner}/{repo}/commits` | Get a list of all commits from a repository |
| GET | `/repos/{owner}/{repo}/commits/{ref}/status` | Get a commit's combined status, by branch/tag/commit reference |
| GET | `/repos/{owner}/{repo}/commits/{ref}/statuses` | Get a commit's statuses, by branch/tag/commit reference |
| GET | `/repos/{owner}/{repo}/commits/{sha}/pull` | Get the pull request of the commit |
| GET | `/repos/{owner}/{repo}/compare/{basehead}` | Get commit comparison information |
| GET | `/repos/{owner}/{repo}/contents` | Gets the metadata of all the entries of the root dir |
| POST | `/repos/{owner}/{repo}/contents` | Modify multiple files in a repository |

…and 138 more operations. They are listed in full on the page.

## Machine-readable artifacts (5)

- **OpenAPI** — https://raw.githubusercontent.com/api-evangelist/codeberg/refs/heads/main/openapi/codeberg-repository-api-openapi.yml
- **Documentation** — https://docs.codeberg.org/advanced/api-usage/
- **APIReference** — https://codeberg.org/api/swagger
- **PostmanCollection** — https://raw.githubusercontent.com/api-evangelist/codeberg/refs/heads/main/collections/codeberg.postman_collection.json
- **OpenCollection** — https://raw.githubusercontent.com/api-evangelist/codeberg/refs/heads/main/collections/codeberg.opencollection.json

## Other Codeberg APIs (9)

- [Codeberg Miscellaneous API](https://apis.io/apis/codeberg/codeberg-miscellaneous-api/)
- [Codeberg Activitypub API](https://apis.io/apis/codeberg/codeberg-activitypub-api/)
- [Codeberg Admin API](https://apis.io/apis/codeberg/codeberg-admin-api/)
- [Codeberg Issue API](https://apis.io/apis/codeberg/codeberg-issue-api/)
- [Codeberg Notification API](https://apis.io/apis/codeberg/codeberg-notification-api/)
- [Codeberg Organization API](https://apis.io/apis/codeberg/codeberg-organization-api/)
- [Codeberg Package API](https://apis.io/apis/codeberg/codeberg-package-api/)
- [Codeberg Settings API](https://apis.io/apis/codeberg/codeberg-settings-api/)
- [Codeberg User API](https://apis.io/apis/codeberg/codeberg-user-api/)

## Tags

Repository

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/codeberg/codeberg-repository-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/codeberg/.
