查询指定条件下的项目信息
功能介绍
该接口用于查询指定条件下的项目信息。
URI
- 参数说明 
    参数 是否必选 类型 说明 domain_id 否 String 用户所属企业账户的ID。 name 否 String 项目名称。 parent_id 否 String 项目的父项目ID。 enabled 否 Boolean 项目是否启用。 is_domain 否 Boolean 是否为租户。 page 否 Integer 查询第几页的数据,查询值最小为1。 per_page 否 Integer 每页的数据个数,取值范围为[1,5000]。   需要分页查询时,必须保证查询参数中同时存在page和per_page。 
请求
- Request Header参数说明 
    参数 是否必选 类型 说明 Content-Type 是 String 该字段内容填为“application/json;charset=utf8”。 X-Auth-Token 是 String 目标租户已认证的token。 
- 请求样例
    curl -i -k -H 'Accept:application/json' -H 'Content-Type:application/json;charset=utf8' -X "X-Auth-Token:$token" -X GET https://sample.domain.com/v3/projects?domain_id=5c9f5525d9d24c5bbf91e74d86772029&name=region_name 
响应
- Response Body参数说明 
    参数 是否必选 类型 说明 projects 是 List 项目列表。 links 是 Object 项目的资源链接。 
- projects格式说明 
    参数 是否必选 类型 说明 is_domain 是 Boolean 是否为租户。 description 是 String 项目的描述。 links 是 Object 项目的资源链接。 enabled 是 Boolean 项目是否可用。 id 是 String 项目ID。 parent_id 是 String project的父ID。 domain_id 是 String 项目所在企业账户的ID。 name 是 String 项目名称。 
- 响应样例
    { "links": { "self": "https://sample.domain.com/v3/projects?domain_id=c9f5525d9d24c5bbf91e74d86772029&name=region_name", "previous": null, "next": null }, "projects": [ { "is_domain": false, "description": "", "links": { "self": "https://sample.domain.com/v3/projects/e86737682ab64b2490c48f08bcc41914" }, "enabled": true, "id": "e86737682ab64b2490c48f08bcc41914", "parent_id": "c9f5525d9d24c5bbf91e74d86772029", "domain_id": "c9f5525d9d24c5bbf91e74d86772029", "name": "region_name" } ] }
状态码
| 状态码 | 说明 | 
|---|---|
| 200 | 请求成功。 | 
| 400 | 请求错误。 | 
| 401 | 认证失败。 | 
| 403 | 鉴权失败。 | 
| 404 | 找不到资源。 | 
| 500 | 内部服务错误。 | 
| 503 | 服务不可用。 | 
 
    