Reference / Matching and identity

Undo every merge a filter selects

bulk_unmergeocmgr merge bulk-undoPOST /v1/merges:bulk-undoADMIN

Undo a whole run of merges at once — a bad night of matching, or everything a CSV import joined together. The filter is exactly list_links’s, so read the rows first, then pass the identical filter here. Always call it with dry_run first: it returns the count and a page of what would change, and that count is what the real call removes, because both go through the same selection. The whole batch gets one id, and passing that id to undo_bulk_action puts every one of the merges back, so this is reversible in one action rather than several hundred. Merges somebody pinned are left alone and counted unless you pass force. A reason is required.

Parameters

filterobjectREQUIRED

Which merges to undo. At least one field; an empty filter is refused.

member_idstring (uuid)

Only merges holding this member together. Merged ids follow to the survivor.

connection_idstring (uuid)

Only merges with an account from this connection on either side. This is how "undo what that CSV import merged" is spelled — a link has no import id of its own.

created_by"system" | "user" | "import" | "api" | "operator"

Only merges made by this kind of actor. system is the matcher, which is what a bad-run undo almost always means.

methodstring

Only merges decided this way: deterministic, probabilistic, manual.

sincestring (date-time)

Only merges made at or after this instant — the start of the run that went wrong.

untilstring (date-time)

Only merges made at or before this instant. Without it the window is open at the top and also catches every merge made by hand since.

max_confidencenumber0–1

Only merges at or below this confidence, e.g. 0.9 to leave the certain ones.

connectionIdstring (uuid)

Alias for connection_id; use either spelling.

memberIdstring (uuid)

Alias for member_id; use either spelling.

reasonstringREQUIRED

Why. Required — unlike a single undo — because the audit trail’s answer to "why is this community suddenly two thousand people bigger" must not be blank. Stored on every removal in the batch.

dry_runboolean

Count and preview without writing anything. Do this first: the count it returns is the count the real call removes, because both go through the same filter.

allow_relinkboolean

Leave every separated pair open to being merged again. By default the batch records that the pairs it actually separated are not the same people, so the next match run does not simply put them back.

forceboolean

Include merges somebody pinned. Off by default: a pin is a person’s explicit decision, so a filter that happens to catch one leaves it alone and counts it rather than overruling them.

preview_limitinteger1–200

Rows of preview to return, 1–200. Defaults to 25.

CLI flags

--member <memberId>

Only the merges holding this member together

--connection <id>

Only merges with an account from this connection on either side — how "undo what that import merged" is spelled

--created-by <actor>

Only merges by this actor: system, user, import, api, operator

--method <method>

deterministic, probabilistic, manual or import

--since <iso>

Only merges made at or after this instant

--until <iso>

Only merges made at or before this instant

--max-confidence <p>

Only merges at or below this confidence (0–1)

--reason <text>REQUIRED

Why. Required: the audit trail’s answer to "why is this community suddenly bigger" must not be blank

--allow-relink

Leave every separated pair open to being merged again, instead of recording that they are not the same people

--force

Include merges somebody pinned. Off by default: a filter that happens to catch one leaves it alone and counts it

--preview <n>default 25

Rows of preview to print

Also in Matching and identity