Skip to main content
A plugin registered with deployments:write can report the resources it deployed for a commit, such as a preview site, with their status and links. Entire attaches them to the commit’s Change, whose detail lists them with a ready count, such as 3 of 4 ready. The Deployments section on entire.com is still being built. The Deployments API only reports deployments: it doesn’t create them, and it never blocks a merge.
Deployments are on Entire’s v0 API. Field names may change before the contract is final.

What you need

  • deployments:write, on your plugin’s installation token. Ask Entire to add it when you register your plugin. It grants nothing else. checks:write, contents permissions and user tokens don’t grant it.
  • The project’s acceptance. Adding the permission to your plugin doesn’t grant it to existing installations. It stays pending until a project manager accepts it. Until then, writes for that project’s repositories answer 403, so keep reporting there through check runs or trail comments.
Send every call below to the repository’s api_base_url, under /api/v0 rather than /api/v1, with the installation’s access token as bearer token. Use the public repo_… repository ID and the full 40- or 64-character commit SHA. The Go SDK does the minting and routing for you.

Report a resource

Set external_updated_at to when the state changed on your side, in UTC, not to when you send the request. Keep each resource’s key the same across updates and across commits. The response has one result per resource, in request order:
outcome is created, updated, unchanged or ignored_stale. deployment is the stored state, whether or not your write applied.

Keep it current

  • Report queued, then in_progress, then completed with a conclusion.
  • Report inactive when you remove the deployed resource, such as a torn-down preview, and omit conclusion, so its links stop being offered.
  • Retries are safe. Entire orders writes by external_updated_at, so an older report never overwrites a newer one. At an equal time, a write never moves a resource back to an earlier status, so a late retry can’t revive a torn-down preview. Reuse the same external_updated_at when you retry.
  • Report each commit you deploy. A Change shows only the deployments on its head commit, never an earlier commit’s.
Deployments never gate a merge. If you use check runs for merge gating, keep publishing them separately. Using the same key for a check and a deployment is a convention, not a link Entire makes.

Read your reports

GET on the same URL returns your plugin’s current report for each key on that commit, ordered by key. It returns only your plugin’s deployments:
Pass ?per_page= (1 to 100, default 30). While the response has a next_cursor, pass it back unchanged as ?cursor= for the next page.

Errors

Errors are application/problem+json. Branch on code, not on the status.

With the Go SDK

Add Deployments: plugin.Write to Config.Permissions, matching your registration. inst.Deployments then reports and reads deployments:
The SDK validates a write as Entire does before sending it, sends it to the repository’s region, retries it with the same body, and follows a repository that moved to another region. Report a removed resource with Status: plugin.Inactive. inst.Deployments.List returns one page of your current reports, and inst.Deployments.All iterates over all of them. A refusal is an *entire.HTTPError: check it with entire.HasCode, for example entire.HasCode(err, entire.CodeForbidden) for a project that hasn’t accepted deployments:write yet.