Skip to content

Switch world

POST
/api/v1/worlds/{name}/switch
curl --request POST \
--url http://localhost:11044/api/v1/worlds/example/switch \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'

Switches the current user to a different world.

name
required
string

Name of one of the current user’s worlds, as listed by GET /worlds; a name with no world content answers 404. The choice is saved on the user, so it holds across sessions

Switched successfully

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

World not found

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