获取栏目列表

获取栏目列表接口

使用GET发起请求,请求地址为/api/v1/stl/channels

  1. GET /api/v1/stl/channels HTTP/1.1

请求 URI

参数名 类型 必填 说明
siteId 字符串 站点Id
siteDir 字符串 站点文件夹
channelId 字符串 栏目Id
channelIndex 字符串 栏目索引
channelName 字符串 栏目名称
apiKey 字符串 API 密钥,请参考身份认证

/api/v1/stl/channels的其他参数与<stl:channels>标签一致。

返回

名称 类型 说明
200 OK Channel 列表 栏目列表
401 Unauthorized Error 认证错误
400 BadRequest Error 参数错误

示例

请求示例

  1. GET /api/v1/stl/channels?siteId=1
  2. X-SS-API-KEY: 7cd22002-27a7-4c5d-ba4d-a1c108a20eaf

返回示例

  1. {
  2. "value": [
  3. {
  4. "id": 33,
  5. "channelName": "通知公告",
  6. "siteId": 32,
  7. "contentModelPluginId": "",
  8. "contentRelatedPluginIds": "",
  9. "parentId": 32,
  10. "parentsPath": "32",
  11. "parentsCount": 1,
  12. "childrenCount": 0,
  13. "isLastNode": false,
  14. "indexName": "通知公告",
  15. "groupNameCollection": "",
  16. "taxis": 2,
  17. "addDate": "2017-09-13 10:50:23",
  18. "imageUrl": "@/images/link_bn.jpg",
  19. "content": "",
  20. "contentNum": 5,
  21. "filePath": "",
  22. "channelFilePathRule": "",
  23. "contentFilePathRule": "",
  24. "linkUrl": "",
  25. "linkType": "None",
  26. "channelTemplateId": 21,
  27. "contentTemplateId": 34,
  28. "keywords": "",
  29. "description": "",
  30. "attributes": {
  31. "isChannelAddable": true,
  32. "isContentAddable": true,
  33. "isChannelCreatable": true,
  34. "isContentCreatable": true,
  35. "isCreateChannelIfContentChanged": true,
  36. "createChannelIDsIfContentChanged": "",
  37. "contentAttributesOfDisplay": "SubTitle",
  38. "transType": 5,
  39. "transSiteId": 0,
  40. "transChannelIds": "",
  41. "transChannelNames": "",
  42. "transIsAutomatic": false,
  43. "transDoneType": 0,
  44. "isPreviewContents": false,
  45. "defaultTaxisType": "OrderByTaxisDesc"
  46. }
  47. },
  48. {
  49. "id": 34,
  50. "channelName": "特别报道",
  51. "siteId": 32,
  52. "contentModelPluginId": "",
  53. "contentRelatedPluginIds": "",
  54. "parentId": 32,
  55. "parentsPath": "32",
  56. "parentsCount": 1,
  57. "childrenCount": 0,
  58. "isLastNode": false,
  59. "indexName": "特别报道",
  60. "groupNameCollection": "m_sitemap",
  61. "taxis": 3,
  62. "addDate": "2017-09-13 10:50:24",
  63. "imageUrl": "@/images/link_bn.jpg",
  64. "content": "",
  65. "contentNum": 38,
  66. "filePath": "",
  67. "channelFilePathRule": "",
  68. "contentFilePathRule": "",
  69. "linkUrl": "",
  70. "linkType": "None",
  71. "channelTemplateId": 21,
  72. "contentTemplateId": 22,
  73. "keywords": "",
  74. "description": "",
  75. "attributes": {
  76. "isChannelAddable": true,
  77. "isContentAddable": true,
  78. "isChannelCreatable": true,
  79. "isContentCreatable": true,
  80. "isCreateChannelIfContentChanged": true,
  81. "createChannelIDsIfContentChanged": "",
  82. "contentAttributesOfDisplay": "LastEditDate",
  83. "transType": 5,
  84. "transSiteId": 0,
  85. "transChannelIds": "",
  86. "transChannelNames": "",
  87. "transIsAutomatic": false,
  88. "transDoneType": 0,
  89. "isPreviewContents": false,
  90. "defaultTaxisType": "OrderByTaxisDesc"
  91. }
  92. }
  93. ]
  94. }