查询敏感词接口[列表]

  • 接口说明: 查询敏感词[列表]
  • 接口地址: /api/stop-words
  • 请求方式: GET

请求参数

参数名称类型是否必须描述
filter[q]string搜索带有关键词的敏感词

请求示例

  1. /api/stop-words?filter[q]=bad

返回说明

敏感词标识释义
{IGNORE} 忽略、不处理
{MOD} 审核
{BANNED} 禁用、禁止使用
{REPLACE} 替换

  • 成功,http 状态码: 200
  • 失败,http 状态码: 404

返回结果

关联数据模型字段释义请参见相应文档

参数名称类型出现要求描述
linksobject接口链接
dataobject基础数据
typestring数据类型
idint数据 id
attributesobject数据属性
attributes.ugcstring针对用户内容的处理方式
attributes.usernamestring针对用户名的处理方式
attributes.findstring敏感词或敏感词查找正则
attributes.replacementstring待替换的内容
attributes.created_atdatetime创建时间
attributes.updated_atdatetime修改时间
relationshipsobject关联关系
includedobject关联数据

返回示例

  1. {
  2. "links": {
  3. "first": "http://discuz.test/api/stop-words?page%5Blimit%5D=2",
  4. "next": "http://discuz.test/api/stop-words?page%5Blimit%5D=2&page%5Boffset%5D=2"
  5. },
  6. "data": [
  7. {
  8. "type": "stop-words",
  9. "id": "31",
  10. "attributes": {
  11. "ugc": "{MOD}",
  12. "username": "{REPLACE}",
  13. "find": "reciprocal invoice",
  14. "replacement": "sky blue implement",
  15. "created_at": "2019-10-24T15:16:33+08:00",
  16. "updated_at": "2019-11-07T14:30:44+08:00"
  17. },
  18. "relationships": {
  19. "user": {
  20. "data": {
  21. "type": "users",
  22. "id": "1"
  23. }
  24. }
  25. }
  26. },
  27. {
  28. "type": "stop-words",
  29. "id": "32",
  30. "attributes": {
  31. "ugc": "{REPLACE}",
  32. "username": "{REPLACE}",
  33. "find": "MOD",
  34. "replacement": "111",
  35. "created_at": "2019-10-24T15:16:33+08:00",
  36. "updated_at": "2019-10-24T15:16:33+08:00"
  37. },
  38. "relationships": {
  39. "user": {
  40. "data": {
  41. "type": "users",
  42. "id": "1"
  43. }
  44. }
  45. }
  46. }
  47. ],
  48. "included": [
  49. {
  50. "type": "users",
  51. "id": "1",
  52. "attributes": {
  53. "username": "username",
  54. "nickname": null,
  55. "mobile": "",
  56. "unionId": "",
  57. "lastLoginIp": "127.0.0.1",
  58. "createdAt": "2019-10-11T00:00:00+08:00",
  59. "updatedAt": "2019-11-11T14:51:34+08:00"
  60. }
  61. }
  62. ]
  63. }