curl --request GET \
--url 'https://cockroachlabs.cloud/api/v1/invoices?status=SOME_STRING_VALUE&start_time=SOME_STRING_VALUE&end_time=SOME_STRING_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'{
"invoices": [
{
"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>"
}Sort order: invoice start date ascending
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?status=SOME_STRING_VALUE&start_time=SOME_STRING_VALUE&end_time=SOME_STRING_VALUE' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'{
"invoices": [
{
"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.
Query Parameters
Filters the response to only include invoices with the specified status. This will be sent as a query parameter on the GET request. If not specified, both Finalized and Draft invoices will be included.
FINALIZED, DRAFT start_time filters the response to invoices whose billing period started at or after this time (inclusive). Must be in RFC3339 format (e.g., 2024-01-01T00:00:00Z). Defaults to organization creation time if omitted.
end_time filters the response to invoices whose billing period ended at or before this time (exclusive). Must be in RFC3339 format (e.g., 2024-12-31T23:59:59Z). Defaults to current time if omitted.
Response
A successful response.
invoices are sorted by period_start time.
Show child attributes
Show child attributes

