manage_transaction
Apply or undo raw database transactions, inspect transaction history, and bulk create or delete genealogy objects in one operation.
Instructions
Apply raw DB transactions, undo history, or bulk create/delete. Writes: all actions.
Low-level database operations that the object endpoints cannot express:
apply -> POST /transactions/ replaying payload (a raw
transaction dict of {add, update, delete} operations).
undo -> POST /transactions/?undo=1 applying the inverse of
payload; pass a recent transaction to revert it.
history -> GET /transactions/history/ (list of past transactions).
history_id -> GET /transactions/history/.
undo_history -> POST /transactions/history//undo.
create_objects -> POST /objects/ with payload = list of object dicts
(validated and added together in one transaction).
delete_objects -> POST /objects/delete/?namespaces= batches an
async delete of whole object types (e.g. 'people,notes').
delete_by_handle -> POST /objects/delete-by-handle/ with namespace (e.g.
'people') and handles (list) to delete specific objects.
params forwards query args for apply/undo: undo, message, force, background.
Prefer the typed manage_* tools for single-record work; raw apply skips
cross-reference maintenance and can corrupt a tree if malformed.
Args: action: "apply", "undo", "history", "history_id", "undo_history", "create_objects", "delete_objects" or "delete_by_handle". payload: Transaction dict (apply/undo) or list of objects (create_objects). params: Optional dict for apply/undo (undo, message, force, background). transaction_id: History transaction id; required for history_id, undo_history. namespace: Object plural namespace (e.g. 'people'); for delete_objects / delete_by_handle. handles: List of handles to delete; for delete_by_handle. instance: Gramps Web base URL from get_instances; default = first.
Returns: dict: {"status", "url", "data": transaction result or task reference}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| params | No | ||
| handles | No | ||
| payload | No | ||
| instance | No | ||
| namespace | No | ||
| transaction_id | No |