Query Group Master Account Resource Overview
Interface Description
Use the group master account credentials to query the current group's live streaming resources, video-on-demand (VOD) storage, and VOD traffic. The interface only returns resource statistics fields and does not return appSecret, VOD keys, or read/write tokens.
Interface URL
https://api.polyv.net/live/v4/group/account/resource/overview/get
Request Method
GET
Request Parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| appId | true | String | Group master account appId |
| timestamp | true | Long | Current 13-digit millisecond timestamp, valid within 3 minutes |
| sign | true | String | 32-digit uppercase MD5 signature generated using the group master account appSecret. See Signature Generation Rules |
appId The associated group account is determined by gateway authentication. The interface does not accept the groupId parameter and cannot query other group accounts.
Request Example
https://api.polyv.net/live/v4/group/account/resource/overview/get?appId=g8dtv537aq×tamp=1753171200000&sign=6C95C3A3E93D46A78A86DCDB8930D70A
Statistical Methodology
Resource items are returned based on resourceCode. Resource values are snapshots at the current point in time:
| Field | Methodology |
|---|---|
| totalAmount | Total resource amount of active packages; summed across multiple packages |
| usedAmount | Actual resource consumption by the group master account; cumulative concurrency and parallel concurrency do not provide real-time used concurrency, returns null |
| mainAccountAvailableAmount | Current remaining available amount for the group master account. Shared resources are totalAmount - usedAmount; concurrency is the current package concurrency limit |
| allocatedAmount | Amount allocated to sub-accounts, occupying the group public resource pool, calculated as max(0, mainAccountAvailableAmount - groupPoolAssignableAmount) |
| groupPoolAssignableAmount | Current remaining allocatable amount in the group public resource pool, after deducting sub-account allocations |
The original unit for storage and traffic settlement is bytes. The interface converts uniformly to GB. MINUTE, CONCURRENT are integer units, GB can include decimals.
For minute-based live streaming resources, mainAccountAvailableAmount uses the same real-time available amount query methodology as minutes in the group backend's GroupAccountServiceApi.getGroupAccountInfo; totalAmount is the cumulative minute resource top-up, usedAmount = max(0, totalAmount - mainAccountAvailableAmount).
allocationDataUpdatedAt is the update time for the sub-account quota summary. This summary is asynchronous, and data latency is determined by the difference between this field and dataUpdatedAt; total and used resource amounts use the same settlement methodology as the group backend overview at the same point in time.
Response Fields
| Parameter | Type | Description |
|---|---|---|
| code | Integer | HTTP-style status code, 200 for success |
| status | String | success or error |
| success | Boolean | Whether the request was successful |
| requestId | String | Unique request identifier for troubleshooting |
| data | Object | Resource overview |
Data Fields
| Parameter | Type | Description |
|---|---|---|
| groupId | String | Current group account identifier |
| dataUpdatedAt | Long | Main resource data read time, 13-digit millisecond timestamp |
| resources | Array | List of resource items |
Resources Fields
| Parameter | Type | Description |
|---|---|---|
| product | String | Product: LIVE, VOD, ACCOUNT |
| resourceCode | String | Resource: LIVE_DURATION, LIVE_CONCURRENT, VOD_SPACE, VOD_TRAFFIC, BALANCE |
| billingPlan | String | Billing type: DURATION, TOTAL_CONCURRENT, PARALLEL_CONCURRENT, SPACE, TRAFFIC, AMOUNT |
| unit | String | Unit: MINUTE, CONCURRENT, GB, CNY |
| allocationMode | String | Resource ownership: SHARED_POOL for group public resource pool, PER_ACCOUNT_CAP for per sub-account concurrency limit |
| state | String | Resource status, see Resource Status |
| packageStartAt | Long | Package effective time, 13-digit millisecond timestamp |
| packageEndAt | Long | Package expiration time, 13-digit millisecond timestamp; consistent with group account overview, unified to expiration date 23:59:59 |
| totalAmount | Decimal | Total resource amount |
| usedAmount | Decimal | Actual usage amount; returns null when real-time usage is unavailable |
| allocatedAmount | Decimal | Amount allocated to sub-accounts, only returned for SHARED_POOL |
| mainAccountAvailableAmount | Decimal | Current remaining available amount for the group master account |
| groupPoolAssignableAmount | Decimal | Remaining allocatable amount in the group public resource pool, only returned for SHARED_POOL |
| perAccountMaxAmount | Decimal | Maximum amount settable for a single sub-account, only returned for PER_ACCOUNT_CAP |
| availableDepositAmount | Decimal | Available top-up amount, only returned for BALANCE, unit is yuan |
| availableDonateAmount | Decimal | Available donation amount (including test amount), only returned for BALANCE, unit is yuan |
| frozenAmount | Decimal | Frozen amount, only returned for BALANCE, unit is yuan |
| availableCreditAmount | Decimal | Available credit amount, only returned for BALANCE, unit is yuan |
| totalCreditAmount | Decimal | Total credit amount, only returned for BALANCE, unit is yuan |
| pendingPaymentAmount | Decimal | Pending payment amount, only returned for BALANCE, unit is yuan |
| allocationDataUpdatedAt | Long | Sub-account allocated amount summary time, 13-digit millisecond timestamp |
When resourceCode is BALANCE, totalAmount is the sum of cumulative top-up amount and cumulative donation amount, mainAccountAvailableAmount is the available balance, groupPoolAssignableAmount is the current amount allocatable to sub-accounts. Financial accounting includes independent transactions such as refunds, freezes, and credits; usedAmount does not provide cumulative derived values and is fixed at null.
Resource Status
| state | Description | Numeric Fields |
|---|---|---|
| ACTIVE | Package is valid, resources can be queried | Returned based on resource type |
| NO_PACKAGE | No corresponding package configured | All are null |
| EXPIRED | Corresponding package has expired | All are null |
| DATA_PENDING | Main resources have been read, but sub-account quota summary not yet generated | Total, used, and main account remaining available amounts are returned; allocated and remaining allocatable are null |
| UNLIMITED | Package resources are unlimited | All are null |
| UNSUPPORTED | Current group live streaming billing type is not minute-based, cumulative concurrency, or parallel concurrency | All are null |
When resources are unlimited, the resource item is still returned and state is UNLIMITED, numeric fields are null; 0 is not used to indicate unlimited.
Java Call Example
String appId = "yourGroupAppId";
String appSecret = "yourGroupAppSecret";
String timestamp = String.valueOf(System.currentTimeMillis());
String url = "https://api.polyv.net/live/v4/group/account/resource/overview/get";
Map<String, String> requestMap = new HashMap<>();
requestMap.put("appId", appId);
requestMap.put("timestamp", timestamp);
requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
String response = HttpUtil.get(url, requestMap);
Response Example
{
"code": 200,
"status": "success",
"success": true,
"data": {
"groupId": "group-123",
"dataUpdatedAt": 1753171200123,
"resources": [
{
"product": "ACCOUNT",
"resourceCode": "BALANCE",
"billingPlan": "AMOUNT",
"unit": "CNY",
"allocationMode": "SHARED_POOL",
"state": "ACTIVE",
"totalAmount": 1000.00,
"usedAmount": null,
"allocatedAmount": 300.00,
"mainAccountAvailableAmount": 800.00,
"groupPoolAssignableAmount": 500.00,
"availableDepositAmount": 700.00,
"availableDonateAmount": 100.00,
"frozenAmount": 20.00,
"availableCreditAmount": 0.00,
"totalCreditAmount": 0.00,
"pendingPaymentAmount": 0.00,
"allocationDataUpdatedAt": 1753171199000
},
{
"product": "LIVE",
"resourceCode": "LIVE_DURATION",
"billingPlan": "DURATION",
"unit": "MINUTE",
"allocationMode": "SHARED_POOL",
"state": "ACTIVE",
"packageStartAt": 1751328000000,
"packageEndAt": 1754006400000,
"totalAmount": 10000,
"usedAmount": 2000,
"allocatedAmount": 3000,
"mainAccountAvailableAmount": 8000,
"groupPoolAssignableAmount": 5000,
"allocationDataUpdatedAt": 1753171199000
},
{
"product": "VOD",
"resourceCode": "VOD_SPACE",
"billingPlan": "SPACE",
"unit": "GB",
"allocationMode": "SHARED_POOL",
"state": "ACTIVE",
"totalAmount": 1000.00,
"usedAmount": 120.50,
"allocatedAmount": 300.00,
"mainAccountAvailableAmount": 879.50,
"groupPoolAssignableAmount": 579.50,
"allocationDataUpdatedAt": 1753171199000
}
]
}
}
Error Codes
For common authentication, signature, and timestamp errors, please refer to Global Error Description. When downstream resource services are unavailable, the interface returns a standard failure response and does not return resource snapshots.
