Update Repository
update_repositoryUpdate an existing repository's name, type, address, website, or note and tag links while leaving omitted fields unchanged. Use it to correct repository details without creating a new record.
Instructions
Change an existing repository's name, type, address, website or links to notes and tags. For a new repository use create_repository; to remove one, delete_object. Which sources it holds, with their call numbers, is stored on the sources: change that with update_source (repositoryHandles), not here. address becomes the street line of a single address and url a single Web Home link; each replaces every stored value, and an empty string removes them. A change shows on every source that lists the repository. Pass only what changes; omitted arguments stay as they are. Link lists (…Handles, …Refs) follow linkMode: replace (default) sets the whole list, add appends, remove drops the given handles; in replace mode [] REMOVES every link of that kind, though the linked records themselves stay in the tree. Returns the handle and Gramps ID; a missing repository returns a not-found message, and an unknown type is rejected before anything is saved. Writes run one at a time and need a Gramps Web account allowed to edit the tree; a locked or rate-limited write fails with the delay to wait before retrying it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | New website; replaces every stored link, and an empty string removes them. Omit to leave unchanged. | |
| name | No | New name. Omit to leave unchanged. | |
| handle | Yes | The repository to change. Handle or Gramps ID (e.g. I0001), resolved automatically; find it with search or list_objects. | |
| address | No | New postal address as one line; replaces every stored address, and an empty string removes them. Omit to leave unchanged. | |
| linkMode | No | How to apply all supplied link lists: replace (default) replaces each full list, and a link it keeps keeps its stored privacy, citations, notes and crop unless the call sends new values; add appends missing handles and preserves existing link metadata; remove removes all links matching supplied handles (reference metadata is ignored). Omitted lists stay unchanged; empty lists clear only in replace mode. Does not affect attributes, names, addresses or URLs. Use separate calls to add and remove, or replace to edit existing link metadata. | replace |
| repoType | No | New type, e.g. Archive, Library, Church. Omit to leave unchanged. Must be a standard Gramps type or a custom one the tree already uses; anything else is rejected with suggestions. List: get_reference(topic: "types"). | |
| isPrivate | No | true makes the record private, false public. Omit to leave unchanged. | |
| tagHandles | No | Tags. Omit to keep; applied per linkMode. Handles, not Gramps IDs: JSON array ["h1","h2"], one handle, or a comma/semicolon/newline-separated string; entries may also be objects {"ref":"…"}. | |
| noteHandles | No | Notes. Omit to keep; applied per linkMode. Handles, not Gramps IDs: JSON array ["h1","h2"], one handle, or a comma/semicolon/newline-separated string; entries may also be objects {"ref":"…"}. |