Skip to content
This repository was archived by the owner on Oct 17, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 10 additions & 22 deletions src/api/database/bulk-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,20 +95,11 @@
}

.. http:post:: /{db}/_all_docs
:synopsis: Returns certain rows from the built-in view of all documents
:synopsis: Returns a built-in view of all documents in this database

The ``POST`` to ``_all_docs`` allows to specify multiple keys to be
selected from the database. This enables you to request multiple
documents in a single request, in place of multiple :get:`/{db}/{docid}`
requests.

:param db: Database name
:<header Content-Type: :mimetype:`application/json`
:<json array keys: Return only documents that match the specified keys.
*Optional*
:>header Content-Type: - :mimetype:`application/json`
:code 200: Request completed successfully
:code 404: Requested database not found
:method:`POST` `_all_docs` functionality supports identical parameters and behavior
as specified in the :get:`/{db}/_all_docs` API but allows for the query string
parameters to be supplied as keys in a JSON object in the body of the `POST` request.

**Request**:

Expand Down Expand Up @@ -167,7 +158,7 @@
database. The information is returned as a JSON structure containing meta
information about the return structure, including a list of all design
documents and basic contents, consisting the ID, revision and key. The key
is the from the design document's ``_id``.
is the design document's ``_id``.

:param db: Database name
:<header Accept: - :mimetype:`application/json`
Expand Down Expand Up @@ -278,16 +269,13 @@
}

.. http:post:: /{db}/_design_docs
:synopsis: Returns certain rows from the built-in view of all design
documents
:synopsis: Returns a built-in view of all design documents in this database

The ``POST`` to ``_design_docs`` allows to specify multiple keys to be
selected from the database. This enables you to request multiple
design documents in a single request, in place of multiple
:get:`/{db}/{docid}` requests.
:method:`POST` `_design_docs` functionality supports identical parameters and behavior
as specified in the :get:`/{db}/_design_docs` API but allows for the query string
parameters to be supplied as keys in a JSON object in the body of the `POST` request.

The request body should contain a list of the keys to be returned as an
array to a ``keys`` object. For example:
**Request**:

.. code-block:: http

Expand Down
34 changes: 16 additions & 18 deletions src/api/local.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,41 +72,41 @@ A list of the available methods and URL paths are provided below:
- :mimetype:`text/plain`
:query boolean conflicts: Includes `conflicts` information in response.
Ignored if `include_docs` isn't ``true``. Default is ``false``.
:query boolean descending: Return the design documents in descending by
:query boolean descending: Return the local documents in descending by
key order. Default is ``false``.
:query string endkey: Stop returning records when the specified key is
reached. *Optional*.
:query string end_key: Alias for `endkey` param.
:query string endkey_docid: Stop returning records when the specified
design document ID is reached. *Optional*.
local document ID is reached. *Optional*.
:query string end_key_doc_id: Alias for `endkey_docid` param.
:query boolean include_docs: Include the full content of the design
:query boolean include_docs: Include the full content of the local
documents in the return. Default is ``false``.
:query boolean inclusive_end: Specifies whether the specified end key
should be included in the result. Default is ``true``.
:query string key: Return only design documents that match the specified
:query string key: Return only local documents that match the specified
key. *Optional*.
:query string keys: Return only design documents that match the specified
:query string keys: Return only local documents that match the specified
keys. *Optional*.
:query number limit: Limit the number of the returned design documents to
:query number limit: Limit the number of the returned local documents to
the specified number. *Optional*.
:query number skip: Skip this number of records before starting to return
the results. Default is ``0``.
:query string startkey: Return records starting with the specified key.
*Optional*.
:query string start_key: Alias for `startkey` param.
:query string startkey_docid: Return records starting with the specified
design document ID. *Optional*.
local document ID. *Optional*.
:query string start_key_doc_id: Alias for `startkey_docid` param.
:query boolean update_seq: Response includes an ``update_seq`` value
indicating which sequence id of the underlying database the view
reflects. Default is ``false``.
:>header Content-Type: - :mimetype:`application/json`
- :mimetype:`text/plain; charset=utf-8`
:>json number offset: Offset where the design document list started
:>json number offset: Offset where the local document list started
:>json array rows: Array of view row objects. By default the information
returned contains only the design document ID and revision.
:>json number total_rows: Number of design documents in the database. Note
returned contains only the local document ID and revision.
:>json number total_rows: Number of local documents in the database. Note
that this is not the number of rows returned in the actual query.
:>json number update_seq: Current update sequence for the database
:code 200: Request completed successfully
Expand Down Expand Up @@ -173,16 +173,14 @@ A list of the available methods and URL paths are provided below:
}

.. http:post:: /{db}/_local_docs
:synopsis: Returns certain rows from the built-in view of all local
documents
:synopsis: Returns a built-in view of all local (non-replicating) documents
in this database

The ``POST`` to ``_local_docs`` allows to specify multiple keys to be
selected from the database. This enables you to request multiple
local documents in a single request, in place of multiple
:get:`/{db}/_local/{docid}` requests.
:method:`POST` `_local_docs` functionality supports identical parameters and behavior
as specified in the :get:`/{db}/_local_docs` API but allows for the query string
parameters to be supplied as keys in a JSON object in the body of the `POST` request.

The request body should contain a list of the keys to be returned as an
array to a ``keys`` object. For example:
**Request**:

.. code-block:: http

Expand Down