Create new space (admin)
Creates a new space.
This operation requires oz_spaces_create admin privilege.
Equivalent endpoints for regular users:
Example cURL requests
Create a new space
curl -u username:password -H "Content-type: application/json" \
-X POST -d '{ "name" : "new_space" }' \
https://$ZONE_HOST/api/v3/onezone/spaces
Request body
Space creation data.
The name of the new space.
Space description in markdown (.md) format.
Name of the organization responsible for space management.
A list of short keywords or phrases that helps to understand the purpose of a space. Available space tags can be retrieved from the configuration endpoint.
Specifies whether the space should be publicly advertised in the Space Marketplace.
Email address that will be used for notifying the person responsible for space management in the Marketplace about new membership requests. This field is visible only to space members with both space_view and space_manage_in_marketplace privileges, otherwise an empty string is returned. Similarly, it can be modified only by users with the space_manage_in_marketplace privilege.
Request Examples
onezone-rest-cli createSpace name=="Space 1"Responses
URI of the created space in the form https://$ZONE_HOST/api/onezone/v3/spaces/{id} 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."
}
}Authentication 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."
}
}Authorization 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."
}
}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."
}
}