2.6. Listing projects¶
GET /v3/projects
List projects.
Source: https://docs.openstack.org/api-ref/identity/v3/index.html?expanded=#list-projects
2.6.1. Request¶
2.6.1.1. Parameters¶
Name | In | Type | Description |
---|---|---|---|
domain_id (Optional) |
query | string | Filters the response by a domain ID. |
enabled (Optional) |
query | boolean | If set to true, then only enabled projects will be returned. Any value
other than 0 (including no value) will be interpreted as true. |
is_domain (Optional) |
query | boolean | If this is specified as true, then only projects acting as a domain are included. Otherwise, only projects that are not acting as a domain are included. New in version 3.6 |
name (Optional) |
query | string | Filters the response by a project name. |
parent_id (Optional) |
query | string | Filters the response by a parent ID. New in version 3.4 |
2.6.1.2. Example¶
List projects in the domain with the specified ID.
# curl -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
https://<node_IP_addr>:5000/v3/projects?domain_id=f2eeaaf15c254d4fa10255796122c8ec
2.6.2. Response¶
2.6.2.1. Parameters¶
Name | In | Type | Description |
---|---|---|---|
links |
body | object | The link to the collection of resources. |
projects |
body | array | A list of project objects |
is_domain |
body | boolean | Indicates whether the project also acts as a domain. If set to New in version 3.6 |
description |
body | string | The description of the project. |
domain_id |
body | string | The ID of the domain for the project. |
enabled |
body | boolean | If set to true , project is enabled. If set to
false , project is disabled. |
id |
body | string | The ID for the project. |
links |
body | object | The link to the resources in question. |
name |
body | string | The name of the project. |
parent_id |
body | string | The ID of the parent for the project. New in version 3.4 |
tags |
body | array | A list of simple strings assigned to a project. |
2.6.2.2. Status codes¶
2.6.2.2.1. Success¶
Code | Reason |
---|---|
200 - OK |
Request was successful. |
2.6.2.2.2. Error¶
Code | Reason |
---|---|
400 - Bad Request |
Some content in the request was invalid. |
401 - Unauthorized |
User must authenticate before making a request. |
403 - Forbidden |
Policy does not allow current user to do this operation. |
2.6.2.3. Example¶
{
"links": {
"self": "https://<node_IP_addr>:5000/v3/projects?domain_id=f2eeaaf15c254d4fa10255796122c8ec",
"previous": null,
"next": null
},
"projects": [
{
"is_domain": false,
"description": "",
"links": {
"self": "https://<node_IP_addr>:5000/v3/projects/ec35eb7ceb594ad696839fc867817e4c"
},
"tags": [],
"enabled": true,
"id": "ec35eb7ceb594ad696839fc867817e4c",
"parent_id": "f2eeaaf15c254d4fa10255796122c8ec",
"domain_id": "f2eeaaf15c254d4fa10255796122c8ec",
"name": "project1"
},
{
"is_domain": false,
"description": "",
"links": {
"self": "https://<node_IP_addr>:5000/v3/projects/03013ec787054e78ae26806636ad18d9"
},
"tags": [],
"enabled": true,
"id": "03013ec787054e78ae26806636ad18d9",
"parent_id": "f2eeaaf15c254d4fa10255796122c8ec",
"domain_id": "f2eeaaf15c254d4fa10255796122c8ec",
"name": "project2"
}
]
}