List repositories
id, which never changes. Names and hosts can change, so list the repositories again rather than caching them for long. Customers can change the selection without notice. Use this list for coverage and routing discovery; token minting and each resource operation still enforce current grants and scope.
path is the repository’s web path, also sent as repository.path on ref events. Native repositories use /et/{project}/{repository}; mirrors use /gh/{owner}/{repository}. /et/acme/api and /gh/acme/api can both exist and are different repositories. Use path for web links and id as your key. Older responses may omit path.
Send repository API calls to the placement whose role is processing_primary, using its api_base_url. Ignore placement roles you don’t know. This endpoint returns one page; next_cursor is always null.
Mint an access token
201:
Errors
Error bodies are RFC 9457 problem documents, with a machine-readable
code member.
Clone a repository
Installgit-remote-entire on the machine that will clone. It doesn’t need the Entire CLI. Download the current stable release, check it, and put git-remote-entire on PATH:
git-remote-entire-<os>-<arch>.tar.gz (.zip on Windows) for linux, darwin and windows on amd64 and arm64. /latest/ redirects to the current stable release. For a reproducible build, download from https://install.entire.com/v<version>/ instead. For up to a minute after a release, the two /latest/ links can point at different releases, so retry a checksum failure. The Entire CLI also includes the helper.
Mint a contents:read token for the repository and set it as ENTIRE_TOKEN for the Git process. ENTIRE_TOKEN overrides the helper’s bearer credential. Pass the repository’s entire_clone_url, unchanged, to git clone:
$TOKEN and $ENTIRE_CLONE_URL are shell variables holding the minted token and the returned URL.
For a native repository, the URL might be entire://aws-us-east-2.entire.io/et/acme/api. A mirror might return entire://aws-us-east-2.entire.io/gh/acme/api. Accept both. Don’t construct the URL from full_name, or replace /gh/ with /et/.
Keep the token out of logs, command arguments and Git configuration. Give untrusted code, such as a customer’s build, only a token you minted for its repository with repository_id. Use expires_at to renew the token before later fetches.
Use the returned entire_clone_url with git-remote-entire for this workflow.
To push to a native repository, your plugin must be registered for contents:write, and the token must request it. You can’t push to a mirror through Entire. Reading a mirror and reporting checks use the same APIs as a native repository.
The Go SDK can prepare the helper’s environment for you, but it uses the installation’s token, which reaches every repository in the installation. Use it only where you trust Git as much as your plugin. For an untrusted build, mint a repository token with the SDK’s RepositoryToken and set ENTIRE_TOKEN yourself.
Read a commit or file
For a small read, you don’t need to clone. Send these requests to the repository’sapi_base_url with a contents:read token:
id from the list and a full 40- or 64-character commit SHA. The response includes commit_sha, branches, default_branch and a commit object with the message, author and nullable changed-file counts.
ref can be a SHA, branch or tag; HEAD reads the default branch. path is relative to the repository root. The response streams the whole file. It is always text/plain and sent as an attachment, whatever the file holds, so decide how to read it from its path, not its Content-Type. Compare the received byte count with the Entire-Size header to detect an interrupted transfer; retry an incomplete read. Clone instead if you need many files.
An unknown ref or file path answers 404, as does a path that names a directory. To list a directory, use GET {api_base_url}/api/v1/repos/{repo_id}/tree?ref={ref}&path={path}. A token with only checks:write cannot read repository contents.
Both raw and tree reads return 404 for refs in the reserved entire/ namespace, including fully qualified names such as refs/heads/entire/checkpoints/v1.
Create a repository
A plugin registered withrepositories:create can create repositories in the installation’s project once the customer has accepted that permission. 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:
"permissions": {"repositories": "create", "installations": "read"}. The token reaches no repository. An installation-wide token also creates when it includes repositories:create. It must request every effective permission currently accepted by that installation, not pending catalog additions.
Then call the canonical Create repository endpoint 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. Omit clusterHost and mirrorClusterSlugs; nonempty values are rejected for plugins.
A successful create answers 201 with the repository:
repositoryId immediately. It is the id the repository list, access tokens and webhooks use. The new repository joins the installation, including a selected repository list, but 201 can still be returned when grant reconciliation fails. A subsequent token mint can return 409 coverage_changed until those grants are repaired. Repository-added events are queued for covering installations; delivery also depends on their webhook configuration and processing.
Wait for provisioning
The repository response’sstate: "active" confirms completed repository provisioning. This is separate from an installation’s lifecycle state. If create returns provisioning, continue with the saved repository ID:
- List the installation’s repositories until that ID has a
processing_primaryplacement andapi_base_url. - Mint a repository-scoped token for the permissions your next operation needs. For
409 coverage_changed, refresh the repository list to check coverage, then retry minting with backoff. Ask your Entire contact to repair persistent grant reconciliation failures. For403 permission_not_accepted, have the customer accept the requested permission before retrying. - Call the repository API at the discovered URL. Handle that operation’s errors separately from discovery and token minting.
Create errors
Core answers a refused create with an RFC 9457 problem document. Branch on itstype, 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.