Couchbase insertDocuments
Last updated: July 13, 2026
Inserts one or more documents into a Couchbase collection, failing if any document key already exists. Documents may be specified inline or loaded from a file.
Known limitations:
Fails if any document key already exists. Use
upsertDocumentsto insert or overwrite existing documents.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 insert documents into. | Yes |
| Element | One or more inline documents to insert. 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 |