Rollback

POST
/v1/admin/projects/{project_id}/rollback

Not available yet. This operation is part of the published contract and answers 501 not_implemented until it is built. The request and response shapes below are final for this contract version.

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Bearer credential. API keys look like sqk_<geo>_<key_id>_<secret>: treat them as opaque and never put one in a browser. Older keys without the geo part stay valid until rotated. Find a geo's endpoints through GET /.well-known/sparq-discovery before sending a key.

Path Parameters

project_id*Project Id
Formatuuid

Header Parameters

Sparq-Workspace?string

For a person signed in to a console with several workspaces: the workspace this call is for, one of their memberships (listMyMemberships). Without it such a person gets workspace_required (400); a workspace they are not a member of is forbidden. It never grants anything, and other callers' credentials ignore it.

Formatuuid
Idempotency-Key?string

Makes a retry safe: the same key, route and body within 24 hours returns the stored response and the same result id. The same key with a different body or route is idempotency_conflict; while the first request runs, idempotency_in_progress.

Length8 <= length <= 128

Request Body

application/json
  1. body
environment*Environment

Environment name, for example 'dev', 'qa', 'preprod' or 'prod'.

Match^[a-z][a-z0-9-]{0,30}$
to_release_id*To Release Id
Formatuuid
reason*Reason
Length1 <= length <= 500

Response Body

Successful Response

application/json
  1. response
kind?Kind
Default"release"
schema_version?Schema Version
Default"1"
release_id*Release Id
Formatuuid
project_id*Project Id
Formatuuid
environment*Environment

Environment name, for example 'dev', 'qa', 'preprod' or 'prod'.

Match^[a-z][a-z0-9-]{0,30}$
version*Version

Semantic version, for example '1.4.0'.

Match^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-[0-9A-Za-z.-]+)?$
Lengthlength <= 64
status*ReleaseStatus
Value in"draft""staging""live""retired"
content_hash*Content Hash

Hash over all items; identifies the Release.

Match^sha256:[0-9a-f]{64}$
items*array<>
eval_run_id*|

Evaluation that gated this Release.

change_request_id*|null
created_at*Created At
Formatdate-time
published_at*|null
notes?string|null
Example Request
curl -X POST 'http://dev-sparq.centralindia.cloudapp.azure.com:8000/v1/admin/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/rollback' \  -H 'Content-Type: application/json' \  -d '{  "environment": "string",  "to_release_id": "3274a1b6-d975-4dd8-953e-2b76c590dc53",  "reason": "string"}'
Example Response
{  "kind": "release",  "schema_version": "1",  "release_id": "51d53377-463c-43a4-a864-f9b3ed9178de",  "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",  "environment": "string",  "version": "1.4.0",  "status": "draft",  "content_hash": "string",  "items": [    {      "kind": "agent",      "name": "string",      "version": "1.4.0",      "content_hash": "string"    }  ],  "eval_run_id": "8022d801-acb6-4836-b536-3cd4138b6ae0",  "change_request_id": "f90819c3-6f40-44d9-9518-d77c485c0c12",  "created_at": "2019-08-24T14:15:22Z",  "published_at": "2019-08-24T14:15:22Z",  "notes": "string"}