Stop the engine gracefully (owner only; `datanotes stop` calls it): it answers at once, then finishes the requests under way, makes the last git sync and store backup commit and push, releases its lock and exits.
const url = 'https://example.com/datanotes/stop/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/datanotes/stop/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{}'From the answer on, new requests get 503 (the engine is stopping) and long polls of the change feed answer at once. The engine waits for the requests under way for up to 30 s. Then it makes the vault’s last git sync and the store backup’s last commit and push, releases the lock and exits. The caller learns the end from the process (datanotes stop waits for it) or from GET /, which stops answering. A named token is refused (403), even with maintain. A host that cannot stop on request does not serve the route (404).
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”object
Example generated
{}Responses
Section titled “Responses”Done.
object
The engine’s process.
Example
{ "ok": true, "stopping": true}Bad input: the body is not a JSON object, or an argument is unknown, missing or of the wrong type.
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}Missing or wrong bearer token.
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}A named token beyond its permissions (the engine’s administration, tables outside its write patterns, schema changes without ddl).
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}Unexpected error.
object
What went wrong, for a person or an agent.
Example generated
{ "error": "example"}