Bring the semantic search index up to date: embed the notes changed since the last run (the
const url = 'https://example.com/datanotes/operations/sync_semantic_index/';const options = { method: 'POST', headers: { 'X-Datanotes-Actor': '{"harness":"my-script","model":"","session":"s-1"}', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"rebuild":false}'};
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/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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”JSON: on whose behalf the write is made, recorded in the journal (harness, model, session).
Example
{"harness":"my-script","model":"","session":"s-1"}Request Body
Section titled “Request Body”object
Re-embed every note, not only the changed ones.
Responses
Section titled “Responses”Done.
What an update or rebuild did.
object
Notes embedded.
Notes dropped from the index.
object
Vault path.
What went wrong.
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.
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"}