Deployments
Preview

Attach a change ticket to a snapshot

Attaches a ServiceNow change request or a Jira issue to a snapshot at this deployment and reads it from the system at once. A ticket the system says does not exist is refused; one the system cannot be asked about now is attached and unknown until it can. A guardrail that asks for an approved change

POST
/deployments/{deploymentId}/change-tickets
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
snapshotId*string
Formatuuid
system*string
Value in"servicenow""jira"
ref*string

The change request number or the issue key, such as CHG0030001 or PAY-123.

Length1 <= length <= 64

Response Body

The ticket was attached already; this is the one that is there.

application/json
  1. response
id*string
Formatuuid
system*string
Value in"servicenow""jira"
ref*string
snapshotId*string
Formatuuid
status*ChangeTicketStatus
Value in"approved""not_approved""unknown"
state*string

The system's own word for where the ticket is. As last said, whether or not that is still believed.

summary*string
url*string
checkedAt*|

When Wardn last asked the system, whether or not the answer was good.

Formatdate-time
error*string

Why the last look failed, in a few words. Empty when it worked.

attachedBy*string
attachedAt*string
Formatdate-time
Example Request
curl -X POST 'https://wardn.example.com/api/v1/deployments/497f6eca-6276-4993-bfeb-53cbbbba6f08/change-tickets' \  -H 'Content-Type: application/json' \  -d '{  "snapshotId": "09520abc-01e6-4da1-8fa5-f10e3883c861",  "system": "servicenow",  "ref": "string"}'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "system": "servicenow",  "ref": "string",  "snapshotId": "09520abc-01e6-4da1-8fa5-f10e3883c861",  "status": "approved",  "state": "string",  "summary": "string",  "url": "string",  "checkedAt": "2019-08-24T14:15:22Z",  "error": "string",  "attachedBy": "string",  "attachedAt": "2019-08-24T14:15:22Z"}