查询分类接口[列表]

  • 接口说明: 查询分类接口[列表]
  • 接口地址: /api/categories
  • 请求方式: GET

请求参数

参数名称类型描述
filterarray过滤条件
createThreadint1可发布主题的分类

请求示例

  1. /api/categories

返回说明

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

返回结果

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

参数名称类型出现要求描述
linksobject接口链接
dataobject基础数据
typestring数据类型
idint数据 id
attributesobject数据属性
attributes.namestring分类名称
attributes.iconstring分类图标 URL
attributes.descriptionstring分类说明
attributes.propertyint属性:0:正常 1:首页展示
attributes.sortint显示顺序
attributes.threadCountint主题总数

返回示例

  1. {
  2. "data": [
  3. {
  4. "type": "categories",
  5. "id": "1",
  6. "attributes": {
  7. "name": "Pike",
  8. "description": "West Virginia Street panel Designer",
  9. "icon": "",
  10. "sort": 272,
  11. "property": 0,
  12. "thread_count": 0,
  13. "ip": "127.0.0.1",
  14. "created_at": "2019-12-02T17:53:16+08:00",
  15. "updated_at": "2019-12-02T17:53:16+08:00"
  16. }
  17. },
  18. {
  19. "type": "categories",
  20. "id": "2",
  21. "attributes": {
  22. "name": "transmitter",
  23. "description": "Rustic Table",
  24. "icon": "",
  25. "sort": 394,
  26. "property": 0,
  27. "thread_count": 0,
  28. "ip": "127.0.0.1",
  29. "created_at": "2019-12-02T17:53:17+08:00",
  30. "updated_at": "2019-12-02T17:53:17+08:00"
  31. }
  32. },
  33. {
  34. "type": "categories",
  35. "id": "3",
  36. "attributes": {
  37. "name": "Metal",
  38. "description": "Chief Swiss Franc matrix",
  39. "icon": "",
  40. "sort": 998,
  41. "property": 0,
  42. "thread_count": 0,
  43. "ip": "127.0.0.1",
  44. "created_at": "2019-12-02T17:53:18+08:00",
  45. "updated_at": "2019-12-02T17:53:18+08:00"
  46. }
  47. }
  48. ]
  49. }