Create world
const url = 'http://localhost:11044/api/v1/worlds';const options = { method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>', 'Content-Type': 'application/json'}, body: '{"name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:11044/api/v1/worlds \ --header 'Content-Type: application/json' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \ --data '{ "name": "example" }'Creates a new world from the default template. The JSON body requires a name key; the name must not contain slashes or dots-dots.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”name (required): the new world’s directory name among the current user’s worlds, trimmed; missing, blank, or containing / or .., it answers 400, and a name that already holds a world answers 409. The world is cloned from the deployment’s bootstrap template; creating it does not switch to it
A new world’s name
object
The world’s name; no slashes and no ‘..’
Example generated
{ "name": "example"}Responses
Section titled “Responses”World created
A world was created or switched to. The same three keys either way; status says which happened
object
The world’s name
Where the world lives on the appliance’s disk
created from a create, switched from a switch
Example
createdMissing or invalid name
A refusal from the world management surface. Carries only the reason, with no status word — the status code is the only other fact and the body does not repeat it
object
Why the operation was refused, written to be shown. Names the world where the refusal is about a particular one
World already exists
A refusal from the world management surface. Carries only the reason, with no status word — the status code is the only other fact and the body does not repeat it
object
Why the operation was refused, written to be shown. Names the world where the refusal is about a particular one

