{
"summary": "Get organization active prepaid balances",
"description": "**This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns the active prepaid credit balances for the organization, each with its own balance ID and remaining credits, along with the total remaining credits across all active balances. A balance is active when it has started, has not expired, and has credits remaining. Balances are ordered by expiration date, soonest first, and the returned page is capped at `limit` (default and maximum 100). When `totalCount` exceeds the number of returned balances, page with `limit`/`offset` to retrieve them all. `totalRemainingPrepaidCredits` always covers every active balance, not just the returned page.",
"operationId": "activeBalancesGet",
"parameters": [
{
"in": "path",
"name": "organizationId",
"description": "ID of the requested organization.",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
},
{
"in": "query",
"name": "limit",
"description": "Maximum number of results to return.",
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"default": 100
}
},
{
"in": "query",
"name": "offset",
"description": "Number of results to skip before returning.",
"schema": {
"type": "integer",
"minimum": 0,
"default": 0
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "number",
"description": "HTTP status code.",
"example": 200
},
"requestId": {
"type": "string",
"description": "Unique id assigned to every request. UUIDv4",
"format": "uuid"
},
"result": {
"$ref": "#/components/schemas/ActiveBalances"
}
}
}
}
}
},
"400": {
"description": "The request cannot be processed due to a client error. Please verify your request parameters and try again.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "number",
"description": "HTTP status code.",
"example": 400
},
"error": {
"type": "string",
"description": "Detailed error description."
},
"requestId": {
"type": "string",
"description": "Unique id assigned to every request. UUIDv4",
"format": "uuid"
}
}
}
}
}
},
"500": {
"description": "An internal server error has occurred. If this issue persists, please contact ClickHouse Cloud support for assistance.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "HTTP status code.",
"example": 500
},
"error": {
"type": "string",
"description": "Detailed error description."
},
"requestId": {
"type": "string",
"description": "Unique id assigned to every request. UUIDv4",
"format": "uuid"
}
}
}
}
}
}
},
"tags": [
"Billing"
],
"x-badges": [
{
"name": "Beta",
"position": "after"
}
]
}
The live ClickHouse Cloud OpenAPI spec has drifted from the Rust API library.
The comparison was produced by the shared
syn-based analyzer.https://api.clickhouse.cloud/v1crates/clickhouse-cloud-api/src/client.rscrates/clickhouse-cloud-api/src/models.rscrates/clickhouse-openapi-analyzerSummary
Missing Client Methods
active_balances_getGET
/v1/organizations/{organizationId}/activeBalancesOperation spec JSON
{ "summary": "Get organization active prepaid balances", "description": "**This endpoint is in beta.** API contract is stable, and no breaking changes are expected in the future. <br /><br /> Returns the active prepaid credit balances for the organization, each with its own balance ID and remaining credits, along with the total remaining credits across all active balances. A balance is active when it has started, has not expired, and has credits remaining. Balances are ordered by expiration date, soonest first, and the returned page is capped at `limit` (default and maximum 100). When `totalCount` exceeds the number of returned balances, page with `limit`/`offset` to retrieve them all. `totalRemainingPrepaidCredits` always covers every active balance, not just the returned page.", "operationId": "activeBalancesGet", "parameters": [ { "in": "path", "name": "organizationId", "description": "ID of the requested organization.", "required": true, "schema": { "type": "string", "format": "uuid" } }, { "in": "query", "name": "limit", "description": "Maximum number of results to return.", "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 100 } }, { "in": "query", "name": "offset", "description": "Number of results to skip before returning.", "schema": { "type": "integer", "minimum": 0, "default": 0 } } ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "number", "description": "HTTP status code.", "example": 200 }, "requestId": { "type": "string", "description": "Unique id assigned to every request. UUIDv4", "format": "uuid" }, "result": { "$ref": "#/components/schemas/ActiveBalances" } } } } } }, "400": { "description": "The request cannot be processed due to a client error. Please verify your request parameters and try again.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "number", "description": "HTTP status code.", "example": 400 }, "error": { "type": "string", "description": "Detailed error description." }, "requestId": { "type": "string", "description": "Unique id assigned to every request. UUIDv4", "format": "uuid" } } } } } }, "500": { "description": "An internal server error has occurred. If this issue persists, please contact ClickHouse Cloud support for assistance.", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "integer", "description": "HTTP status code.", "example": 500 }, "error": { "type": "string", "description": "Detailed error description." }, "requestId": { "type": "string", "description": "Unique id assigned to every request. UUIDv4", "format": "uuid" } } } } } } }, "tags": [ "Billing" ], "x-badges": [ { "name": "Beta", "position": "after" } ] }Missing Struct Fields
/components/schemas/ClickPipeSettings/properties/kafka_read_committed— ClickPipeSettings.kafka_read_committed is missing from models.rs/components/schemas/ClickPipeSettingsPutRequest/properties/kafka_read_committed— ClickPipeSettingsPutRequest.kafka_read_committed is missing from models.rs/components/schemas/ClickPipeSettings/properties/kafka_read_committed— ClickPipeSettingsResponse.kafka_read_committed is missing from models.rs/components/schemas/Udf/properties/memoryLimitMib— Udf.memoryLimitMib is missing from models.rsMissing Enum Values
/components/schemas/OrganizationQuota/properties/quotaCode— OrganizationQuotaQuotacode has no variant for wire value "api-keys-per-organization"Newly Beta Operations
/paths/~1v1~1organizations~1{organizationId}~1activeBalances/get— active_balances_get is Beta in the spec but absent from BETA_OPERATIONSNew Operations Missing From Snapshot
/paths/~1v1~1organizations~1{organizationId}~1activeBalances/get— operation active_balances_get is present in the target spec but absent from the snapshotNew Schemas Missing From Snapshot
/components/schemas/ActiveBalance— schema ActiveBalance is present in the target spec but absent from the snapshot/components/schemas/ActiveBalances— schema ActiveBalances is present in the target spec but absent from the snapshotMissing Model Types
ActiveBalance(spec:ActiveBalance)Schema JSON
{ "properties": { "id": { "description": "Unique ID of the prepaid balance.", "type": "string", "format": "uuid" }, "remainingPrepaidCredits": { "description": "Remaining credits available on this balance, in ClickHouse Credits (CHCs).", "type": "number" }, "totalAmount": { "description": "Total credits granted on this balance, in ClickHouse Credits (CHCs).", "type": "number" }, "amountSpent": { "description": "Credits spent from this balance, in ClickHouse Credits (CHCs).", "type": "number" }, "startDate": { "description": "Date the balance became active. ISO-8601, based on the UTC timezone.", "type": "string", "format": "date-time" }, "expirationDate": { "description": "Date the balance expires. ISO-8601, based on the UTC timezone.", "type": "string", "format": "date-time" } } }ActiveBalances(spec:ActiveBalances)Schema JSON
{ "properties": { "totalRemainingPrepaidCredits": { "description": "Total remaining credits across all active prepaid balances, in ClickHouse Credits (CHCs).", "type": "number" }, "prepaidBalances": { "type": "array", "description": "List of active prepaid balances for the organization.", "items": { "$ref": "#/components/schemas/ActiveBalance" } } } }Acknowledged Unsupported Enum Constraints
These locations are inventoried but cannot yet be compared to a typed Rust value enum.
They do not count as drift; new or stale locations do.
/components/schemas/ApiKey/properties/roles/items(models.rs::ApiKey::roles) — Rust type String is not an enum/components/schemas/ApiKeyPatchRequest/properties/roles/items(models.rs::ApiKeyPatchRequest::roles) — Rust type String is not an enum/components/schemas/ApiKeyPostRequest/properties/roles/items(models.rs::ApiKeyPostRequest::roles) — Rust type String is not an enum/components/schemas/ByocInfrastructurePostRequest/properties/availabilityZoneSuffixes/items(models.rs::ByocInfrastructurePostRequest::availability_zone_suffixes) — Rust type String is not an enum/components/schemas/InstanceServiceQueryApiEndpointsPostRequest/properties/roles/items(models.rs::InstanceServiceQueryApiEndpointsPostRequest::roles) — Rust type String is not an enum/components/schemas/ServiceQueryAPIEndpoint/properties/roles/items(models.rs::ServiceQueryAPIEndpoint::roles) — Rust type String is not an enum/components/schemas/UpgradeWindow/properties/duration(models.rs::UpgradeWindow::duration) — numeric enum constraints cannot be represented by Rust unit variants/components/schemas/UpgradeWindow/properties/startHourUtc(models.rs::UpgradeWindow::start_hour_utc) — numeric enum constraints cannot be represented by Rust unit variants/components/schemas/UpgradeWindowPutRequest/properties/startHourUtc(models.rs::UpgradeWindowPutRequest::start_hour_utc) — numeric enum constraints cannot be represented by Rust unit variants/paths/~1v1~1organizations~1{organizationId}~1postgres~1{postgresId}~1slowQueryPatterns/get/parameters/8/schema(client.rs::Client::slow_query_patterns_get_list::sort_by) — Rust type str is not an enum/paths/~1v1~1organizations~1{organizationId}~1postgres~1{postgresId}~1slowQueryPatterns/get/parameters/9/schema(client.rs::Client::slow_query_patterns_get_list::sort_order) — Rust type str is not an enum/paths/~1v1~1organizations~1{organizationId}~1udfs~1{functionName}~1attachments~1{serviceId}/put/responses/424/content/application~1json/schema/properties/code— enum location cannot be mapped to a concrete Rust item/paths/~1v1~1organizations~1{organizationId}~1udfs~1{functionName}~1attachments~1{serviceId}/put/responses/424/content/application~1json/schema/properties/serviceState— enum location cannot be mapped to a concrete Rust itemImplementation Guide
crates/clickhouse-cloud-api/clickhouse_cloud_openapi.jsonwith this same live document; do not hand-edit it.spec_pointerandrust_itemto updateclient.rs,models.rs, ormeta.rs.crates/clickhouse-openapi-analyzer/src/config.rsonly for a deliberate, documented divergence. New unsupported acknowledgements require a tracking issue.AGENTS.mdfor the exact commands.