1. 项目列表
1.1. 描述
获取项目列表
1.2. 请求地址
请求地址的格式如下:
https://api.yovole.com/v1/project/list
1.3. 请求参数
Name | Type | Description | Required |
---|---|---|---|
curPage | Integer | 当前页码,默认值1 | 否 |
perPage | Integer | 每页显示条数,默认值10 | 否 |
1.4. 请求示例
1.4.1. 请求地址
POST https://api.yovole.com/v1/project/list HTTP/1.1
x-ycs-timestamp: 2019-06-19T14:26:26Z
x-ycs-requestid: 2a49cfa2-925b-11e9-bb3a-6c96cfdcd6b9
x-ycs-security-authorization: Authorization: YCS1-HMAC-SHA1 Credential=08e206fb-7b41-45b7-8076-8d43e8aeea89,SignedHeaders=content-type;x-ycs-requestid;x-ycs-timestamp,Signature=2RFjU7C9gICCrQfpAIfAJHqRRlQ=
1.4.2. 接口请求参数
{
"curPage":1,
"perPage":10
}
1.5. 返回结果
1.5.1. 返回正确结果示例
{
"requestId": "bb213e40-58fd-43aa-a5ba-3afb4b358db4",
"success": true,
"code": 200,
"message": null,
"model": null,
"pager": {
"curPage": 1,
"perPage": 10,
"totalRecords": 3,
"totalPages": 1,
"pageData": [
{
"id": "8a83a0966ade941a016ae906313800fb",
"name": "项目test1",
"sn": "PRJ-8KP87",
"color": "project-colo-10"
},
{
"id": "8a83a0966ade941a016ae905ca9000cd",
"name": "项目test2",
"sn": "PRJ-8KP86",
"color": "project-colo-10"
},
{
"id": "8a83a0966ade941a016ae9032a9f009f",
"name": "项目test3",
"sn": "PRJ-8KP85",
"color": "project-colo-10"
}
]
}
}
1.5.2. 返回错误结果示例
{
"requestId": "627f35ac-178e-4aaf-a283-4130bfa6cc89",
"success": false,
"code": 403,
"message": "permission denied",
"errorCode": "PermissionDenied"
}
1.6. 错误码
可以通过错误返回结果中的code、errorCode和message字段了解错误分类和具体的错误原因。
该接口没有特殊错误码,错误码信息和简单的错误分析方法可以参考公共错误码。