2.7. Creating projects¶
POST /v3/projects
Create a project with the specified name.
Source: https://docs.openstack.org/api-ref/identity/v3/index.html?expanded=#create-project
2.7.1. Request¶
2.7.1.1. Parameters¶
Name | In | Type | Description |
---|---|---|---|
project |
body | object | A project object |
name |
body | string | The name of the project, which must be unique within the owning domain. A project can have the same name as its domain. |
is_domain (Optional) |
body | boolean | Indicates whether the project also acts as a domain. If set to New in version 3.6 |
description (Optional) |
body | string | The description of the project. |
domain_id (Optional) |
body | string | The ID of the domain for the project. For projects acting as a domain, the For regular projects (i.e. those not acing as a domain), if |
enabled (Optional) |
body | boolean | If set to true , project is enabled. If set to
false , project is disabled. The default is true . |
parent_id (Optional) |
body | string | The ID of the parent of the project. If specified on project creation, this places the project within a
hierarchy and implicitly defines the owning domain, which will be the
same domain as the parent specified. If
New in version 3.4 |
tags (Optional) |
body | array | A list of simple strings assigned to a project. Tags can be used to classify projects into groups. |
options (Optional) |
body | object | The resource options for the project. Available resource options are
immutable . |
2.7.1.2. Example¶
# curl -ks -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' -d '
{
"project": {
"description": "Project description",
"domain_id": "f2eeaaf15c254d4fa10255796122c8ec",
"name": "project1"
}
}' https://<node_IP_addr>:5000/v3/projects
2.7.2. Response¶
2.7.2.1. Parameters¶
Name | In | Type | Description |
---|---|---|---|
project |
body | object | A project object |
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 |
options |
body | object | The resource options for the project. Available resource options are
immutable . |
2.7.3. Status codes¶
2.7.3.1. Success¶
Code | Reason |
---|---|
201 - Created |
Resource was created and is ready to use. |
2.7.3.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. |
409 - Conflict |
This operation conflicted with another operation on this resource. |
2.7.3.3. Example¶
{
"project": {
"is_domain": false,
"description": "Project description",
"links": {
"self": "https://<node_IP_addr>:5000/v3/projects/ec35eb7ceb594ad696839fc867817e4c"
},
"tags": [],
"enabled": true,
"id": "ec35eb7ceb594ad696839fc867817e4c",
"parent_id": "f2eeaaf15c254d4fa10255796122c8ec",
"domain_id": "f2eeaaf15c254d4fa10255796122c8ec",
"name": "project1"
}
}