# 获取栏目 API

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

GET /api/v1/channels/{siteId}/{channelId}

# 请求 URI

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

# 返回 Body

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

# 示例

# 请求示例

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

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

# 返回示例

{
  "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": [
    {
      "value": 262,
      "label": "子栏目1",
      "children": null,
      "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": "",
      "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"
    },
    {
      "value": 263,
      "label": "子栏目2",
      "children": null,
      "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": "",
      "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"
    }
  ],
  "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"
}
上次更新: 2023/11/16 上午11:17:30