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. When deployment data is available for a Change’s current head, entire.com shows a Deployments section with the resources and a ready count, such as 3 of 4 ready. 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, minting a token for that permission returns 403 permission_not_accepted. A resource write without effective deployment authority returns 403 forbidden. Keep using already accepted check or discussion permissions while awaiting approval.
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 common request fields locally, sends the write to the repository’s region, retries it with the same body, and follows a repository that moved. The server remains authoritative for request size, validation and live authorization. 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: entire.HasCode(err, entire.CodeForbidden) checks a resource-side forbidden refusal. A token mint for an unaccepted permission uses the distinct code permission_not_accepted; inspect that code separately and ask a project manager to accept the permission. Neither is the mint’s 409 coverage_changed grant/coverage race.