Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
action | enum | Yes | The operation to perform |
changesetId | UUID | Conditional | Required for get, analyze, execute, close, add_items, remove_items |
databaseId | UUID | No | For create — auto-discovers all docs in the DB that have the source branch |
sourceBranchName | string | Conditional | Required for create |
targetBranchName | string | No | Target branch — defaults to "main" |
title | string | Conditional | Required for create |
description | string | No | Optional description |
documentIds | UUID[] | No | Specific document IDs to include (overrides auto-discovery) |
commitMessage | string | No | Custom commit message for execute |
itemResolutions | Record<UUID, object> | Conditional | Per-item conflict resolutions for execute — keyed by changeset item ID |
mergeRequestIds | UUID[] | Conditional | Required for add_items and remove_items |
closeMergeRequests | boolean | No | For close — also close constituent MRs |
status | open | merged | closed | No | Filter for list |
Actions
| Action | Notes |
|---|---|
list | List changesets; filter by status |
get | Get changeset detail with all items and their statuses |
create | Create changeset (auto-commits pending changes, creates MRs) |
analyze | Analyze all items for merge readiness and conflicts |
execute | Merge all ready items; provide itemResolutions for conflicting items |
close | Close changeset (optionally closing its MRs) |
add_items | Add existing merge requests to an open changeset |
remove_items | Remove merge requests from an open changeset |
Workflows
Option A — Database-scoped (recommended):Item Resolutions
Whenanalyze returns items with status: "conflict", provide itemResolutions keyed by the changeset item ID (not the document ID):
sectionResolutions— array of{sectionId, resolution: "source"|"target"}tagResolution—"source"or"target"for tag conflictsresolvedPath— new path if there’s a path collisiondocumentDeletionResolution—"delete"or"keep"if doc was deleted on one branchscalarPropertyResolutions—Record<columnId, "source"|"target">for scalar property conflicts
Examples
Related
merge_requests— single-document mergesdatabases— the databases that power database-scoped changesets