Deployments
Preview

Ask the holder of a shared deployment to hand it over

Joins the line for the deployment with the branch and time wanted. The holder is told in their notifications and answers by handing over now, handing over when they release, or declining with a reason. Answers 409 `share.not_claimed` when nobody holds it and 409 `share.already_requested` for a perso

POST
/deployments/{deploymentId}/share/requests
cookiebetter-auth.session_token<token>

Better Auth session cookie. Production uses the __Secure- prefixed name.

deploymentId*string
Formatuuid
Idempotency-Key?string

Makes 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.

Match^[A-Za-z0-9_.:-]+$
Length1 <= length <= 255
application/json
  1. body
branch*string

The branch the deployment follows while the claim lasts.

minutes*integer

How long, from 15 minutes up to the deployment's longest claim.

note?string
Lengthlength <= 280
resetFirst?boolean

Run the hand-over reset jobs before taking it, rather than keeping what the last holder left.

Response Body

The request.

application/json
  1. response
id*string
Formatuuid
claimId*string
Formatuuid
by*
branch*string
minutes*integer
note*string
state*string
Value in"waiting""accepted""handed_over""declined""withdrawn""taken_over"
declineReason?string
createdAt*string
Formatdate-time
decidedAt?string
Formatdate-time
Example Request
curl -X POST 'https://wardn.example.com/api/v1/deployments/497f6eca-6276-4993-bfeb-53cbbbba6f08/share/requests' \  -H 'Content-Type: application/json' \  -d '{  "branch": "string",  "minutes": 0}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "claimId": "88057929-7728-4a26-8396-f965dcc8b947",  "by": {    "id": "string",    "name": "string"  },  "branch": "string",  "minutes": 0,  "note": "string",  "state": "waiting",  "declineReason": "string",  "createdAt": "2019-08-24T14:15:22Z",  "decidedAt": "2019-08-24T14:15:22Z"}