Querying Project Information
Function
This API is used to query project information.
The API can be called using both the global endpoint and region-specific endpoints.
Authorization Information
Each account is authorized to call all APIs, but its IAM users must obtain the required permissions. For details, see Permissions and Supported Actions.
URI
GET /v3/projects
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| domain_id | No | String | Account ID of the project. For details about how to obtain the account ID, see Obtaining Account, IAM User, Group, Project, Region, and Agency Information. |
| enabled | No | Boolean | Enabling status of the project. |
| is_domain | No | Boolean | Leave this field blank. |
| name | No | String | Project name. For details about how to obtain the project name, see Obtaining Account, IAM User, Group, Project, Region, and Agency Information. |
| page | No | Integer | Page number for pagination query. The minimum value is 1. This parameter must be used together with per_page. |
| parent_id | No | String | Specify the ID of a subproject. Alternatively, specify the account ID of a system project, for example, the eu-west-101 project. For details about how to obtain the project ID and account ID, see Obtaining Account, IAM User, Group, Project, Region, and Agency Information. |
| per_page | No | Integer | Number of data records to be displayed on each page. The value ranges from 1 to 5000. This parameter must be used together with page. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| Content-Type | Yes | String | Fill application/json;charset=utf8 in this field. |
| X-Auth-Token | Yes | String | Access token issued to a user to bear its identity and permissions. For details about the permissions required by the token, see Actions. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| Object | Resource link information. | |
| Array of objects | Project information. |
| Parameter | Type | Description |
|---|---|---|
| self | String | Resource link. |
| previous | String | Previous resource link. If the previous resource link is unavailable, this parameter is set to null. |
| next | String | Next resource link. If the next resource link is unavailable, this parameter is set to null. |
| Parameter | Type | Description |
|---|---|---|
| is_domain | Boolean | The value is false. |
| description | String | Description of the project. |
| Object | Project resource link. | |
| enabled | Boolean | Enabling status of the project. |
| id | String | Project ID. |
| parent_id | String | ID of the specified subproject or account ID of a specified system project, for example, the eu-west-101 project. |
| domain_id | String | Account ID of the project. |
| name | String | Project name. For example, eu-west-101 and MOS. MOS is a built-in project of OBS. |
Example Request
Request for querying project information
GET https://iam.myhuaweicloud.eu/v3/projects Example Response
Status code: 200
The request is successful.
{
"projects": [
{
"domain_id": "d78cbac186b744899480f25bd02...",
"is_domain": false,
"parent_id": "d78cbac186b744899480f25bd022...",
"name": "eu-west-101",
"description": "",
"links": {
"next": null,
"previous": null,
"self": "https://iam.myhuaweicloud.eu/v3/projects/06f1c15e6f0010672f86c003006c5f17"
},
"id": "06f1c15e6f0010672f86c00300...",
"enabled": true
},
{
"domain_id": "d78cbac186b744899480f25bd...",
"is_domain": false,
"parent_id": "d78cbac186b744899480f25bd0...",
"name": "",
"description": "",
"links": {
"next": null,
"previous": null,
"self": "https://iam.myhuaweicloud.eu/v3/projects/065a7c66da0010992ff7c0031e5a..."
},
"id": "065a7c66da0010992ff7c0031e5a...",
"enabled": true
}
],
"links": {
"next": null,
"previous": null,
"self": "https://iam.myhuaweicloud.eu/v3/projects"
}
} Status Codes
| Status Code | Description |
|---|---|
| 200 | The request is successful. |
| 400 | Invalid parameters. |
| 401 | Authentication failed. |
| 403 | Access denied. |
| 404 | The requested resource cannot be found. |
| 500 | Internal server error. |
| 503 | Service unavailable. |
Error Codes
None
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.