listDataBalances()
List provider data balances
Requires a JWT belonging to an active superuser or an API key owned by an active superuser, including requests using X-Impersonate-User. Returns one result per provider with recorded balances. The latest observation by observed_at is the baseline; available_bytes is that observation's balance, not a sum of purchased data. All byte amounts are decimal strings. Calculations are saved asynchronously; inspect freshness, error and calculated_at before using them. History is ordered by creation time descending and limited by PROVIDER_DATA_BALANCE_HISTORY_LIMIT (default 10). Pagination counts providers, not history entries.
Signature
client.providers.listDataBalances(options: ProvidersListDataBalancesOptions = {}): Promise<ProvidersListDataBalancesResponse>Parameters
| Name | Type | Requirement | Description |
|---|---|---|---|
limit | number | Optional | Number of results to return per page. |
offset | number | Optional | The initial index from which to return the results. |
acceptLanguage | string | Optional | Preferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English. |
Example
const result = await client.providers.listDataBalances();Returns
PaginatedProviderDataBalanceListThe operation completed successfully.
typePaginatedProviderDataBalanceList4fields
countnumbernextstringpreviousstringresultsProviderDataBalance[]typeProviderDataBalance13fields
checkpoint_idstringprovider_idstringprovider_namestringobserved_atstringavailable_bytesstringused_bytesstringremaining_bytesstringremaining_percentnumberseveritySeverityEnum | NullEnumenumSeverityEnum0fields
* `warning` - warning * `danger` - danger
No fields.
enumNullEnum0fields
No fields.
freshnessFreshnessEnumenumFreshnessEnum0fields
* `fresh` - fresh * `stale` - stale * `unavailable` - unavailable
No fields.
errorstringcalculated_atstringhistoryProviderBalanceCheckpoint[]typeProviderBalanceCheckpoint5fields
idstringavailable_bytesstringobserved_atstringcreatedstringcreated_bystringThrows
ApiErrorNormalized API, transport, and response processing failure.
kind: "validation"The request arguments or business rules are invalid.kind: "authentication"Authentication credentials are missing, expired, or invalid.kind: "permission"The authenticated account cannot perform this operation.kind: "network"The request could not reach ProxyRequest.kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
client.providers.listDataBalancesWithResponse(options): Promise<ApiResponse<ProvidersListDataBalancesResponse>>Returns response status, headers, ETag and idempotency metadata with the decoded data.
Signature
client.providers.list_data_balances(*, limit: int | Unset=UNSET, offset: int | Unset=UNSET, accept_language: str | Unset=UNSET) -> PaginatedProviderDataBalanceListawait async_client.providers.list_data_balances(*, limit: int | Unset=UNSET, offset: int | Unset=UNSET, accept_language: str | Unset=UNSET) -> PaginatedProviderDataBalanceListParameters
| Name | Type | Requirement | Description |
|---|---|---|---|
limit | int | Optional | Number of results to return per page. |
offset | int | Optional | The initial index from which to return the results. |
accept_language | str | Optional | Preferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English. |
Example
result = client.providers.list_data_balances()Async example
result = await async_client.providers.list_data_balances()Returns
PaginatedProviderDataBalanceListThe operation completed successfully.
classPaginatedProviderDataBalanceList4fields
countintresultslist[ProviderDataBalance]classProviderDataBalance13fields
checkpoint_idUUIDprovider_idstrprovider_namestrobserved_atdatetime.datetimeavailable_bytesstrused_bytesNone | strremaining_bytesNone | strremaining_percentfloat | NoneseverityNone | SeverityEnumenumSeverityEnum0fields
No fields.
freshnessFreshnessEnumenumFreshnessEnum0fields
No fields.
errorstrcalculated_atdatetime.datetime | Nonehistorylist[ProviderBalanceCheckpoint]classProviderBalanceCheckpoint5fields
idUUIDavailable_bytesstrobserved_atdatetime.datetimecreateddatetime.datetimecreated_byNone | strnext_None | strpreviousNone | strThrows
ApiErrorNormalized API, transport, and response processing failure.
ErrorKind.AUTHENTICATIONAuthentication credentials are missing, expired, or invalid.ErrorKind.PERMISSIONThe authenticated account cannot perform this operation.ErrorKind.VALIDATIONThe request arguments or business rules are invalid.ErrorKind.NETWORKThe request could not reach ProxyRequest.ErrorKind.UNEXPECTEDThe response could not be decoded or did not match the SDK contract.
Advanced variants
client.providers.list_data_balances_with_response(*, limit: int | Unset=UNSET, offset: int | Unset=UNSET, accept_language: str | Unset=UNSET) -> ApiResponse[PaginatedProviderDataBalanceList]Returns response status, headers, ETag and idempotency metadata with the decoded data.
Signature
$client->providers()->listDataBalances($limit = null, $offset = null, $acceptLanguage = null, string $contentType = self::contentTypes['listDataBalances'][0])Parameters
| Name | Type | Requirement | Description |
|---|---|---|---|
limit | int | Optional | Number of results to return per page. |
offset | int | Optional | The initial index from which to return the results. |
acceptLanguage | string | Optional | Preferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English. |
Example
$result = $client->providers()->listDataBalances();Returns
PaginatedProviderDataBalanceListThe operation completed successfully.
classPaginatedProviderDataBalanceList4fields
countintnextstringpreviousstringresults[ProviderDataBalance[]](ProviderDataBalance.md)classProviderDataBalance13fields
checkpointIdstringproviderIdstringproviderNamestringobservedAtDateTimeavailableBytesstringusedBytesstringremainingBytesstringremainingPercentfloatseveritystringfreshnessFreshnessEnumenumFreshnessEnum0fields
* `fresh` - fresh * `stale` - stale * `unavailable` - unavailable
No fields.
errorstringcalculatedAtDateTimehistory[ProviderBalanceCheckpoint[]](ProviderBalanceCheckpoint.md)classProviderBalanceCheckpoint5fields
idstringavailableBytesstringobservedAtDateTimecreatedDateTimecreatedBystringThrows
ApiExceptionNormalized API, transport, and response processing failure.
ErrorKind::AuthenticationAuthentication credentials are missing, expired, or invalid.ErrorKind::PermissionThe authenticated account cannot perform this operation.ErrorKind::ValidationThe request arguments or business rules are invalid.ErrorKind::NetworkThe request could not reach ProxyRequest.ErrorKind::UnexpectedThe response could not be decoded or did not match the SDK contract.
InvalidArgumentExceptionA required argument is missing or violates a local SDK constraint.
local validationThe request was rejected before it was sent.
Advanced variants
$client->providers()->listDataBalancesWithResponse($limit = null, $offset = null, $acceptLanguage = null, string $contentType = self::contentTypes['listDataBalances'][0]): \ProxyRequest\ApiResponseReturns an ApiResponse with decoded data and HTTP metadata.
$client->providers()->listDataBalancesWithHttpInfo($limit = null, $offset = null, $acceptLanguage = null, string $contentType = self::contentTypes['listDataBalances'][0])Returns the OpenAPI Generator response tuple.
$client->providers()->listDataBalancesAsync($limit = null, $offset = null, $acceptLanguage = null, string $contentType = self::contentTypes['listDataBalances'][0])Returns a Guzzle promise for the decoded result.
$client->providers()->listDataBalancesAsyncWithHttpInfo($limit = null, $offset = null, $acceptLanguage = null, string $contentType = self::contentTypes['listDataBalances'][0])Returns a Guzzle promise for the response tuple.
$client->providers()->listDataBalancesRequest($limit = null, $offset = null, $acceptLanguage = null, string $contentType = self::contentTypes['listDataBalances'][0])Builds the PSR-7 request without sending it.