import requests
url = "https://platform.ankra.app/api/v1/org/cloud-cost/reconciliation.csv"
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/cloud-cost/reconciliation.csv', 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/cloud-cost/reconciliation.csv \
--header 'Authorization: Bearer <token>'<string>{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}Download the provider invoice lines for a month
Every billed line of the month’s counted provider invoices as a CSV download, one row per line, for the same month and project scope as the reconciliation read and behind the same billing.read gate. Amounts stay in the provider’s currency, in minor units, credits negative. An invoice two credentials of one provider account both imported is listed once, under the credential the reconciliation counts it under. On a one-project read only the lines placed on the project’s clusters are listed. Text cells that would start a spreadsheet formula are prefixed with an apostrophe. Bearer-PAT twin of the browser route of the same name under /org.
import requests
url = "https://platform.ankra.app/api/v1/org/cloud-cost/reconciliation.csv"
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/cloud-cost/reconciliation.csv', 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/cloud-cost/reconciliation.csv \
--header 'Authorization: Bearer <token>'<string>{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
PAT organisation override.
Query Parameters
The UTC month as YYYY-MM, not in the future; the last closed month when omitted.
^[0-9]{4}-[0-9]{2}$The project to read: a project's id, or all for the whole organisation. Absent reads the caller's current project (the whole organisation while projects are off). A token pinned to a project, or a member limited to projects, may name only their own project.
Response
The month's invoice lines as an attachment named cloud-invoice-lines-YYYY-MM.csv
A header row, then one row per invoice line: month, provider, credential_id, credential_name, source, source_document_id, lines_state, line_key, category, description, external_id, external_id_kind, quantity, unit, amount_minor, currency, cluster_id, cluster_name, match_method.