Optional
attQuery parameter to specify whether to include the encoding information in attachment stubs if the particular attachment is compressed.
Optional
attachmentsQuery parameter to specify whether to include attachments bodies in a response.
Optional
conflictsQuery parameter to specify whether to include a list of conflicted revisions in each returned document.
Active only when include_docs
is true
.
Path parameter to specify the database name.
Optional
descendingQuery parameter to specify whether to return the documents in descending by key order.
Optional
docSchema for a list of document IDs.
Optional
feedQuery parameter to specify the changes feed type.
Optional
fieldsJSON array that uses the field syntax. Use this parameter to specify which fields of a document must be returned. If it is omitted, the entire document is returned.
Optional
filterQuery parameter to specify a filter function from a design document that will filter the changes stream
emitting only filtered events. For example: design_doc/filtername
.
Additionally, some keywords are reserved for built-in filters:
_design
- Returns only changes to design documents._doc_ids
- Returns changes for documents with an ID matching one specified in
doc_ids
request body parameter._selector
- Returns changes for documents that match the selector
request body parameter. The selector syntax is the same as used for
_find
._view
- Returns changes for documents that match an existing map
function in the view specified by the query parameter view
.Optional
headersOptional
heartbeatQuery parameter to specify the period in milliseconds after which an empty line is sent in the results. Only
applicable for longpoll, continuous, and eventsource feeds. Overrides any timeout to keep the feed alive
indefinitely. May also be true
to use default value of 60000.
Optional
includeQuery parameter to specify whether to include the full content of the documents in the response.
Optional
lastHeader parameter to specify the ID of the last events received by the server on a previous connection.
Overrides since
query parameter.
Optional
limitQuery parameter to specify the number of returned documents to limit the result to.
Optional
selectorJSON object describing criteria used to select documents. The selector specifies fields in the document, and provides an expression to evaluate with the field content or other data.
The selector object must:
Using a selector is significantly more efficient than using a JavaScript filter function, and is the recommended option if filtering on document attributes only.
Elementary selector syntax requires you to specify one or more fields, and the corresponding values required for those fields. You can create more complex selector expressions by combining operators.
Operators are identified by the use of a dollar sign $
prefix in the name field.
There are two core types of operators in the selector syntax:
$and
, $or
, $not
, $nor
) there are three combination operators:
$all
, $elemMatch
, and $allMatch
. A combination operator takes a single argument. The argument is either
another selector, or an array of selectors.$eq
operator matches when the specified field contains a value that is equal to the
supplied argument.$eq
, $gt
, $gte
, $lt
, and $lte
(but not $ne
) can be used as the
basis of a query. You should include at least one of these in a selector.For further reference see selector syntax.
Optional
seqQuery parameter to specify that the update seq should only be calculated with every Nth result returned.
When fetching changes in a batch, setting seq_interval=<batch size>
, where <batch size>
is the number of results requested per batch, load can be reduced on the source database as computing the seq
value across many shards (especially in highly-sharded databases) is expensive.
Optional
sinceQuery parameter to specify to start the results from the change immediately after the given update sequence.
Can be a valid update sequence or now
value. Default is 0
i.e. all changes.
Optional
styleQuery parameter to specify how many revisions are returned in the changes array. The default, main_only
,
will only return the current "winning" revision; all_docs will return all leaf revisions (including conflicts
and deleted former conflicts).
Optional
timeoutQuery parameter to specify the maximum period in milliseconds to wait for a change before the response is
sent, even if there are no results. Only applicable for longpoll
or continuous
feeds. Default value is
specified by httpd/changes_timeout
configuration option. Note that 60000
value is also the default maximum
timeout to prevent undetected dead connections.
Optional
viewQuery parameter to specify a view function as a filter. Documents pass the filter if the view's map function emits at least one record for them.
Generated using TypeDoc
Parameters for the
postChangesAsStream
operation.