Create a new space for given group
Creates a new space for a specific group.
This operation requires group_add_space privilege.
For administrator who does not belong to this group
oz_groups_add_relationships and oz_spaces_create privileges are required.
Example cURL requests
Create new space for group
curl -u admin:password -H "Content-type: application/json" \
-X POST -d '{"name": "new_space"}' \
https://$HOST/api/v3/onezone/groups/$GROUP_ID/spaces
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string Group Id. |
Request body
| Property | Type & Description |
|---|---|
name required string Name of the new space. | |
Request Examples
onezone-rest-cli createSpaceForGroup id=a4d3bc73aada63052310652d421609f1 name=="New space name"Responses
Id of the created space in the form /groups/{id}/spaces/{sid} is returned in the response Location header.
Invalid request.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Forbidden request.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Resource not found..
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Internal server error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}