Skip to main content
Two Core endpoints take your plugin JWT: list repositories and mint an access token. Everything else takes an access token and goes to the repository’s region, except creating a repository, which takes an access token on a Core.

List repositories

The response lists every repository the customer selected:
Store a repository’s id, which never changes. Names and hosts can change, so list the repositories again rather than caching them for long. Customers change the selection without notice; this list is the authority on what you may touch.

Mint an access token

A successful mint answers 201:
Prefer a token scoped to one repository. See Access tokens for what each combination of repository and permissions reaches.

Errors

Error bodies are RFC 9457 problem documents, with a machine-readable code member.

Create a repository

A plugin registered with repositories:create can create repositories in the installation’s project. The customer sees “Create repositories in this project” on the install page. The permission only creates: it doesn’t read or write contents, delete repositories or change settings. To push to a repository you created, register contents:write too. First mint a token with no repository_id:
The response carries "permissions": {"repositories": "create", "installations": "read"}. The token reaches no repository. The installation-wide token, minted with every permission you registered, also creates. Then create the repository on the same Core:
objectFormat is optional: sha1, the default, or sha256. Leave out projectId, and Core uses the installation’s project. Any other project answers 404. Plugins can’t set clusterHost or mirrorClusterSlugs. A successful create answers 201 with the repository:
Store repositoryId. It is the id the repository list, access tokens and webhooks use. Core answers only once the installation covers the new repository, so you can mint a token for it right away. If the customer selected a list of repositories, the new one joins it. Every installation that covers it receives installation.repositories_added.

Wait for provisioning

When state is active, the repository is ready. When it is provisioning, Git and region API calls fail until it’s ready. List the installation’s repositories until the new one has a placement whose role is processing_primary, then send calls to that placement’s api_base_url.

Create errors

Core answers a refused create with an RFC 9457 problem document. Branch on its type, not on the status alone: 409 and 429 carry other conditions too. A create is not idempotent. If the connection drops before you read the response, list the installation’s repositories before you create again: a 409 can mean your own earlier create succeeded.

Limits and ownership

An installation can create 100 repositories in any 24 hours. To raise the limit, ask your Entire contact. The customer’s project owns every repository you create. The repositories stay when the customer uninstalls your plugin. The customer can remove one from the installation’s selection like any other repository, and then you lose access to it.