Switch this user's active context, creating a new one if the name hasn't been used before
PUT
/api/v1/context/current
const url = 'http://localhost:11044/api/v1/context/current';const options = { method: 'PUT', 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 PUT \ --url http://localhost:11044/api/v1/context/current \ --header 'Content-Type: application/json' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \ --data '{ "name": "example" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”The context to switch to in name, trimmed and matched exactly. A name not used before starts a new, empty context; a blank one is a 400
Media typeapplication/json
The context to switch to, the body of PUT /context/current
object
name
required
Context name, trimmed. Must not be blank; a name not used before starts a new, empty context
string
Example generated
{ "name": "example"}Responses
Section titled “Responses”The name is blank. An unused name is accepted and starts an empty context, but a blank one names nothing
Media type*/*
A refusal from the account surface. Carries only the reason; the status code is the only other fact and the body does not repeat it
object
error
required
Why the request was refused, written to be shown
string

