Get a repository's committed route census
import requests
url = "https://platform.ankra.app/api/v1/org/pipeline-repositories/{repository_id}/route-census"
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/pipeline-repositories/{repository_id}/route-census', 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/pipeline-repositories/{repository_id}/route-census \
--header 'Authorization: Bearer <token>'{
"repository_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"branch": "<string>",
"commit_sha": "<string>",
"path": "<string>",
"routes": [
{
"method": "<string>",
"path": "<string>",
"package": "<string>"
}
],
"read_at": "2023-11-07T05:31:56Z"
}Pipelines
Get a repository's committed route census
The routes.json the pipeline repository commits at the head of its default branch, read from the repository’s host at that commit, with the commit it was read at. One fixed file, not a general file read; GitHub repositories only. Requires pipelines.read. Read-only.
GET
/
api
/
v1
/
org
/
pipeline-repositories
/
{repository_id}
/
route-census
Get a repository's committed route census
import requests
url = "https://platform.ankra.app/api/v1/org/pipeline-repositories/{repository_id}/route-census"
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/pipeline-repositories/{repository_id}/route-census', 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/pipeline-repositories/{repository_id}/route-census \
--header 'Authorization: Bearer <token>'{
"repository_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"branch": "<string>",
"commit_sha": "<string>",
"path": "<string>",
"routes": [
{
"method": "<string>",
"path": "<string>",
"package": "<string>"
}
],
"read_at": "2023-11-07T05:31:56Z"
}Authorizations
Response
The committed census and its commit.
The routes.json a repository commits at the head of its default branch, with the commit it was read at.