Skip to content

Update collector/dedup settings

PUT
/api/v1/config/collector
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).

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

Media typeapplication/json

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
cron
required

When the sweep runs, as a Spring six-field cron expression (seconds minutes hours day-of-month month day-of-week)

string
dryRun
required

Whether the sweep reports what it would merge instead of merging it

boolean
enabled
required

Whether the dedup sweep runs at all

boolean
matcher
required

Which matcher decides that two memories are the same: cosine or multi-signal

string
similarityThreshold
required

How similar two memories must be to merge, in [0, 1]

number format: double

Example generated

{
"cron": "example",
"dryRun": true,
"enabled": true,
"matcher": "example",
"similarityThreshold": 1
}

Collector settings updated

Media type*/*

A config change was saved. Carries only the acknowledgement — the caller already knows what it sent

object
status
required

Always updated

string

Example

updated

Invalid matcher, threshold, weight, or cron expression

Media type*/*

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
message
required

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

string
status
required

Always error. Present because the map this replaces carried it and a consumer may branch on it

string

Example

error