communications-mining
latest
false
- API 文档
- CLI
- 集成指南
- 博客
重要 :
请注意,此内容已使用机器翻译进行了本地化。
Communications Mining 开发者指南
Last updated 2024年11月19日
重置流
/api/v1/datasets/<project>/<dataset_name>/streams/<stream_name>/reset
/api/v1/datasets/<project>/<dataset_name>/streams/<stream_name>/reset
所需权限:使用流、查看标签。
- 重击
curl -X POST 'https://<my_api_endpoint>/api/v1/datasets/project1/collateral/streams/dispute/reset' \ -H "Authorization: Bearer $REINFER_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "to_comment_created_at": "2020-06-03T16:05:00" }'
curl -X POST 'https://<my_api_endpoint>/api/v1/datasets/project1/collateral/streams/dispute/reset' \ -H "Authorization: Bearer $REINFER_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "to_comment_created_at": "2020-06-03T16:05:00" }' - 节点
const request = require("request"); request.post( { url: "https://<my_api_endpoint>/api/v1/datasets/project1/collateral/streams/dispute/reset", headers: { Authorization: "Bearer " + process.env.REINFER_TOKEN, }, json: true, body: { to_comment_created_at: "2020-06-03T16:05:00" }, }, function (error, response, json) { // digest response console.log(JSON.stringify(json, null, 2)); } );
const request = require("request"); request.post( { url: "https://<my_api_endpoint>/api/v1/datasets/project1/collateral/streams/dispute/reset", headers: { Authorization: "Bearer " + process.env.REINFER_TOKEN, }, json: true, body: { to_comment_created_at: "2020-06-03T16:05:00" }, }, function (error, response, json) { // digest response console.log(JSON.stringify(json, null, 2)); } ); - Python
import json import os import requests response = requests.post( "https://<my_api_endpoint>/api/v1/datasets/project1/collateral/streams/dispute/reset", headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]}, json={"to_comment_created_at": "2020-06-03T16:05:00"}, ) print(json.dumps(response.json(), indent=2, sort_keys=True))
import json import os import requests response = requests.post( "https://<my_api_endpoint>/api/v1/datasets/project1/collateral/streams/dispute/reset", headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]}, json={"to_comment_created_at": "2020-06-03T16:05:00"}, ) print(json.dumps(response.json(), indent=2, sort_keys=True)) - 响应
{ "sequence_id": "4LvtenIBAAA=", "status": "ok", "stream": { "created_at": "2019-08-03T12:30:00.123456Z", "dataset_id": "abcdef0123456789", "description": "Used by ACME RPA to create tickets for disputes.", "id": "0123456789abcdef", "model": { "version": 8 }, "name": "dispute", "title": "Collateral Disputes", "updated_at": "2019-08-03T12:30:00.123456Z" } }
{ "sequence_id": "4LvtenIBAAA=", "status": "ok", "stream": { "created_at": "2019-08-03T12:30:00.123456Z", "dataset_id": "abcdef0123456789", "description": "Used by ACME RPA to create tickets for disputes.", "id": "0123456789abcdef", "model": { "version": 8 }, "name": "dispute", "title": "Collateral Disputes", "updated_at": "2019-08-03T12:30:00.123456Z" } }
可以重置流,以在时间上向后或向前移动其位置,以重复先前返回的注释或跳过注释。 用于重置流的时间戳是指上传注释的时间(即注释的
created_at
属性,而不是其timestamp
属性)。
名称 | 类型 | 必填 | 说明 |
---|---|---|---|
to_comment_created_at | 字符串 | 是 | ISO-8601 时间戳。 |
响应将包含与新流位置相对应的
sequence_id
。