cURL
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",
"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>"
}Get a specific invoice for an organization
Can be used by the following roles assigned at the organization scope:
- BILLING_COORDINATOR
- CLUSTER_ADMIN
GET
/
api
/
v1
/
invoices
/
{invoice_id}
cURL
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",
"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
Path Parameters
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.

