# 删除视频打点数据

### 接口URL

```
https://api.polyv.net/v2/video/delete-chapter-marker
```

### 接口说明

```
删除视频打点数据
```

### 支持格式

```
JSON
```

### 请求方式

```
POST
```

### 请求参数

| 参数名        | 必选 | 类型及范围  | 说明                                                                                                                       |
| ---------- | -- | ------ | ------------------------------------------------------------------------------------------------------------------------ |
| userid     | 是  | string | 用户id                                                                                                                     |
| ptime      | 是  | long   | 当前时间的毫秒级时间戳（13位），3分钟内有效                                                                                                  |
| sign       | 是  | String | 签名，为40位大写的SHA1值【详见[签名生成规则](https://git.polyv.net/help-center/document-center/-/blob/master/vod/api/buildSign/README.md)】 |
| vid        | 是  | string | 视频id                                                                                                                     |
| timePoints | 否  | string | 时间点，单位：秒，多个以英文逗号分隔，如"1,2", 如果不传则删除视频的所有打点信息                                                                              |

### 返回正确结果JSON示例

```json
{
    "code": 200,
    "status": "success",
    "message": "success",
    "data": "success"
}
```

### 返回错误结果JSON示例

```json
签名不正确
{
	"code":400,
	"status":"error",
	"message":"the sign is not right",
	"data":""
}
```

```json
时间戳过期
{
	"code":400,
	"status":"error",
	"message":"ptime is too old.",
	"data":""
}
```

```json
vid 不存在
{
    "code": 400,
    "status": "error",
    "message": "video could not find by vid",
    "data": ""
}
```

```json
vid 不合法
{
    "code": 400,
    "status": "error",
    "message": "Illegal vid",
    "data": ""
}
```

```json
内部错误，或传了非法参数程序转换异常
{
    "code": 500,
    "status": "fail",
    "message": "undefined error",
    "data": null
}
```

### 字段说明

| 字段      | 说明   |
| ------- | ---- |
| code    | 返回码  |
| status  | 返回状态 |
| message | 返回信息 |
| data    | 操作结果 |

#### java请求示例：

```java
    public void testDeleteChapterMarker() throws Exception {
        String url = "http://api.polyv.net/v2/video/delete-chapter-marker";
        Map<String, String> params = new HashMap<>();
        params.put("userid", userid);
        params.put("vid", "a2dc4f25172872650e7d5c1b8026b13c_a");
        params.put("timePoints", "1,2");
        params.put("ptime", String.valueOf(System.currentTimeMillis()));
        params.put("sign", getSign(params, secretkey));
        String response = HttpClientUtil.getInstance().sendHttpPost(url, params);
        System.out.println(response);
    }
```


---

# Agent Instructions: 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/2021/5635e39583aff6df8d9941570077b8a3.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.
