Add a scan to an application's pipeline
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline-scan"
payload = {
"scanners": [],
"component": "<string>"
}
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({scanners: [], component: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline-scan', 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-scan \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scanners": [],
"component": "<string>"
}
'{
"outcome": "started",
"message": "<string>",
"pull_request_url": "<string>",
"added_stages": [
"<string>"
],
"extended_stages": [
"<string>"
]
}Applications
Add a scan to an application's pipeline
Adds the requested scanners to the application’s .ankra/pipeline.yaml and opens a pull request proposing it: the missing scanner is appended to the scan stage that follows each build, or a report-only scan stage is inserted after the build. The rest of the file, comments included, is left as it was. A second call while the pull request is open stacks on it. Requires applications.write.
POST
/
api
/
v1
/
org
/
applications
/
{application_id}
/
pipeline-scan
Add a scan to an application's pipeline
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline-scan"
payload = {
"scanners": [],
"component": "<string>"
}
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({scanners: [], component: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline-scan', 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-scan \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scanners": [],
"component": "<string>"
}
'{
"outcome": "started",
"message": "<string>",
"pull_request_url": "<string>",
"added_stages": [
"<string>"
],
"extended_stages": [
"<string>"
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json