Update collector/dedup settings
const url = 'http://localhost:11044/api/v1/config/collector';const options = { method: 'PUT', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>', 'Content-Type': 'application/json'}, body: '{"cron":"example","dryRun":true,"enabled":true,"matcher":"example","similarityThreshold":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url http://localhost:11044/api/v1/config/collector \ --header 'Content-Type: application/json' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \ --data '{ "cron": "example", "dryRun": true, "enabled": true, "matcher": "example", "similarityThreshold": 1 }'Persists this world’s collector settings, replacing the stored CollectorConfig. A user sees dry-run and the similarity threshold before the sweep ever touches their data, so both are validated here rather than saved sight-unseen: similarityThreshold and the signal weights must fall in [0, 1], matcher must be ‘cosine’ or ‘multi-signal’, and cron must be a valid Spring 6-field expression (seconds minutes hours day-of-month month day-of-week).
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”The complete collector settings, replacing what this world stores: enabled, dryRun, matcher (cosine or multi-signal), similarityThreshold (0 to 1) and cron (a Spring 6-field expression) are all required. The five weights vector, lexical, entityOverlap, groundingOverlap and provenanceOverlap sit flat on the body, are optional, and must each be 0 to 1; null or omitted means the matcher’s own default. Validated before anything is saved, and the first problem found answers 400
Body of PUT /config/collector: every memory-dedup collector setting for this world, replacing what is stored. The five signal weights are top-level fields.
object
When the sweep runs, as a Spring six-field cron expression (seconds minutes hours day-of-month month day-of-week)
Whether the sweep reports what it would merge instead of merging it
Whether the dedup sweep runs at all
Which matcher decides that two memories are the same: cosine or multi-signal
How similar two memories must be to merge, in [0, 1]
Example generated
{ "cron": "example", "dryRun": true, "enabled": true, "matcher": "example", "similarityThreshold": 1}Responses
Section titled “Responses”Collector settings updated
A config change was saved. Carries only the acknowledgement — the caller already knows what it sent
object
Always updated
Example
updatedInvalid matcher, threshold, weight, or cron expression
A refusal from the world administration surface: what went wrong, and the word error so a client reading the body need not consult the status code
object
What was refused and why, written to be shown. Names the offending value where there is one — the unknown mode, the out-of-range threshold, the invalid cron expression
Always error. Present because the map this replaces carried it and a consumer may branch on it
Example
error
