Promote a reviewed provisional realm to a name you stand behind
const url = 'http://localhost:11044/api/v1/learn/example/promote';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/learn/example/promote \ --header 'Content-Type: application/json' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \ --data '{ "name": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Id of the held realm-draft review whose installed provisional realm is promoted; 404 when it is unknown, expired or another user’s. The review is released once the promotion succeeds
Request Bodyrequired
Section titled “Request Bodyrequired”name is the realm name to promote to: it becomes the realm’s directory under the world’s realms and the name in its manifest. Promotion never overwrites, so an existing realm of that name is refused with 409, as is a provisional realm whose files or revision no longer match its install receipt
The name to promote a reviewed provisional realm to, sent to POST /learn/{id}/promote
object
The promoted realm’s directory name in this world; a realm of that name already existing is refused 409, since promotion never overwrites
Example generated
{ "name": "example"}Responses
Section titled “Responses”A realm of that name already exists — promotion never overwrites; REVISION_STALE: the installed realm came from another revision of this source; or DIGEST_STALE: the realm’s files changed since its install receipt
A refusal that names a machine-readable code beside its explanation
object
The refusal’s code, for a client that branches rather than reads. Every value comes from the sealed LearningReviewRefusal hierarchy, except SOURCE_UNREADABLE which the 502 path builds directly.
What was refused and what to do about it, written to be shown to the person reviewing
Example
{ "code": "REVISION_STALE"}
