import requests
url = "https://platform.ankra.app/api/v1/org/cloud-cost/reconciliation"
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', 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 \
--header 'Authorization: Bearer <token>'{
"month": "<string>",
"month_closed": true,
"period_hours": 123,
"generated_at": "2023-11-07T05:31:56Z",
"credentials": [
{
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credential_name": "<string>",
"provider": "<string>",
"state": "absent",
"imports": [
{
"source": "api",
"source_document_id": "<string>",
"state": "complete",
"lines_state": "complete",
"reason": "<string>",
"currency": "<string>",
"line_count": 123,
"attempted_at": "2023-11-07T05:31:56Z",
"succeeded_at": "2023-11-07T05:31:56Z"
}
],
"currency": "<string>",
"currencies_mixed": true,
"invoice_minor": 123,
"tax_minor": 123,
"credit_minor": 123,
"matched_minor": 123,
"unmatched_minor": 123,
"estimate_minor": 123,
"estimate_complete": true,
"estimate_fx": {
"from": "<string>",
"to": "<string>",
"rate_from_usd": 123,
"as_of": "2023-11-07T05:31:56Z"
},
"difference_pct": 123,
"difference_reason": "<string>",
"unplaced_priced_minor": 123,
"difference_caveat": "<string>",
"clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"invoice_minor": 123,
"line_count": 123,
"estimate_minor": 123,
"metered_hours": 123,
"lifetime_hours": 123,
"period_hours": 123
}
],
"unmatched_lines": [
{
"line_key": "<string>",
"external_id": "<string>",
"external_id_kind": "<string>",
"category": "<string>",
"description": "<string>",
"amount_minor": 123,
"currency": "<string>"
}
],
"unmatched_line_count": 123,
"unmatched_truncated": true
}
]
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}Get the provider invoice reconciliation for a month (bearer twin)
What each cloud credential’s provider billed for a month against what the metering estimated for the same clusters. Lines stay in the provider’s currency; the estimate is converted at the stated rate. A credential with no imported document is absent, a failed import says so, a line nothing places on a cluster is listed with its amount, and a difference is stated only when the provider’s figures are final and the estimate covers every hour of the month for every cluster the invoice names. 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"
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', 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 \
--header 'Authorization: Bearer <token>'{
"month": "<string>",
"month_closed": true,
"period_hours": 123,
"generated_at": "2023-11-07T05:31:56Z",
"credentials": [
{
"credential_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"credential_name": "<string>",
"provider": "<string>",
"state": "absent",
"imports": [
{
"source": "api",
"source_document_id": "<string>",
"state": "complete",
"lines_state": "complete",
"reason": "<string>",
"currency": "<string>",
"line_count": 123,
"attempted_at": "2023-11-07T05:31:56Z",
"succeeded_at": "2023-11-07T05:31:56Z"
}
],
"currency": "<string>",
"currencies_mixed": true,
"invoice_minor": 123,
"tax_minor": 123,
"credit_minor": 123,
"matched_minor": 123,
"unmatched_minor": 123,
"estimate_minor": 123,
"estimate_complete": true,
"estimate_fx": {
"from": "<string>",
"to": "<string>",
"rate_from_usd": 123,
"as_of": "2023-11-07T05:31:56Z"
},
"difference_pct": 123,
"difference_reason": "<string>",
"unplaced_priced_minor": 123,
"difference_caveat": "<string>",
"clusters": [
{
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cluster_name": "<string>",
"invoice_minor": 123,
"line_count": 123,
"estimate_minor": 123,
"metered_hours": 123,
"lifetime_hours": 123,
"period_hours": 123
}
],
"unmatched_lines": [
{
"line_key": "<string>",
"external_id": "<string>",
"external_id_kind": "<string>",
"category": "<string>",
"description": "<string>",
"amount_minor": 123,
"currency": "<string>"
}
],
"unmatched_line_count": 123,
"unmatched_truncated": true
}
]
}{
"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}$Response
Successful response
Per cloud credential and UTC month, what the provider billed (imported invoice lines, in the provider's own currency) against what the metering estimated for the clusters those lines are placed on. Nothing unknown reads as agreement.