> For the complete documentation index, see [llms.txt](https://polyv.gitbook.io/document/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://polyv.gitbook.io/document/docs/unclassified/2020/210d56afa3fab1cff553e91544561539.md).

# 获取每场直播的答题卡发送记录列表

### 接口URL

```
https://api.polyv.net/live/v3/channel/question/list-interact-record
```

### 接口说明

```
1、接口用于获取每场直播的答题卡发送记录列表
2、接口支持https
```

### 请求方式

```
GET
```

### 请求参数

| 参数名       | 必选 | 类型     | 说明                                                                                                                                                                                                        |
| --------- | -- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| appId     | 是  | string | 从API设置中获取，在直播系统登记的appId                                                                                                                                                                                   |
| timestamp | 是  | long   | 当前13位毫秒级时间戳，3分钟内有效                                                                                                                                                                                        |
| sign      | 是  | String | 签名，为32位大写的MD5值,`生成签名的appSecret密钥作为通信数据安全的关键信息，严禁保存在客户端直接使用，所有API都必须通过客户自己服务器中转调用POLYV服务器获取响应数据`【详见[签名生成规则](https://git.polyv.net/help-center/document-center/-/blob/master/live/api/buildSign/README.md)】 |
| channelId | 是  | string | 频道号                                                                                                                                                                                                       |
| startTime | 否  | long   | 查询开始时间时间戳,13位毫秒级, 不传默认查最近七天数据                                                                                                                                                                             |
| endTime   | 否  | long   | 查询的结束时间时间戳,13位毫秒级, 和startTime一起不传默认查七天数据                                                                                                                                                                  |
| sessionId | 否  | string | 查询的场次ID                                                                                                                                                                                                   |
| page      | 否  | int    | 页号，默认为1                                                                                                                                                                                                   |
| pageSize  | 否  | int    | 每页条数，默认为20                                                                                                                                                                                                |

### 响应成功JSON示例：

```json
// 成功
{
  "code": 200,
  "status": "success",
  "message": null,
  "data": {
    "endRow": 8,
    "contents": [
      {
        "status": 11,
        "questionId": "asdfg12311",
        "sessionId": "zxcvbasdfg",
        "name": "今天天气怎么样",
        "createdTime": 1589007127629,
        "type": "R",
        "channelId": 100000,
        "userId": "poiu12wsde,
        "times": 1
      }
    ],
    "firstPage": true,
    "lastPage": false,
    "limit": 10,
    "nextPageNumber": 8,
    "offset": 10,
    "pageNumber": 10,
    "pageSize": 9,
    "prePageNumber": 10,
    "startRow": 5,
    "totalItems": 8,
    "totalPages": 3,
    "occaecate": 62485716
  }
}
```

### 响应失败JSON示例：

未输入appId

```json
{
    "code": 400,
    "status": "error",
    "message": "appId is required.",
    "data": ""
}
```

appId不正确

```json
{
    "code": 400,
    "status": "error",
    "message": "application not found.",
    "data": ""
}
```

时间戳错误

```json
{
    "code": 400,
    "status": "error",
    "message": "invalid timestamp.",
    "data": ""
}
```

签名错误

```json
{
    "code": 403,
    "status": "error",
    "message": "invalid signature.",
    "data": ""
}
```

### 字段说明

| 参数名                           | 说明                                            |
| ----------------------------- | --------------------------------------------- |
| code                          | 响应的状态码，例如：200                                 |
| status                        | 响应状态                                          |
| message                       | 异常错误信息                                        |
| data                          | 响应结果集                                         |
| data.pageNumber               | 页数                                            |
| data.limit                    | 每页记录数                                         |
| data.totalItems               | 记录总数                                          |
| data.firstPage                | 是否为第一页，值为：true/false                          |
| data.lastPage                 | 是否为最后一页，值为：true/false                         |
| data.nextPageNumber           | 下一页编号                                         |
| data.prePageNumber            | 上一页编号                                         |
| data.totalPages               | 总页数                                           |
| data.startRow                 | 当前页第一条记录所在列表中的位置                              |
| data.endRow                   | 当前页最后一条记录所在列表中的位置                             |
| data.contents\[0].questionId  | 题目ID                                          |
| data.contents\[0].name        | 题目名称                                          |
| data.contents\[0].type        | 题目类型("R":单选,"C"：多选，"S": 评分, "Q": 问答, "V": 投票) |
| data.contents\[0].channelId   | 频道ID                                          |
| data.contents\[0].userId      | 用户ID                                          |
| data.contents\[0].sessionId   | 直播场次ID                                        |
| data.contents\[0].times       | 第几次发题                                         |
| data.contents\[0].status      | 发题状态（11 : 答题中， 12：结束答题，13：将答题结果发送给学员）         |
| data.contents\[0].createdTime | 创建时间                                          |

### php请求示例

```php
<?php
//引用config.php
include 'config.php';
$params = array(
	'appId' => $appId,
	'timestamp' => $timestamp,
	'channelId' => 108888
);

//生成sign
$sign = getSign($params); //详细查看config.php文件的getSign方法
$params['sign'] = $sign;

$url = "https://api.polyv.net/live/v3/channel/question/list-interact-record?".http_build_query($params);

$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 500);
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_URL, $url);
$res = curl_exec($curl);
curl_close($curl);

echo $res;
?>
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://polyv.gitbook.io/document/docs/unclassified/2020/210d56afa3fab1cff553e91544561539.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
