Approve an application's pipeline definition
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline/approve-definition"
payload = { "definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({definition_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline/approve-definition', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline/approve-definition \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"protected_hash": "<string>",
"protected_approved_by": "<string>",
"protected_approved_at": "2023-11-07T05:31:56Z"
}Pipelines
Approve an application's pipeline definition
Approves the protected sections of a pipeline definition the application’s repository runs. Needs pipelines.manage and a human caller: a service account is refused.
POST
/
api
/
v1
/
org
/
applications
/
{application_id}
/
pipeline
/
approve-definition
Approve an application's pipeline definition
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline/approve-definition"
payload = { "definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({definition_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline/approve-definition', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline/approve-definition \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"protected_hash": "<string>",
"protected_approved_by": "<string>",
"protected_approved_at": "2023-11-07T05:31:56Z"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The application whose connected repository's pipeline is addressed.
Body
application/json
The definition whose protected sections are approved.