Skip to content

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.

POST
/datanotes/stop/
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).

Media typeapplication/json
object

Example generated

{}

Done.

Media typeapplication/json
object
ok
required
boolean
stopping
required
boolean
pid
required

The engine’s process.

integer | null

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.

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}

Missing or wrong bearer token.

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}

A named token beyond its permissions (the engine’s administration, tables outside its write patterns, schema changes without ddl).

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}

Unexpected error.

Media typeapplication/json
object
error
required

What went wrong, for a person or an agent.

string

Example generated

{
"error": "example"
}