import requests
url = "https://api.platform.ankra.app/org/applications/{application_id}/version-settings"
headers = {"cookie": "ankra_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'ankra_session='}};
fetch('https://api.platform.ankra.app/org/applications/{application_id}/version-settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.platform.ankra.app/org/applications/{application_id}/version-settings \
--cookie ankra_session={
"application_id": "<string>",
"versions": [
{
"commit_sha": "<string>",
"state": "scanned",
"scanned_commit_sha": "<string>",
"source": "setup",
"analysed_at": "2023-11-07T05:31:56Z",
"is_tree_complete": true,
"is_source_complete": true,
"unread_paths": [
"<string>"
],
"failure": "<string>",
"matching_commits": 123,
"settings": [
{
"name": "<string>",
"requirement": "required",
"is_secret": true,
"is_build_time": true,
"provided_by": "<string>",
"is_read_in_code": true,
"evidence": [
{
"file": "<string>",
"line": 123,
"is_code_read": true
}
]
}
]
}
]
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Get the settings each version reads (browser session)
Which settings Ankra found in the code of each version of the application, a version named by the commit it was built from (ankra-5uowtk.45). Each requested commit answers scanned, with every setting the App Contract extraction found and the file and line where it was found; scan_failed, with the reason the commit could not be read; not_scanned, when no extraction has read it yet; or ambiguous, with how many analysed commits begin with an abbreviated commit that names more than one. The extraction sees literal reads and the keys example and platform files list, never a key whose name is built at run time or a read inside a library, so a scanned list is what Ankra found, not everything the version reads. No value or default is returned. Requires applications.read.
import requests
url = "https://api.platform.ankra.app/org/applications/{application_id}/version-settings"
headers = {"cookie": "ankra_session="}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {cookie: 'ankra_session='}};
fetch('https://api.platform.ankra.app/org/applications/{application_id}/version-settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://api.platform.ankra.app/org/applications/{application_id}/version-settings \
--cookie ankra_session={
"application_id": "<string>",
"versions": [
{
"commit_sha": "<string>",
"state": "scanned",
"scanned_commit_sha": "<string>",
"source": "setup",
"analysed_at": "2023-11-07T05:31:56Z",
"is_tree_complete": true,
"is_source_complete": true,
"unread_paths": [
"<string>"
],
"failure": "<string>",
"matching_commits": 123,
"settings": [
{
"name": "<string>",
"requirement": "required",
"is_secret": true,
"is_build_time": true,
"provided_by": "<string>",
"is_read_in_code": true,
"evidence": [
{
"file": "<string>",
"line": 123,
"is_code_read": true
}
]
}
]
}
]
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}