Update a transition's obligations and presentation
PUT
/api/v1/projects/{projectId}/lifecycles/transitions/{transitionId}/policy
const url = 'https://app.avera.io/api/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/lifecycles/transitions/example/policy?sandboxId=example';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"requiredEndorsements":[{"principal":{"type":"example","id":"example"},"signatureRequired":true}],"distinctUsers":1,"requiresSignature":true,"separationOfDuties":true,"buttonLabel":"example","buttonColor":"example","buttonIcon":"example","sortOrder":1,"requiresComment":true,"commentMinLength":1,"confirmationRequired":true,"confirmationMessage":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url 'https://app.avera.io/api/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/lifecycles/transitions/example/policy?sandboxId=example' \ --header 'Content-Type: application/json' \ --data '{ "requiredEndorsements": [ { "principal": { "type": "example", "id": "example" }, "signatureRequired": true } ], "distinctUsers": 1, "requiresSignature": true, "separationOfDuties": true, "buttonLabel": "example", "buttonColor": "example", "buttonIcon": "example", "sortOrder": 1, "requiresComment": true, "commentMinLength": 1, "confirmationRequired": true, "confirmationMessage": "example" }'Stages the transition’s obligations, its endorsement slots, distinct-users floor, signature requirement and separation of duties, plus its button presentation and confirmation behaviour, into the change request named by sandboxId. Who may fire the transition is governed by permission rules, not by this policy.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”projectId
required
string format: uuid
transitionId
required
string
Query Parameters
Section titled “Query Parameters”sandboxId
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
requiredEndorsements
required
Array<object>
object
principal
required
object
type
required
string
id
required
string
signatureRequired
required
boolean
distinctUsers
integer | null format: int32
requiresSignature
required
boolean
separationOfDuties
required
boolean
buttonLabel
string | null
buttonColor
required
string
buttonIcon
string | null
sortOrder
required
integer format: int32
requiresComment
required
boolean
commentMinLength
required
integer format: int32
confirmationRequired
required
boolean
confirmationMessage
string | null
Example generated
{ "requiredEndorsements": [ { "principal": { "type": "example", "id": "example" }, "signatureRequired": true } ], "distinctUsers": 1, "requiresSignature": true, "separationOfDuties": true, "buttonLabel": "example", "buttonColor": "example", "buttonIcon": "example", "sortOrder": 1, "requiresComment": true, "commentMinLength": 1, "confirmationRequired": true, "confirmationMessage": "example"}Responses
Section titled “Responses”OK
Media type*/*
object
id
required
string
fromStateId
required
string
toStateId
required
string
name
required
string
requiresSignature
required
boolean
separationOfDuties
required
boolean
requiredEndorsements
required
Array<object>
object
principal
required
object
type
required
string
id
required
string
signatureRequired
required
boolean
distinctUsers
integer | null format: int32
buttonLabel
string | null
buttonColor
required
string
buttonIcon
string | null
sortOrder
required
integer format: int32
requiresComment
required
boolean
commentMinLength
required
integer format: int32
confirmationRequired
required
boolean
confirmationMessage
string | null