跳到正文

应用自动修正

POST
/articles/apply

检查每篇文章,并且只应用规则中 auto_fix=true 的修正。接口返回修正后的文章数据,但不会更新外部文章系统,也不会保存违规记录。

授权

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"
  
  
}
  
]
}

响应

Applied corrections and corrected articles

application/json
JSON
[
  
{
  
  
"article_id": "string",
  
  
"applied_count": 0,
  
  
"applied": [
  
  
  
{
  
  
  
  
"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"
  
  
}
  
}
]

试验场

授权
主体

示例