Switch world
POST
/api/v1/worlds/{name}/switch
const url = 'http://localhost:11044/api/v1/worlds/example/switch';const options = {method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>'}};
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/example/switch \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'Switches the current user to a different world.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”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
Responses
Section titled “Responses”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
createdWorld 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

