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.
| Property | Type & Description |
|---|---|
name required string The name of the new space. | |
description string (SpaceDescription) Space description in markdown (.md) format. | |
organizationName string (SpaceOrganizationName) Name of the organization responsible for space management. | |
tags array of strings 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. | |
advertisedInMarketplace boolean (SpaceAdvertisedInMarketplace) Specifies whether the space should be publicly advertised in the Space Marketplace. | |
marketplaceContactEmail string (SpaceMarketplaceContactEmail) 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 | |
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.
| 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."
}
}Authentication 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."
}
}Authorization 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."
}
}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."
}
}