Claim a shared deployment
Takes a shared deployment nobody holds: it follows the branch asked for until the claim ends. The deployment is pointed at the branch and rendered. Answers 409 `deployment.claimed` when someone holds it, which the web app turns into a request to use it, 409 `share.not_shared` for a deployment that i
better-auth.session_token<token>Better Auth session cookie. Production uses the __Secure- prefixed name.
deploymentId*stringuuidIdempotency-Key?stringMakes retries safe. A repeated key with the same request returns the first result and sets
Idempotent-Replayed: true. The same key with a different request answers 409
idempotency.key_reused, and while the first request is still running 409
idempotency.in_progress. Results are kept for 24 hours. Server errors and refusals for lack
of sign-in or permission are not kept, so a retry runs again.
^[A-Za-z0-9_.:-]+$1 <= length <= 255application/json- body
branch*stringThe branch the deployment follows while the claim lasts.
minutes*integerHow long, from 15 minutes up to the deployment's longest claim.
note?stringlength <= 280resetFirst?booleanRun the hand-over reset jobs before taking it, rather than keeping what the last holder left.
The claim.
application/json- response
id*stringuuiddeploymentId*stringuuidholder*branch*stringnote*stringclaimedAt*stringdate-timeuntil*stringdate-timeminutes*integerThe length first asked for, which an extension adds once.
extended*booleanstate*string"active""ended"endedAt?stringdate-timeendReason?string"released""expired""handed_over""taken_over""given_back"endedBy?reason?stringWhy an admin took the deployment over.
resetFirst*booleanmigration?What the migration check could tell, from file names in git and from the names of the jobs that run. not_checked says it could not look.
migrationKept?booleanThe holder chose to keep the database as it is.
handoverJobs?array<>The hand-over jobs that ran during the claim, in the history.
curl -X POST 'https://wardn.example.com/api/v1/deployments/497f6eca-6276-4993-bfeb-53cbbbba6f08/share/claims' \ -H 'Content-Type: application/json' \ -d '{ "branch": "string", "minutes": 0}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "deploymentId": "a73c85a1-d857-491e-a6b2-51dce05de7a2", "holder": { "id": "string", "name": "string" }, "branch": "string", "note": "string", "claimedAt": "2019-08-24T14:15:22Z", "until": "2019-08-24T14:15:22Z", "minutes": 0, "extended": true, "state": "active", "endedAt": "2019-08-24T14:15:22Z", "endReason": "released", "endedBy": { "id": "string", "name": "string" }, "reason": "string", "resetFirst": true, "migration": { "state": "not_checked", "apps": [ { "appId": "string", "appName": "string", "state": "not_checked", "folder": "string", "onlyRunning": [ "string" ], "onlyIncoming": [ "string" ], "reason": "string" } ], "jobs": [ "string" ], "statusJob": true, "reason": "string" }, "migrationKept": true, "handoverJobs": [ { "name": "string", "succeeded": true } ]}List the claims that ended on a deployment GET
The last 50 claims that ended, newest first, with who held them, for how long, and how they ended. Needs `deployment:read`.
Extend a claim once POST
Adds the claim's first length once, never past the longest a claim may last. Only the holder can. Answers 409 `share.already_extended` the second time. Writes an Activity entry. Needs `deployment:sync`.