Query Allocation Records of Sub-Accounts - Group Account 1.0
Updated: 2023-05-04 18:46:13
API Description
1、查询集团账号给分账号的分配记录
2、接口支持https协议
API URL
http://api.polyv.net/v2/group/account/list-allocate-log
Request Method
GET
API Constraints
- The API supports both HTTP and HTTPS. HTTPS is recommended to ensure API security. API calls have frequency limits. See details
Request Parameter Description
| Parameter | Required | Type | Description |
|---|---|---|---|
| appId | true | String | Group master account appId See Group Account 2.0 Get Secret Key |
| timestamp | true | Long | Current 13-digit millisecond timestamp, valid for 3 minutes |
| sign | true | String | Signature, a 32-character uppercase MD5 value. The appSecret key used to generate the signature is critical for communication data security. It must not be stored or used directly on the client. All APIs must be called through the customer's own server to relay requests to the POLYV server for response data. See Signature Generation Rules |
| emails | true | String | Sub-account emails, multiple separated by commas |
| type | false | String | Type of allocation records to query. all includes both VOD and live, live, vod |
| startTime | false | String | Start time for querying records, format: yyyy-MM-dd HH:mm:ss |
| endTime | false | String | End time for querying records, format: yyyy-MM-dd HH:mm:ss |
| page | false | Integer | Requested page number |
| pageSize | false | Integer | Page size |
Example
Response Parameter Description
| Parameter | Type | Description |
|---|---|---|
| code | Integer | Response status code. 200 indicates success, non-200 indicates failure See Global Error Description |
| status | String | Response status text |
| message | String | Response description. When code is 400 or 500, provides auxiliary error description |
| data | String | Paginated data See Data Field Description |
Data Parameter Description
| Parameter | Type | Description |
|---|---|---|
| pageNumber | Integer | Current page number |
| totalPages | Integer | Total number of pages |
| pageSize | Integer | Page size |
| contents | Array | Paginated data See Content Field Description |
Content Parameter Description
| Parameter | Type | Description |
|---|---|---|
| String | Sub-account email | |
| date | String | Allocation record time |
| origin | String | Source |
| originText | String | Source description |
| space | String | Added VOD space, in bytes |
| flow | String | Added VOD traffic, in bytes |
| channels | String | Channel allocation value |
| concurrences | Integer | Concurrent connection allocation value |
| duration | String | Duration allocation value |
PHP Request Example
<?php
//引用config-group.php
include 'config-group.php';
$params = array(
'appId' => $appId,
'timestamp' => $timestamp,
'sign' => $sign,
'emails' => 'testdata@polyv.com'
);
//生成sign
$sign = getSign($params); //详细查看config.php文件的getSign方法
$params['sign'] = $sign;
$url = "https://api.polyv.net/v2/group/account/list-allocate-log?".http_build_query($params);
$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 500);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, 0);
$res = curl_exec($curl);
curl_close($curl);
echo $res;
?>
Response Example
Success Example
{
"code": 200,
"status": "success",
"message": "success",
"data": {
"pageNumber": 1,
"totalPages": 11,
"pageSize": 1,
"contents": [
{
"email": "testdata@polyv.com",
"date": "2019-11-18 18:21:38",
"origin": "ADD_CONCURRENCES",
"originText": "添加并发数",
"space": null,
"flow": null,
"channels": null,
"concurrences": 970,
"duration": null
}
],
"totalItems": 11
}
}
Error Example
{
"code": 403,
"status": "error",
"message": "invalid signature.",
"data": ""
}
