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,contentspermissions 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 returns403 forbidden. Keep using already accepted check or discussion permissions while awaiting approval.
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
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, thenin_progress, thencompletedwith aconclusion. - Report
inactivewhen you remove the deployed resource, such as a torn-down preview, and omitconclusion, 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 sameexternal_updated_atwhen you retry. - Report each commit you deploy. A Change shows only the deployments on its head commit, never an earlier commit’s.
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:
?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 areapplication/problem+json. Branch on code, not on the status.
With the Go SDK
AddDeployments: plugin.Write to Config.Permissions, matching your registration. inst.Deployments then reports and reads deployments:
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.