Polyv Help Center

Help Center

Retrieve Personnel Changes Within a Time Period

Updated: 2022-09-02 18:08:07

API Description

1、获取某时间段内有变化人员
2、接口支持https协议

API URL


Request Method

GET

API Constraints

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

  2. startTime only supports data from the last 30 days. Current day data is not supported.

Request Parameter Description

Parameter Required Type Description
appId true String Account appId [See 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 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]
startTime true String Start time, format: yyyy-MM-dd. Only supports data from the last 30 days. Current day data is not supported.
endTime true String End time, format: yyyy-MM-dd
pageSize false Integer Number of items per page. Default is 10, maximum is 200.
token false String Credential for the next page. Obtained from the response data of the current page. Not required for the first page.

Example


Response Parameter Description

Parameter Type Description
code Integer Response status code. 200 indicates success, non-200 indicates failure.
status String Response result, determined by business logic. Returns 'success' on success, 'error' on failure.
success Boolean Response result, determined by business logic. Returns true on success, false on failure.
data Object Distribution list information returned on success [See Data Field Description]
error Object Error information when status code is non-200 [See Error Field Description]
requestId String Request ID, a unique UUID generated for each request. For troubleshooting and debugging only. Should not be tied to business logic.

Error Parameter Description

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

Data Parameter Description

Parameter Type Description
pageSize Integer Number of items per page
token String Credential for querying the next page
contents Array Content of the current page [See Contents Field Description]

Contents Parameter Description

Parameter Type Description
viewerId String Student/Viewer ID
channelId String Channel ID
sessionId String Session ID
shouldStudyTime Integer Required study duration
grandTotalTime Integer Completed study duration
studyStatus String Study status. If the study duration is not less than 90%, the status is 'Completed'.
Y: Completed
N: Not Completed

Java Request Example

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


Response Example

For system-wide error descriptions, see Global Error Description

Success Example

{
    "code": 200,
    "status": "success",
    "requestId": "",
    "data": {
        "pageSize": 10,
        "token": "",
        "contents": [
            {
                "viewerId": "",
                "channelId": "",
                "sessionId": "",
                "shouldStudyTime": 0,
                "grandTotalTime": 0,
                "studyStatus": "N"
            }
        ]
    },
    "success": true
}

Error Example

{
    "code": 400,
    "status": "error",
    "error": {
        "code": 10003,
        "desc": "时间戳过期"
    },
    "success": false
}
联系客服,在线咨询