Get a pipeline definition's approval
import requests
url = "https://platform.ankra.app/api/v1/org/pipelines/definitions/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/pipelines/definitions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/pipelines/definitions/{id} \
--header 'Authorization: Bearer <token>'{
"definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"protected_hash": "<string>",
"approved_hash": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"approved_by": "<string>",
"reran_runs": [
"<string>"
]
}Pipelines
Get a pipeline definition's approval
Reads whether a pipeline definition’s protected sections are approved, and by whom. Needs pipelines.read.
GET
/
api
/
v1
/
org
/
pipelines
/
definitions
/
{id}
Get a pipeline definition's approval
import requests
url = "https://platform.ankra.app/api/v1/org/pipelines/definitions/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/org/pipelines/definitions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/org/pipelines/definitions/{id} \
--header 'Authorization: Bearer <token>'{
"definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"protected_hash": "<string>",
"approved_hash": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"approved_by": "<string>",
"reran_runs": [
"<string>"
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The pipeline definition.
Response
The approval state.
A pipeline definition's approval state.
Identity of the definition's protected sections.
protected_hash once an administrator approved it, otherwise empty.
Ankra user id of the approver, empty when unapproved.
Runs the approval re-ran because they were held for it; empty on a read.