请求URL:

  • /v1/option/category

请求方式:

  • GET

请求头:GET

Headers

参数名称 类型 是否必须 示例 备注
params string url 参数

请求参数:

参数名称 类型 是否必须 示例 备注
type string 数据的分类,用于区分不同类型的数据
page int 1 第几页
perPage int 10 每页多少条数据
query string ‘type’:’menu’,’relation1’:”test” 用于查询不同类型数据 ,注意如果是表单提交必须加引号成字符串
names string ‘app_id:2795624659617185792’ 搜索自定义key的值,需完全匹配

接口描述:

请求示例



?page=1&query=type%3Asys4&perPage=3&names=%27name%27:%27风电%27,%27date%27:%27123%27

返回参数说明:

参数名 类型 是否必须 默认值 是否唯一 其他信息
data int 数据唯一id
status int 状态码
msg string 提示信息

正确响应示例



{
“data”: {
“option”: [
{
“count”: 2,
“items”: [
{
“children”: [],
“created_time”: “2020-11-18 03:39:37”,
“date”: “123”,
“id”: “116864956766355456”,
“level”: “0”,
“name”: “风电”,
“parent_id”: “116864842169581568”,
“path”: “1”,
“relation1_data”: {
“author”: “海码风电”,
“category_ids”: “81101047237443585,81101047237443581”,
“created_time”: “2020-11-12 07:47:09”,
“description”: “这里填写新闻简介”,
“id”: “114752922322993152”,
“name”: “1232”,
“orgin”: “google”,
“relation1”: “114689071166521344”,
“relation1_type”: “user”,
type”: “common”,
“updated_time”: “2020-11-12 07:47:09”
},
type”: “test”,
“updated_time”: “2020-11-18 03:39:37”,
“value”: “116864956766355456”
},
{
“children”: [
{
“children”: [],
“created_time”: “2020-11-18 03:39:37”,
“date”: “123”,
“id”: “116864956766355456”,
“level”: “0”,
“name”: “风电”,
“parent_id”: “116864842169581568”,
“path”: “1”,
“relation1_data”: {
“author”: “海码风电”,
“category_ids”: “81101047237443585,81101047237443581”,
“created_time”: “2020-11-12 07:47:09”,
“description”: “这里填写新闻简介”,
“id”: “114752922322993152”,
“name”: “1232”,
“orgin”: “google”,
“relation1”: “114689071166521344”,
“relation1_type”: “user”,
type”: “common”,
“updated_time”: “2020-11-12 07:47:09”
},
type”: “test”,
“updated_time”: “2020-11-18 03:39:37”,
“value”: “116864956766355456”
}
],
“created_time”: “2020-11-18 03:39:10”,
“date”: “123”,
“id”: “116864842169581568”,
“level”: “0”,
“name”: “风电”,
“parent_id”: “115100536537088000”,
“path”: “1”,
“relation1_data”: {
“author”: “海码风电”,
“category_ids”: “81101047237443585,81101047237443581”,
“created_time”: “2020-11-12 07:47:09”,
“description”: “这里填写新闻简介”,
“id”: “114752922322993152”,
“name”: “1232”,
“orgin”: “google”,
“relation1”: “114689071166521344”,
“relation1_type”: “user”,
type”: “common”,
“updated_time”: “2020-11-12 07:47:09”
},
type”: “test”,
“updated_time”: “2020-11-18 03:39:10”,
“value”: “116864842169581568”
}
],
“page”: 1,
“perPage”: 3
}
]
},
“msg”: “”,
“status”: 0
}

失败响应示例


{
    "data": null,
    "msg": "获取数据失败,没有查到有效数据",
    "status": 2000
}
文档更新时间: 2020-11-18 14:56   作者:admin