Make a signed-off version live
POST
/v1/releases/{release_id}/promote
const url = 'https://api.pensievelabs.co/v1/releases/rel_grade_audit_v8/promote';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"expect":"v7"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.pensievelabs.co/v1/releases/rel_grade_audit_v8/promote \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "expect": "v7" }'Succeeds only if the live version is still expect, so two people cannot promote over each other.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”release_id
required
string
Example
rel_grade_audit_v8Header Parameters
Section titled “Header Parameters”Idempotency-Key
string
Any unique string. Sending it again within 24 hours returns the first response.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
expect
required
The version you expect to be live now; null when none is.
string | null
Example
{ "expect": "v7"}Responses
Section titled “Responses”The release, now live.
Media typeapplication/json
object
id
required
string
object
required
model
required
string
version
required
string
status
required
superseded: it went live and a later release replaced it.
string
gates
required
Array<object>
object
kind
required
string
label
required
string
passed
required
boolean
passed_at
required
string | null format: date-time
shadow
required
split_percent
required
integer | null
signed_off_by
required
string | null
created_at
required
string format: date-time
Example
{ "id": "rel_grade_audit_v8", "object": "release", "status": "pending", "gates": [ { "kind": "beats_live" } ]}default
Section titled “default”Something went wrong; error.type says what.
Media typeapplication/json
object
error
required
object
type
required
string
message
required
string
param
The request field the error is about.
string | null
request_id
required
string
Example
{ "error": { "type": "invalid_request" }}