Validate a pipeline definition of an application
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline/validate"
payload = {
"spec_yaml": "<string>",
"changed_files": ["<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({spec_yaml: '<string>', changed_files: ['<string>']})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline/validate', 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/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"spec_yaml": "<string>",
"changed_files": [
"<string>"
]
}
'{
"severity": "<string>",
"violations": [
"<string>"
],
"events": [
{
"event": "<string>",
"run": true,
"reason": "<string>",
"matched_trigger": "<string>",
"steps": [
{
"step_key": "<string>",
"stage": "<string>",
"kind": "<string>",
"network": "<string>",
"depends_on": [
"<string>"
],
"run_condition": "<string>",
"timeout_seconds": 123,
"workspace": {
"mode": "<string>",
"restores": [
"<string>"
],
"handoff": "<string>",
"produces": [
"<string>"
]
},
"affected_by_graph": true
}
],
"skipped": [
{
"stage": "<string>",
"step_key": "<string>",
"reason": "<string>",
"message": "<string>"
}
],
"diagnostics": [
"<string>"
],
"affected_analysis": {
"changed_files": [
"<string>"
],
"targets": [
{
"stage": "<string>",
"go": [
"<string>"
],
"pnpm": [
"<string>"
]
}
],
"program_sha256": "<string>"
}
}
],
"path_sets": [
{
"name": "<string>",
"patterns": [
"<string>"
],
"includes": [
"<string>"
],
"used_by": [
"<string>"
]
}
]
}Pipelines
Validate a pipeline definition of an application
Dry-runs a pipeline definition against the repository without recording it: its policy violations and what it would run for each event, optionally against a set of changed files. Needs pipelines.read.
POST
/
api
/
v1
/
org
/
applications
/
{application_id}
/
pipeline
/
validate
Validate a pipeline definition of an application
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline/validate"
payload = {
"spec_yaml": "<string>",
"changed_files": ["<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({spec_yaml: '<string>', changed_files: ['<string>']})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline/validate', 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/validate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"spec_yaml": "<string>",
"changed_files": [
"<string>"
]
}
'{
"severity": "<string>",
"violations": [
"<string>"
],
"events": [
{
"event": "<string>",
"run": true,
"reason": "<string>",
"matched_trigger": "<string>",
"steps": [
{
"step_key": "<string>",
"stage": "<string>",
"kind": "<string>",
"network": "<string>",
"depends_on": [
"<string>"
],
"run_condition": "<string>",
"timeout_seconds": 123,
"workspace": {
"mode": "<string>",
"restores": [
"<string>"
],
"handoff": "<string>",
"produces": [
"<string>"
]
},
"affected_by_graph": true
}
],
"skipped": [
{
"stage": "<string>",
"step_key": "<string>",
"reason": "<string>",
"message": "<string>"
}
],
"diagnostics": [
"<string>"
],
"affected_analysis": {
"changed_files": [
"<string>"
],
"targets": [
{
"stage": "<string>",
"go": [
"<string>"
],
"pnpm": [
"<string>"
]
}
],
"program_sha256": "<string>"
}
}
],
"path_sets": [
{
"name": "<string>",
"patterns": [
"<string>"
],
"includes": [
"<string>"
],
"used_by": [
"<string>"
]
}
]
}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