curl --request GET \
--url https://cockroachlabs.cloud/api/v1/invoices/{invoice_id} \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'{
"balances": [
{
"amount": 123,
"currency": "USD"
}
],
"invoice_id": "<string>",
"invoice_items": [
{
"cluster": {
"account_id": "",
"cidr_range": "172.28.0.0/14",
"cloud_provider": "GCP",
"cockroach_version": "v21.2.4",
"config": {
"serverless": {
"routing_id": "example-cluster-1533",
"upgrade_type": "AUTOMATIC",
"usage_limits": {
"provisioned_virtual_cpus": "2"
}
}
},
"created_at": "2022-03-22T20:23:11.285067Z",
"creator_id": "7cde0cd9-0d8a-4008-8f90-45092ce8afc1",
"id": "35c4abb2-bb66-46d7-afed-25ebef5ed2aa",
"is_customer_cloud_account": false,
"labels": {
"cost_center": "12345",
"env": "prod"
},
"name": "example-cluster",
"operation_status": "UNSPECIFIED",
"plan": "STANDARD",
"regions": [
{
"internal_dns": "internal-free-tier7.gcp-us-central1.crdb.io",
"name": "us-central1",
"node_count": 0,
"private_endpoint_dns": "private-free-tier7.gcp-us-central1.crdb.io",
"sql_dns": "free-tier7.gcp-us-central1.crdb.io",
"ui_dns": ""
}
],
"state": "CREATED",
"updated_at": "2022-03-22T20:23:11.879593Z",
"upgrade_status": "UPGRADE_AVAILABLE"
},
"line_items": [
{
"description": "<string>",
"quantity": 123,
"quantity_unit": "HOURS",
"total": {
"amount": 123,
"currency": "USD"
},
"unit_cost": 123
}
],
"totals": [
{
"amount": 123,
"currency": "USD"
}
]
}
],
"period_end": "2023-11-07T05:31:56Z",
"period_start": "2023-11-07T05:31:56Z",
"totals": [
{
"amount": 123,
"currency": "USD"
}
],
"adjustments": [
{
"amount": {
"amount": 123,
"currency": "USD"
},
"name": "<string>"
}
],
"folder_resources": [
{
"labels": {},
"name": "<string>",
"organization_id": "<string>",
"parent_id": "<string>",
"path": [
{
"id": "<string>",
"name": "<string>"
}
],
"resource_id": "<string>",
"resource_type": "FOLDER"
}
],
"status": "FINALIZED"
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Can be used by the following roles assigned at the organization scope:
- BILLING_COORDINATOR
- CLUSTER_ADMIN
curl --request GET \
--url https://cockroachlabs.cloud/api/v1/invoices/{invoice_id} \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'{
"balances": [
{
"amount": 123,
"currency": "USD"
}
],
"invoice_id": "<string>",
"invoice_items": [
{
"cluster": {
"account_id": "",
"cidr_range": "172.28.0.0/14",
"cloud_provider": "GCP",
"cockroach_version": "v21.2.4",
"config": {
"serverless": {
"routing_id": "example-cluster-1533",
"upgrade_type": "AUTOMATIC",
"usage_limits": {
"provisioned_virtual_cpus": "2"
}
}
},
"created_at": "2022-03-22T20:23:11.285067Z",
"creator_id": "7cde0cd9-0d8a-4008-8f90-45092ce8afc1",
"id": "35c4abb2-bb66-46d7-afed-25ebef5ed2aa",
"is_customer_cloud_account": false,
"labels": {
"cost_center": "12345",
"env": "prod"
},
"name": "example-cluster",
"operation_status": "UNSPECIFIED",
"plan": "STANDARD",
"regions": [
{
"internal_dns": "internal-free-tier7.gcp-us-central1.crdb.io",
"name": "us-central1",
"node_count": 0,
"private_endpoint_dns": "private-free-tier7.gcp-us-central1.crdb.io",
"sql_dns": "free-tier7.gcp-us-central1.crdb.io",
"ui_dns": ""
}
],
"state": "CREATED",
"updated_at": "2022-03-22T20:23:11.879593Z",
"upgrade_status": "UPGRADE_AVAILABLE"
},
"line_items": [
{
"description": "<string>",
"quantity": 123,
"quantity_unit": "HOURS",
"total": {
"amount": 123,
"currency": "USD"
},
"unit_cost": 123
}
],
"totals": [
{
"amount": 123,
"currency": "USD"
}
]
}
],
"period_end": "2023-11-07T05:31:56Z",
"period_start": "2023-11-07T05:31:56Z",
"totals": [
{
"amount": 123,
"currency": "USD"
}
],
"adjustments": [
{
"amount": {
"amount": 123,
"currency": "USD"
},
"name": "<string>"
}
],
"folder_resources": [
{
"labels": {},
"name": "<string>",
"organization_id": "<string>",
"parent_id": "<string>",
"path": [
{
"id": "<string>",
"name": "<string>"
}
],
"resource_id": "<string>",
"resource_type": "FOLDER"
}
],
"status": "FINALIZED"
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
invoice_id is the unique ID representing the invoice. invoice_id is used to retrieve a specific billing period's invoice.
Response
A successful response.
Invoice message represents the details and the total charges associated with one billing period, which starts at the beginning of the month and ends at the beginning of the next month.
The message also includes details about each invoice item.
balances are the amounts of currency left at the time of the invoice.
Show child attributes
Show child attributes
invoice_id is the unique ID representing the invoice.
invoice_items are sorted by the cluster name.
Show child attributes
Show child attributes
period_end is the end of the billing period (exclusive).
period_start is the start of the billing period (inclusive).
totals is a list of the total amounts per currency.
Show child attributes
Show child attributes
adjustments is a list of credits or costs that adjust the value of the invoice (e.g. a Serverless Free Credit or Premium Support adjustment). Unlike line items, adjustments are not tied to a particular cluster.
Show child attributes
Show child attributes
Preview: FolderResources is a list of resources in the organization and their folder paths.
Show child attributes
Show child attributes
FINALIZED, DRAFT 
