import requests
url = "https://platform.ankra.app/api/v1/org/pipelines/definitions/{id}/review"
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}/review', 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}/review \
--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>",
"spec_hash": "<string>",
"status": "approvable",
"current_definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"repository": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "<string>",
"owner": "<string>",
"name": "<string>",
"default_branch": "<string>"
},
"head": {
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_number": 123,
"head_sha": "<string>",
"trigger_ref": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"baseline": {
"definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"protected_hash": "<string>",
"approved_hash": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"approved_by": "<string>"
},
"entries": [
{
"section": "<string>",
"path": "<string>",
"value": "<string>",
"is_withheld": true,
"change": "added"
}
]
}Review a pipeline definition's authority before approval
What an approver reads before approving a definition’s protected sections: exactly which authority it declares, how that compares with the approved authority runs fall back to, the default-branch run it was read from, and whether the approve route would accept it now. Requires pipelines.read. Read-only. Literal values that can carry a credential (a stage’s with: settings, a service’s env values, a webhook URL’s path and query) are withheld, and the stored pipeline YAML is never returned.
import requests
url = "https://platform.ankra.app/api/v1/org/pipelines/definitions/{id}/review"
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}/review', 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}/review \
--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>",
"spec_hash": "<string>",
"status": "approvable",
"current_definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"repository": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"provider": "<string>",
"owner": "<string>",
"name": "<string>",
"default_branch": "<string>"
},
"head": {
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"run_number": 123,
"head_sha": "<string>",
"trigger_ref": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"baseline": {
"definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"protected_hash": "<string>",
"approved_hash": "<string>",
"approved_at": "2023-11-07T05:31:56Z",
"approved_by": "<string>"
},
"entries": [
{
"section": "<string>",
"path": "<string>",
"value": "<string>",
"is_withheld": true,
"change": "added"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
The definition's reviewed authority.
Identity of the definition's protected sections; empty for a definition recorded before they were assessed.
protected_hash once an administrator approved it, otherwise empty.
Ankra user id of the approver, empty when unapproved.
Identity of the reviewed content. Definitions are stored by content, so it never changes for an id.
Whether POST /org/pipelines/definitions/{id}/approve should be offered now. Evidence read at one moment: the approve route re-checks inside its own transaction.
approvable, not_current, already_approved, nothing_to_approve, not_assessed, unreadable The definition a fresh push to the default branch would take its authority from.
Show child attributes
Show child attributes
The newest default-branch run that executed the definition; null when none did.
Show child attributes
Show child attributes
The approved authority runs fall back to while the definition is unapproved; null when nothing else was ever approved.
Show child attributes
Show child attributes
Show child attributes
Show child attributes