Creating projects
POST /v3/projects
Create a project with the specified name.
Request
Parameters
| Name | In | Type | Description |
|---|---|---|---|
project
|
body | object | A project object. |
name
|
body | string | The unique name of the project within the owning 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. |
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
Response
Parameters
| Name | In | Type | Description |
|---|---|---|---|
project
|
body | object | A project object. |
name
|
body | string | The unique name of the project within the owning domain. |
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 project resource. |
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. |
Status codes
Success
| Code | Reason |
|---|---|
201 - Created
|
Resource was created and is ready to use. |
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. |
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"
}
}