|
8 | 8 | parameters: |
9 | 9 | - $ref: ../../components/parameters.yaml#/keyspace |
10 | 10 | post: |
11 | | - summary: Run a doc body through the Import filter and return results. |
| 11 | + summary: Dry-run Import filter for testing |
12 | 12 | description: |- |
13 | | - Runs a document body through the import filter and return whether its |
14 | | - imported or not, and any error messages. If no custom import filter is |
15 | | - provided in the request body, the default or user-defined import filter |
16 | | - is used. |
| 13 | + Runs a document through the import filter and return whether it is imported or not, and any error messages. |
| 14 | +
|
| 15 | + If no custom import filter is provided in the request body, the default or user-defined import filter is used. |
17 | 16 |
|
18 | 17 | The document being run through the import filter can be provided in one of the following ways: |
19 | | - | `doc` property | `doc_id` property | Behaviour | |
20 | | - | -------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
21 | | - | Set | Unset | The document body passed will be the `doc` value in the function. | |
22 | | - | Unset | Set | The document of the given id will be fetched from the bucket/collection and will be passed in as the `doc` value in the function. If the document is not found, an error will be returned | |
23 | | - | Set | Set | Will throw an error (only one of `doc` or `doc_id` is allowed for the import filter dry run) | |
24 | | - | Unset | Unset | Will throw an error (at least one of `doc` or `doc_id` is required) | |
| 18 | + | `doc` property | `doc_id` property | Behaviour | |
| 19 | + | ------ |----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| 20 | + | Set | Unset | The document body passed will be the `doc` value in the function. | |
| 21 | + | Unset | Set | The document of the given id will be fetched from the bucket/collection and will be passed in as the `doc` value in the function. If the document is not found, an error will be returned | |
| 22 | + | Set | Set | Will throw an error (only one of `doc` or `doc_id` is allowed for the import filter dry run) | |
| 23 | + | Unset | Unset | Will throw an error (at least one of `doc` or `doc_id` is required) | |
25 | 24 |
|
26 | 25 | * Sync Gateway Application Read Only |
27 | 26 | requestBody: |
|
0 commit comments