Skip to content

Create world

POST
/api/v1/worlds
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.

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

Media typeapplication/json

A new world’s name

object
name
required

The world’s name; no slashes and no ‘..’

string

Example generated

{
"name": "example"
}

World created

Media type*/*

A world was created or switched to. The same three keys either way; status says which happened

object
name
required

The world’s name

string
path
required

Where the world lives on the appliance’s disk

string
status
required

created from a create, switched from a switch

string

Example

created

Missing or invalid name

Media type*/*

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
error
required

Why the operation was refused, written to be shown. Names the world where the refusal is about a particular one

string

World already exists

Media type*/*

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
error
required

Why the operation was refused, written to be shown. Names the world where the refusal is about a particular one

string