跳到正文

检查文章

POST
/articles/scan

检查文章字段中的实体名称和命名违规。响应包含所有由确定性规则生成的修正预览,也包括需要人工确认的修正。默认保存检测到的违规记录;将 persist 设为 false 可关闭保存。

授权

apiKeyAuth

CoinPost API key

类型
API Key (header: CP-X-API-KEY)

请求体

application/json
JSON
{
  
"articles": [
  
  
{
  
  
  
"id": "string",
  
  
  
"title": "string",
  
  
  
"summary": "string",
  
  
  
"content": "string",
  
  
  
"tags": [
  
  
  
  
"string"
  
  
  
],
  
  
  
"source": "string",
  
  
  
"language": "string"
  
  
}
  
],
  
"persist": true
}

响应

Scan results in the same order as the request articles

application/json
JSON
[
  
{
  
  
"article_id": "string",
  
  
"matches": [
  
  
  
{
  
  
  
  
"article_id": "string",
  
  
  
  
"entity_id": "string",
  
  
  
  
"field": "string",
  
  
  
  
"matched_text": "string",
  
  
  
  
"start_offset": 0,
  
  
  
  
"end_offset": 0
  
  
  
}
  
  
],
  
  
"violations": [
  
  
  
{
  
  
  
  
"article_id": "string",
  
  
  
  
"entity_id": "string",
  
  
  
  
"rule_id": "string",
  
  
  
  
"field": "string",
  
  
  
  
"matched_text": "string",
  
  
  
  
"start_offset": 0,
  
  
  
  
"end_offset": 0,
  
  
  
  
"suggested_name": "string",
  
  
  
  
"language": "string",
  
  
  
  
"violation_type": "string",
  
  
  
  
"severity": "string",
  
  
  
  
"auto_fixable": true
  
  
  
}
  
  
],
  
  
"corrections": [
  
  
  
{
  
  
  
  
"article_id": "string",
  
  
  
  
"entity_id": "string",
  
  
  
  
"rule_id": "string",
  
  
  
  
"field": "string",
  
  
  
  
"original_text": "string",
  
  
  
  
"corrected_text": "string",
  
  
  
  
"language": "string",
  
  
  
  
"start_offset": 0,
  
  
  
  
"end_offset": 0,
  
  
  
  
"auto_fixable": true,
  
  
  
  
"requires_approval": true
  
  
  
}
  
  
],
  
  
"corrected_article": {
  
  
  
"id": "string",
  
  
  
"title": "string",
  
  
  
"summary": "string",
  
  
  
"content": "string",
  
  
  
"tags": [
  
  
  
  
"string"
  
  
  
],
  
  
  
"source": "string",
  
  
  
"language": "string"
  
  
}
  
}
]

试验场

授权
主体

示例