Skip to content

Bring the semantic search index up to date: embed the notes changed since the last run (the

POST
/datanotes/operations/sync_semantic_index/
curl --request POST \
--url https://example.com/datanotes/operations/sync_semantic_index/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Datanotes-Actor: {"harness":"my-script","model":"","session":"s-1"}' \
--data '{ "rebuild": false }'

Bring the semantic search index up to date: embed the notes changed since the last run (the engine also does it on its own about ten seconds after edits). rebuild: true re-embeds everything: slow, and costs money with a paid provider — ask first.

X-Datanotes-Actor
string

JSON: on whose behalf the write is made, recorded in the journal (harness, model, session).

Example

{"harness":"my-script","model":"","session":"s-1"}
Media typeapplication/json
object
rebuild

Re-embed every note, not only the changed ones.

boolean

Done.

Media typeapplication/json
SemanticSyncResult

What an update or rebuild did.

object
embedded
required

Notes embedded.

integer
removed
required

Notes dropped from the index.

integer
unchanged
required
integer
failed
required
Array<object>
object
path
required

Vault path.

string
error
required

What went wrong.

string

Example generated

{
"embedded": 1,
"removed": 1,
"unchanged": 1,
"failed": [
{
"path": "example",
"error": "example"
}
]
}

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"
}