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. For a caller limited to some projects, a line whose credential is outside them keeps its amount and cluster, with credential_id, credential_name and source_document_id empty and credential_outside_projects true. 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
Query Parameters
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, credential_outside_projects.