Couchbase upsertDocuments
Last updated: July 13, 2026
Inserts or replaces documents in a Couchbase collection. If a document with the specified key already exists, it is completely replaced.
Known limitations:
Existing documents are completely replaced without warning. All previous document data is lost.
There is no automatic rollback support.
Available attributes
You must specify all top-level attributes marked as required. If you specify an optional attribute, you must also specify any nested attributes that it requires.
Attribute | Type | Description | Required |
|---|---|---|---|
| String | The name of the bucket containing the collection. | Yes |
| String | The name of the scope containing the collection. | Yes |
| String | The name of the collection to upsert documents into. | Yes |
| Element | One or more inline documents to upsert. Mutually exclusive with | Yes* |
| Element | A file reference for bulk document import. Mutually exclusive with | Yes* |
Nested tags — document
Attribute | Type | Description | Required |
|---|---|---|---|
| String | The unique document key. | Yes |
| Element | The document data. Contains | Yes |
Nested tags — value (within document)
Attribute | Type | Description | Required |
|---|---|---|---|
| String | The document content as a string, formatted according to the specified | Yes |
| String | The data type of | Yes |
Nested tags — importFile
Attribute | Type | Description | Required |
|---|---|---|---|
| String | Path to the JSON file to import. | Yes |
| String | How to read the file. | Yes |
| String | How to generate document keys. | Yes |
| String | Expression template for key generation. Required when | No |