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://$ZONE_HOST/api/v3/onezone/groups/$GROUP_ID/spaces
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string Group Id. |
Request body
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.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Forbidden request.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Resource not found..
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}Internal server error.
error object Object describing an error.
Object describing an error.
String identifying the error type. Does not change between error instances.
Human readable error description. May contain information specific to given error instance.
Details about the error instance. The object schema is specific to each error type.
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}