Clear an application's pipeline cache
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline-caches/clear"
payload = { "path": "<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({path: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline-caches/clear', 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-caches/clear \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "<string>"
}
'{
"archives_cleared": 1,
"archive_bytes": 1,
"volumes_cleared": 1,
"volumes_deleted_after": "2023-11-07T05:31:56Z"
}Pipelines
Clear an application's pipeline cache
Takes one cache of the pipeline repository the application is connected to out of use, chosen by its mount path and trust scope (null for both). No new step mounts any volume of the cache, and each is deleted by the cache reaper once it has been cleared for a day, so a step still using it is never cut off; until then the old volume and the new one a run fills both exist on the CI cluster. Its ready archives stop being restored at once and are deleted an hour later. Writes one audit entry when anything was cleared; a cache with nothing left to clear answers zeros. Nothing is sent to a cluster. Requires pipelines.operate.
POST
/
api
/
v1
/
org
/
applications
/
{application_id}
/
pipeline-caches
/
clear
Clear an application's pipeline cache
import requests
url = "https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline-caches/clear"
payload = { "path": "<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({path: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/applications/{application_id}/pipeline-caches/clear', 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-caches/clear \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"path": "<string>"
}
'{
"archives_cleared": 1,
"archive_bytes": 1,
"volumes_cleared": 1,
"volumes_deleted_after": "2023-11-07T05:31:56Z"
}Authorizations
Body
application/json
Response
What the Clear took out; zeros when nothing was left to clear.