Deployments
Preview

Extend a claim once

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

POST
/deployments/{deploymentId}/share/claims/{claimId}/extend
cookiebetter-auth.session_token<token>

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

deploymentId*string
Formatuuid
claimId*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

Response Body

The claim with its new end.

application/json
  1. response
id*string
Formatuuid
deploymentId*string
Formatuuid
holder*
branch*string
note*string
claimedAt*string
Formatdate-time
until*string
Formatdate-time
minutes*integer

The length first asked for, which an extension adds once.

extended*boolean
state*string
Value in"active""ended"
endedAt?string
Formatdate-time
endReason?string
Value in"released""expired""handed_over""taken_over""given_back"
endedBy?
reason?string

Why an admin took the deployment over.

resetFirst*boolean
migration?

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?boolean

The holder chose to keep the database as it is.

handoverJobs?array<>

The hand-over jobs that ran during the claim, in the history.

Example Request
curl -X POST 'https://wardn.example.com/api/v1/deployments/497f6eca-6276-4993-bfeb-53cbbbba6f08/share/claims/497f6eca-6276-4993-bfeb-53cbbbba6f08/extend'
Example Response
{  "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    }  ]}