# 获取栏目列表 API

获取栏目列表使用 GET 发起请求,请求地址为 /api/v1/channels/{siteId}

GET /api/v1/channels/{siteId}

# 请求 URI

参数名 位置 类型 必填 说明
siteId path 整数 站点Id
apiKey query 字符串 API 密钥,请参考身份认证

# 返回 Body

名称 类型 说明
200 OK Channels 栏目
401 Unauthorized Error 认证错误
404 NotFound Error 资源不存在错误
400 BadRequest Error 参数错误

# 示例

# 请求示例

以下请求将返回站点Id为260的栏目列表。

GET /api/v1/channels/260
Content-Type: application/json
X-SS-API-KEY: 7cd22002-27a7-4c5d-ba4d-a1c108a20eaf

# 返回示例

[
  {
    "channelName": "首页",
    "siteId": 260,
    "contentModelPluginId": "",
    "tableName": "",
    "parentId": 0,
    "parentsPath": [],
    "parentsCount": 0,
    "childrenCount": 2,
    "indexName": "首页",
    "groupNames": [],
    "taxis": 1,
    "addDate": "2022-12-12 12:20:43",
    "imageUrl": "",
    "content": "",
    "filePath": "",
    "channelFilePathRule": "",
    "contentFilePathRule": "",
    "linkUrl": "",
    "linkType": "None",
    "channelTemplateId": 0,
    "contentTemplateId": 0,
    "keywords": "",
    "description": "",
    "children": null,
    "isCreateChannelIfContentChanged": true,
    "createChannelIdsIfContentChanged": null,
    "listColumns": null,
    "isPreviewContentsExists": false,
    "defaultTaxisType": "OrderByTaxisDesc",
    "isAllContents": false,
    "id": 260,
    "guid": "32f81ba1-7e25-4f2e-93b7-c530b27824b6",
    "createdDate": "2020-11-24 19:55:46",
    "lastModifiedDate": "2021-10-16 20:52:19",
    "navigationUrl": "/empty/index.html"
  },
  {
    "imageUrlCount": 0,
    "test": "",
    "titleColumnWidth": 929,
    "hitsColumnWidth": 116,
    "channelName": "栏目1",
    "siteId": 260,
    "contentModelPluginId": "",
    "tableName": "",
    "parentId": 260,
    "parentsPath": [260],
    "parentsCount": 1,
    "childrenCount": 2,
    "indexName": "",
    "groupNames": [],
    "taxis": 2,
    "addDate": "2020-11-24 19:58:16",
    "imageUrl": "",
    "content": "",
    "filePath": "",
    "channelFilePathRule": "",
    "contentFilePathRule": "",
    "linkUrl": "",
    "linkType": "None",
    "channelTemplateId": 76,
    "contentTemplateId": 77,
    "keywords": "",
    "description": "",
    "children": null,
    "isCreateChannelIfContentChanged": true,
    "createChannelIdsIfContentChanged": null,
    "listColumns": "AddDate",
    "isPreviewContentsExists": false,
    "defaultTaxisType": "OrderByTaxisDesc",
    "isAllContents": false,
    "id": 261,
    "guid": "a0f9176b-e58d-4d41-88b3-f6e398843044",
    "createdDate": "2020-11-24 19:58:16",
    "lastModifiedDate": "2023-01-10 13:22:02",
    "navigationUrl": "/empty/channels/261.html"
  },
  {
    "imageUrlCount": 1,
    "test": "",
    "imageUrl1": "@/upload/images/2022/9/f98ef21bb24171ab.jpg",
    "titleColumnWidth": 1027,
    "addDateColumnWidth": 161,
    "channelName": "栏目2",
    "siteId": 260,
    "contentModelPluginId": "",
    "tableName": "",
    "parentId": 260,
    "parentsPath": [260],
    "parentsCount": 1,
    "childrenCount": 0,
    "indexName": "",
    "groupNames": [],
    "taxis": 3,
    "addDate": "2020-11-24 19:58:18",
    "imageUrl": "/empty/upload/images/2022/9/98aee02d5e46af44.png",
    "content": "",
    "filePath": "",
    "channelFilePathRule": "",
    "contentFilePathRule": "",
    "linkUrl": "",
    "linkType": "None",
    "channelTemplateId": 76,
    "contentTemplateId": 77,
    "keywords": "",
    "description": "",
    "children": null,
    "isCreateChannelIfContentChanged": true,
    "createChannelIdsIfContentChanged": null,
    "listColumns": null,
    "isPreviewContentsExists": false,
    "defaultTaxisType": "OrderByTaxisDesc",
    "isAllContents": false,
    "id": 264,
    "guid": "1c5f0ed8-ae69-45a7-bc2c-d74b5b03c549",
    "createdDate": "2020-11-24 19:58:19",
    "lastModifiedDate": "2023-01-04 11:27:08",
    "navigationUrl": "/empty/channels/264.html"
  },
  {
    "imageUrlCount": 0,
    "test": "",
    "channelName": "子栏目1",
    "siteId": 260,
    "contentModelPluginId": "",
    "tableName": "",
    "parentId": 261,
    "parentsPath": [260, 261],
    "parentsCount": 2,
    "childrenCount": 0,
    "indexName": "",
    "groupNames": [],
    "taxis": 4,
    "addDate": "2020-11-24 19:58:16",
    "imageUrl": "",
    "content": "",
    "filePath": "",
    "channelFilePathRule": "",
    "contentFilePathRule": "",
    "linkUrl": "",
    "linkType": "None",
    "channelTemplateId": 76,
    "contentTemplateId": 77,
    "keywords": "",
    "description": "",
    "children": null,
    "isCreateChannelIfContentChanged": true,
    "createChannelIdsIfContentChanged": null,
    "listColumns": null,
    "isPreviewContentsExists": false,
    "defaultTaxisType": "OrderByTaxisDesc",
    "isAllContents": false,
    "id": 262,
    "guid": "e3408693-7221-4c8b-9b82-fef456632745",
    "createdDate": "2020-11-24 19:58:17",
    "lastModifiedDate": "2021-10-16 20:52:19",
    "navigationUrl": "/empty/channels/262.html"
  },
  {
    "titleColumnWidth": 1008,
    "addDateColumnWidth": 197,
    "channelName": "子栏目2",
    "siteId": 260,
    "contentModelPluginId": "",
    "tableName": "",
    "parentId": 261,
    "parentsPath": [260, 261],
    "parentsCount": 2,
    "childrenCount": 0,
    "indexName": "",
    "groupNames": [],
    "taxis": 5,
    "addDate": "2020-11-24 19:58:17",
    "imageUrl": "",
    "content": "",
    "filePath": "",
    "channelFilePathRule": "",
    "contentFilePathRule": "",
    "linkUrl": "",
    "linkType": "None",
    "channelTemplateId": 76,
    "contentTemplateId": 77,
    "keywords": "",
    "description": "",
    "children": null,
    "isCreateChannelIfContentChanged": true,
    "createChannelIdsIfContentChanged": null,
    "listColumns": "AddDate",
    "isPreviewContentsExists": false,
    "defaultTaxisType": "OrderByTaxisDesc",
    "isAllContents": false,
    "id": 263,
    "guid": "c78698eb-b090-4277-8d5c-8b5c9cec7c95",
    "createdDate": "2020-11-24 19:58:17",
    "lastModifiedDate": "2023-01-04 11:28:23",
    "navigationUrl": "/empty/channels/263.html"
  }
]
上次更新: 2023/11/16 上午11:17:30