Polyv Help Center

Help Center

Query Channel Video Review Record List

Updated: 2024-04-22 19:18:32

API Description

1、查询频道场次审核记录列表
2、接口支持https协议

API URL

http://api.polyv.net/live/v4/channel/video-moderation/result/list

Online API Call

Request Method

GET

API Constraints

  1. The API supports both HTTP and HTTPS. HTTPS is recommended for security. API calls have frequency limits. See details

Request Parameter Description

Parameter Required Type Description
appId true String Account appId [See Get Secret Key]
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 saved or used directly on the client side. 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]
timestamp true String Current 13-digit millisecond timestamp, valid for 3 minutes
channelId true String Channel ID
label false String Recognition type. Normal: Normal, Porn: Pornography, Abuse: Abuse, Ad: Advertisement, Custom: Custom violation; Badword: Custom prohibited word; Illegal: Violation; Polity: Political; Moan: Moaning; Terror: Terrorism; Religion: Religion; Sexy: Sexy; Teenager: Teenager; Copyright: Copyright. Multiple values separated by commas.
pageNumber false String Current page number
pageSize false String Page size, default 10, maximum 1000
resultType false String Result type. 1: Approved, 2: Violation, 3: Suspected. Multiple values separated by commas.
sessionId false String Channel session ID

Example

http://api.polyv.net/live/v4/channel/video-moderation/result/list?pageNumber=1&appId=gga9dadhzm&sign=612561DF5502DD76CE1B760EB2B907BA&pageSize=20&label=&sessionId=gj4z866us3&resultType=&channelId=3775168&timestamp=1679622317653

Response Parameter Description

Parameter Type Description
code Integer Status code, same as HTTP status code, used to determine the basic response status
data Object [See Data Parameter Description]
error Object Error information when status code is not 200 [See Error Parameter Description]
requestId String Request ID, a unique UUID generated for each request, only for troubleshooting and debugging, should not be tied to business logic
status String Response result, determined by business logic. Returns success on success, error on failure
success Boolean Whether the response was successful

Data Parameter Description

Parameter Type Description
contents Array Paginated data collection [See Contents Parameter Description]
pageNumber Integer Current page number
pageSize Integer Page size
totalItems Integer Total number of records
totalPages Integer Total number of pages

Contents Parameter Description

Parameter Type Description
channelId Integer Channel ID
createTime String Review time
id Integer Primary key ID
imageUrl String Image URL
label String Recognition type. Normal: Normal, Porn: Pornography, Abuse: Abuse, Ad: Advertisement, Custom: Custom violation; Badword: Custom prohibited word; Illegal: Violation; Polity: Political; Moan: Moaning; Terror: Terrorism; Religion: Religion; Sexy: Sexy; Teenager: Teenager; Copyright: Copyright. Multiple values separated by commas.
labelDesc String Recognition type description
moderationStrategyDesc String Strategy description
ocrKeyword String OCR keyword
ocrText String OCR text
politicalName String Political figure name
resultType Integer Review result (1: Approved, 2: Violation, 3: Suspected)
resultTypeDesc String Review result description
sessionId String Session ID
taskId Integer Task ID
userId String POLYV user ID, same as on the Polyv official website. Access path: Official website -> Login -> Live Streaming (Development Settings)

Error Parameter Description

Parameter Type Description
code Integer Error code, used to determine the specific error reason
desc String Error description, corresponding to error.code

Java Request Example

For quick integration of basic code, please download the relevant dependency source code. Click here to download the source code. After downloading, add it to your own source code project. HttpUtil.java and LiveSignUtil.java in the test cases are included in the downloaded file.

It is strongly recommended to use the Live Java SDK for API integration. The Live Java SDK provides unified encapsulation and optimization for API call logic, exception handling, data signing, and HTTP request thread pools.

private static final Logger log = LoggerFactory.getLogger(getClass());
/**
 * 查询频道场次审核记录列表
 * @throws IOException
 * @throws NoSuchAlgorithmException
 */

@Test
public void resultListTest() throws IOException, NoSuchAlgorithmException {
    //公共参数,填写自己的实际参数
    String appId = super.appId;
    String appSecret = super.appSecret;
    String timestamp = String.valueOf(System.currentTimeMillis());
    
    //业务参数
    String url = "http://api.polyv.net/live/v4/channel/video-moderation/result/list";
    String channelId = "3775168";
    String label = "";
    String pageNumber = "1";
    String pageSize = "20";
    String resultType = "";
    String sessionId = "gj4z866us3";
    
    //http 调用逻辑
    Map<String, String> requestMap = new HashMap<>();
    requestMap.put("appId", appId);
    requestMap.put("timestamp", timestamp);
    requestMap.put("channelId", channelId);
    requestMap.put("label", label);
    requestMap.put("pageNumber", pageNumber);
    requestMap.put("pageSize", pageSize);
    requestMap.put("resultType", resultType);
    requestMap.put("sessionId", sessionId);
    
    requestMap.put("sign", LiveSignUtil.getSign(requestMap, appSecret));
    
    String response = HttpUtil.get(url, requestMap);
    
    log.info("测试查询频道场次审核记录列表成功:{}", response);
    //do somethings
    
}

Response Example

For global system error descriptions, see Global Error Description

Success Example

{
    "code": 200,
    "status": "success",
    "requestId": "6c13efc8cc424973b7ba76deb33e664e.67.16796223224271993",
    "data": {
        "pageNumber": 1,
        "pageSize": 20,
        "totalPages": 2,
        "totalItems": 28,
        "contents": [
            {
                "id": 636,
                "userId": null,
                "channelId": 3775168,
                "sessionId": "gj4z866us3",
                "taskId": 304,
                "imageUrl": "http://oss-live-1.videocc.net/audio/video/3775168/b7649358-a8cd-4637-ae8c-f1c60b579395.jpg",
                "ocrText": "小王八掉眼泪 你鳖伤心",
                "ocrKeyword": "",
                "politicalName": "",
                "label": "Normal",
                "labelDesc": "正常",
                "resultType": 1,
                "resultTypeDesc": "通过",
                "moderationStrategyDesc": "严格审核策略",
                "createTime": 1678950744000
            },
            {
                "id": 635,
                "userId": null,
                "channelId": 3775168,
                "sessionId": "gj4z866us3",
                "taskId": 304,
                "imageUrl": "http://oss-live-1.videocc.net/audio/video/3775168/719a9814-e0eb-4e09-acb3-d183f342dc54.jpg",
                "ocrText": "",
                "ocrKeyword": "",
                "politicalName": "",
                "label": "Terror",
                "labelDesc": "暴恐",
                "resultType": 2,
                "resultTypeDesc": "违规",
                "moderationStrategyDesc": "严格审核策略",
                "createTime": 1678950685000
            }
        ]
    },
    "success": true
}

Error Example

{
    "code": 400,
    "status": "error",
    "requestId": "d310b70bc329403f87f77f9203d50f89.128.16360831552223589",
    "error": {
        "code": 20001,
        "desc": "application not found."
    },
    "success": false
}
联系客服,在线咨询