Construct a CloudantV1 object.
Options for the service.
The base URL for the service
Default headers that shall be included with every request to the service.
The Authenticator object used to authenticate requests to the service
Static_loggerStaticDEFAULT_StaticDEFAULT_ProtectedconfigureConfigure the service using external configuration Cloudant specific extensions:
The name of the service. Will be used to read from external configuration.
ProtectedcreateExtend createRequest to handle document and attachment validation.
Delete an attachment.
Deletes the attachment with the filename, {attachment_name}, from the specified doc. You must supply the rev
query parameter or If-Match header with the current revision to delete the attachment.
The parameters to send to the service.
Parameters for the deleteAttachment operation.
Path parameter to specify the attachment name.
Optionalbatch?: stringQuery parameter to specify whether to store in batch mode. The server will respond with a HTTP 202 Accepted response code immediately.
Path parameter to specify the database name.
Path parameter to specify the document ID.
Optionalheaders?: OutgoingHttpHeadersOptionalifMatch?: stringHeader parameter for a conditional HTTP request matching an ETag.
Optionalrev?: stringQuery parameter to specify a document revision.
Optionalsignal?: GenericAbortSignalDelete a database.
Deletes the specified database and all documents and attachments contained within it. To avoid deleting a database,
the server responds with a 400 HTTP status code when the request URL includes a ?rev= parameter. This response
suggests that a user wanted to delete a document but forgot to add the document ID to the URL.
The parameters to send to the service.
Parameters for the deleteDatabase operation.
Delete a design document.
Marks the specified design document as deleted by adding a _deleted field with the value true. Documents with
this field are not returned with requests but stay in the database. You must supply the current (latest) revision,
either by using the rev parameter or by using the If-Match header to specify the revision.
The parameters to send to the service.
Parameters for the deleteDesignDocument operation.
Optionalbatch?: stringQuery parameter to specify whether to store in batch mode. The server will respond with a HTTP 202 Accepted response code immediately.
Path parameter to specify the database name.
Path parameter to specify the design document name. The design document name is the design document ID
excluding the _design/ prefix.
Optionalheaders?: OutgoingHttpHeadersOptionalifMatch?: stringHeader parameter for a conditional HTTP request matching an ETag.
Optionalrev?: stringQuery parameter to specify a document revision.
Optionalsignal?: GenericAbortSignalDelete a document.
Marks the specified document as deleted by adding a _deleted field with the value true. Documents with this
field are not returned within requests anymore but stay in the database. You must supply the current (latest)
revision, either by using the rev parameter or by using the If-Match header to specify the revision.
The parameters to send to the service.
Parameters for the deleteDocument operation.
Optionalbatch?: stringQuery parameter to specify whether to store in batch mode. The server will respond with a HTTP 202 Accepted response code immediately.
Path parameter to specify the database name.
Path parameter to specify the document ID.
Optionalheaders?: OutgoingHttpHeadersOptionalifMatch?: stringHeader parameter for a conditional HTTP request matching an ETag.
Optionalrev?: stringQuery parameter to specify a document revision.
Optionalsignal?: GenericAbortSignalDelete an index.
Delete the index functions from the design document and index files on the server.
The parameters to send to the service.
Parameters for the deleteIndex operation.
Path parameter to specify the database name.
Path parameter to specify the design document name. The design document name is the design document ID
excluding the _design/ prefix.
Optionalheaders?: OutgoingHttpHeadersPath parameter to specify the index name.
Optionalsignal?: GenericAbortSignalPath parameter to specify the index type.
Delete a local document.
Deletes the specified local document. The semantics are identical to deleting a standard document in the specified database, except that the document is not replicated.
The parameters to send to the service.
Parameters for the deleteLocalDocument operation.
Optionalbatch?: stringQuery parameter to specify whether to store in batch mode. The server will respond with a HTTP 202 Accepted response code immediately.
Path parameter to specify the database name.
Path parameter to specify the document ID.
Optionalheaders?: OutgoingHttpHeadersOptionalsignal?: GenericAbortSignalCancel a persistent replication.
Cancels a replication by deleting the document that describes it from the _replicator database.
The parameters to send to the service.
Parameters for the deleteReplicationDocument operation.
Optionalbatch?: stringQuery parameter to specify whether to store in batch mode. The server will respond with a HTTP 202 Accepted response code immediately.
Path parameter to specify the ID of the stored replication configuration in the _replicator database.
Optionalheaders?: OutgoingHttpHeadersOptionalifMatch?: stringHeader parameter for a conditional HTTP request matching an ETag.
Optionalrev?: stringQuery parameter to specify a document revision.
Optionalsignal?: GenericAbortSignalRetrieve list of running tasks.
Lists running tasks, including the task type, name, status, and process ID. The result includes a JSON array of the currently running tasks, with each task described as a single object. Depending on the operation type, the set of response object fields might be different.
Optionalparams: GetActiveTasksParamsThe parameters to send to the service.
Parameters for the getActiveTasks operation.
Retrieve Activity Tracker events information.
Check event types that are being sent to IBM Cloud Activity Tracker for the IBM Cloudant instance.
Optionalparams: GetActivityTrackerEventsParamsThe parameters to send to the service.
Parameters for the getActivityTrackerEvents operation.
Query a list of all database names in the instance.
Query to retrieve a list of database names from the instance.
Optionalparams: GetAllDbsParamsThe parameters to send to the service.
Parameters for the getAllDbs operation.
Optionaldescending?: booleanQuery parameter to specify whether to return the documents in descending by key order.
OptionalendKey?: stringQuery parameter to specify to stop returning records when the specified key is reached. String representation of any JSON type that matches the key type emitted by the view function.
Optionalheaders?: OutgoingHttpHeadersOptionallimit?: numberQuery parameter to specify the number of returned documents to limit the result to.
Optionalsignal?: GenericAbortSignalOptionalskip?: numberQuery parameter to specify the number of records before starting to return the results.
OptionalstartKey?: stringQuery parameter to specify to start returning records from the specified key. String representation of any JSON type that matches the key type emitted by the view function.
Retrieve an attachment.
Returns the file attachment that is associated with the document. The raw data of the associated attachment is returned, just as if you were accessing a static file. The returned Content-Type header is the same as the content type set when the document attachment was submitted to the database.
The parameters to send to the service.
Parameters for the getAttachment operation.
Optionalaccept?: stringThe type of the response: /.
Path parameter to specify the attachment name.
Path parameter to specify the database name.
Path parameter to specify the document ID.
Optionalheaders?: OutgoingHttpHeadersOptionalifMatch?: stringHeader parameter for a conditional HTTP request matching an ETag.
OptionalifNoneMatch?: stringHeader parameter for a conditional HTTP request not matching an ETag.
Optionalrange?: stringHeader parameter to specify the byte range for a request. This allows the implementation of resumable downloads and skippable streams. This is available for all attachments inside CouchDB.
Optionalrev?: stringQuery parameter to specify a document revision.
Optionalsignal?: GenericAbortSignalRetrieve maximum allowed database count.
Retrieves the maximum number of databases currently allowed in the instance.
Optionalparams: GetCapacityDatabasesInformationParamsThe parameters to send to the service.
Parameters for the getCapacityDatabasesInformation operation.
Retrieve provisioned throughput capacity information.
View the amount of provisioned throughput capacity that is allocated to an IBM Cloudant instance and what is the target provisioned throughput capacity.
Optionalparams: GetCapacityThroughputInformationParamsThe parameters to send to the service.
Parameters for the getCapacityThroughputInformation operation.
Retrieve CORS configuration information.
Lists all Cross-origin resource sharing (CORS) configuration. CORS defines a way in which the browser and the server interact to determine whether or not to allow the request.
Optionalparams: GetCorsInformationParamsThe parameters to send to the service.
Parameters for the getCorsInformation operation.
Retrieve current database count.
Retrieves the current number of databases that exist in the instance.
Optionalparams: GetCurrentDatabasesInformationParamsThe parameters to send to the service.
Parameters for the getCurrentDatabasesInformation operation.
Retrieve the current provisioned throughput capacity consumption.
View the current consumption of provisioned throughput capacity for an IBM Cloudant instance. The current consumption shows the quantities of reads, writes, and global queries conducted against the instance for a given second.
Optionalparams: GetCurrentThroughputInformationParamsThe parameters to send to the service.
Parameters for the getCurrentThroughputInformation operation.
Retrieve information about a database.
Retrieve detailed information about the database.
The parameters to send to the service.
Parameters for the getDatabaseInformation operation.
Retrieve change events for all databases.
This endpoint is not available in IBM Cloudant.
Lists changes to databases, like a global changes feed. Types of changes include updating the database and creating or deleting a database. Like the changes feed, the feed is not guaranteed to return changes in the correct order and might repeat changes. Polling modes for this method work like polling modes for the changes feed.
Optionalparams: GetDbUpdatesParamsThe parameters to send to the service.
Parameters for the getDbUpdates operation.
Optionaldescending?: booleanQuery parameter to specify whether to return the documents in descending by key order.
Optionalfeed?: stringQuery parameter to specify the changes feed type.
Optionalheaders?: OutgoingHttpHeadersOptionalheartbeat?: numberQuery parameter to specify the period in milliseconds after which an empty line is sent in the results. Off
by default and only applicable for
continuous and eventsource feeds. Overrides any timeout to keep the feed alive indefinitely. May also be
true to use a value of 60000.
Note: Delivery of heartbeats cannot be relied on at specific intervals. If your application runs in an
environment where idle network connections may break, heartbeat is not suitable as a keepalive mechanism.
Instead, consider one of the following options:
timeout parameter with a value that is compatible with your network environment.normal or longpoll).Optionallimit?: numberQuery parameter to specify the number of returned documents to limit the result to.
Optionalsignal?: GenericAbortSignalOptionalsince?: stringQuery 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.
Optionaltimeout?: numberQuery 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.
Retrieve a design document.
Returns design document with the specified doc_id from the specified database. Unless you request a specific
revision, the current revision of the design document is always returned.
The parameters to send to the service.
Parameters for the getDesignDocument operation.
Optionalattachments?: booleanQuery parameter to specify whether to include attachments bodies in a response.
OptionalattEncodingInfo?: booleanQuery parameter to specify whether to include the encoding information in attachment stubs if the particular attachment is compressed.
Optionalconflicts?: booleanQuery 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.
Path parameter to specify the design document name. The design document name is the design document ID
excluding the _design/ prefix.
OptionaldeletedConflicts?: booleanQuery parameter to specify whether to include a list of deleted conflicted revisions in the
_deleted_conflicts property of the returned document.
Optionalheaders?: OutgoingHttpHeadersOptionalifNoneMatch?: stringHeader parameter for a conditional HTTP request not matching an ETag.
Optionallatest?: booleanQuery parameter to specify whether to force retrieving latest leaf revision, no matter what rev was requested.
OptionallocalSeq?: booleanQuery parameter to specify whether to include the last update sequence for the document.
Optionalmeta?: booleanQuery parameter to specify whether to include document meta information. Acts the same as specifying all of the conflicts, deleted_conflicts and open_revs query parameters.
Optionalrev?: stringQuery parameter to specify a document revision.
Optionalrevs?: booleanQuery parameter to specify whether to include a list of all known document revisions.
OptionalrevsInfo?: booleanQuery parameter to specify whether to includes detailed information for all known document revisions.
Optionalsignal?: GenericAbortSignalRetrieve information about a design document.
Retrieves information about the specified design document, including the index, index size, and current status of the design document and associated index information.
The parameters to send to the service.
Parameters for the getDesignDocumentInformation operation.
Retrieve a document.
Returns document with the specified doc_id from the specified database. Unless you request a specific revision,
the latest revision of the document is always returned.
The parameters to send to the service.
Parameters for the getDocument operation.
Optionalattachments?: booleanQuery parameter to specify whether to include attachments bodies in a response.
OptionalattEncodingInfo?: booleanQuery parameter to specify whether to include the encoding information in attachment stubs if the particular attachment is compressed.
Optionalconflicts?: booleanQuery 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.
OptionaldeletedConflicts?: booleanQuery parameter to specify whether to include a list of deleted conflicted revisions in the
_deleted_conflicts property of the returned document.
Path parameter to specify the document ID.
Optionalheaders?: OutgoingHttpHeadersOptionalifNoneMatch?: stringHeader parameter for a conditional HTTP request not matching an ETag.
Optionallatest?: booleanQuery parameter to specify whether to force retrieving latest leaf revision, no matter what rev was requested.
OptionallocalSeq?: booleanQuery parameter to specify whether to include the last update sequence for the document.
Optionalmeta?: booleanQuery parameter to specify whether to include document meta information. Acts the same as specifying all of the conflicts, deleted_conflicts and open_revs query parameters.
Optionalrev?: stringQuery parameter to specify a document revision.
Optionalrevs?: booleanQuery parameter to specify whether to include a list of all known document revisions.
OptionalrevsInfo?: booleanQuery parameter to specify whether to includes detailed information for all known document revisions.
Optionalsignal?: GenericAbortSignalRetrieve a document as mixed.
Returns document with the specified doc_id from the specified database. Unless you request a specific revision,
the latest revision of the document is always returned.
The parameters to send to the service.
Parameters for the getDocumentAsMixed operation.
Optionalattachments?: booleanQuery parameter to specify whether to include attachments bodies in a response.
OptionalattEncodingInfo?: booleanQuery parameter to specify whether to include the encoding information in attachment stubs if the particular attachment is compressed.
Optionalconflicts?: booleanQuery 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.
OptionaldeletedConflicts?: booleanQuery parameter to specify whether to include a list of deleted conflicted revisions in the
_deleted_conflicts property of the returned document.
Path parameter to specify the document ID.
Optionalheaders?: OutgoingHttpHeadersOptionalifNoneMatch?: stringHeader parameter for a conditional HTTP request not matching an ETag.
Optionallatest?: booleanQuery parameter to specify whether to force retrieving latest leaf revision, no matter what rev was requested.
OptionallocalSeq?: booleanQuery parameter to specify whether to include the last update sequence for the document.
Optionalmeta?: booleanQuery parameter to specify whether to include document meta information. Acts the same as specifying all of the conflicts, deleted_conflicts and open_revs query parameters.
Optionalrev?: stringQuery parameter to specify a document revision.
Optionalrevs?: booleanQuery parameter to specify whether to include a list of all known document revisions.
OptionalrevsInfo?: booleanQuery parameter to specify whether to includes detailed information for all known document revisions.
Optionalsignal?: GenericAbortSignalRetrieve a document as related.
Returns document with the specified doc_id from the specified database. Unless you request a specific revision,
the latest revision of the document is always returned.
The parameters to send to the service.
Parameters for the getDocumentAsRelated operation.
Optionalattachments?: booleanQuery parameter to specify whether to include attachments bodies in a response.
OptionalattEncodingInfo?: booleanQuery parameter to specify whether to include the encoding information in attachment stubs if the particular attachment is compressed.
Optionalconflicts?: booleanQuery 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.
OptionaldeletedConflicts?: booleanQuery parameter to specify whether to include a list of deleted conflicted revisions in the
_deleted_conflicts property of the returned document.
Path parameter to specify the document ID.
Optionalheaders?: OutgoingHttpHeadersOptionalifNoneMatch?: stringHeader parameter for a conditional HTTP request not matching an ETag.
Optionallatest?: booleanQuery parameter to specify whether to force retrieving latest leaf revision, no matter what rev was requested.
OptionallocalSeq?: booleanQuery parameter to specify whether to include the last update sequence for the document.
Optionalmeta?: booleanQuery parameter to specify whether to include document meta information. Acts the same as specifying all of the conflicts, deleted_conflicts and open_revs query parameters.
Optionalrev?: stringQuery parameter to specify a document revision.
Optionalrevs?: booleanQuery parameter to specify whether to include a list of all known document revisions.
OptionalrevsInfo?: booleanQuery parameter to specify whether to includes detailed information for all known document revisions.
Optionalsignal?: GenericAbortSignalRetrieve a document as stream.
Returns document with the specified doc_id from the specified database. Unless you request a specific revision,
the latest revision of the document is always returned.
The parameters to send to the service.
Parameters for the getDocumentAsStream operation.
Optionalattachments?: booleanQuery parameter to specify whether to include attachments bodies in a response.
OptionalattEncodingInfo?: booleanQuery parameter to specify whether to include the encoding information in attachment stubs if the particular attachment is compressed.
Optionalconflicts?: booleanQuery 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.
OptionaldeletedConflicts?: booleanQuery parameter to specify whether to include a list of deleted conflicted revisions in the
_deleted_conflicts property of the returned document.
Path parameter to specify the document ID.
Optionalheaders?: OutgoingHttpHeadersOptionalifNoneMatch?: stringHeader parameter for a conditional HTTP request not matching an ETag.
Optionallatest?: booleanQuery parameter to specify whether to force retrieving latest leaf revision, no matter what rev was requested.
OptionallocalSeq?: booleanQuery parameter to specify whether to include the last update sequence for the document.
Optionalmeta?: booleanQuery parameter to specify whether to include document meta information. Acts the same as specifying all of the conflicts, deleted_conflicts and open_revs query parameters.
Optionalrev?: stringQuery parameter to specify a document revision.
Optionalrevs?: booleanQuery parameter to specify whether to include a list of all known document revisions.
OptionalrevsInfo?: booleanQuery parameter to specify whether to includes detailed information for all known document revisions.
Optionalsignal?: GenericAbortSignalRetrieve shard information for a specific document.
Retrieves information about a specific shard where a particular document is stored, along with information about the nodes where that shard has a replica.
The parameters to send to the service.
Parameters for the getDocumentShardsInfo operation.
Retrieve information about all indexes.
When you make a GET request to /db/_index, you get a list of all the indexes using "language":"query" in the
database and the primary index. In addition to the information available through this API, the indexes are stored
in the indexes property of their respective design documents.
The parameters to send to the service.
Parameters for the getIndexesInformation operation.
Retrieve a local document.
Retrieves the specified local document. The semantics are identical to accessing a standard document in the specified database, except that the document is not replicated.
The parameters to send to the service.
Parameters for the getLocalDocument operation.
Optionalaccept?: stringThe type of the response: application/json, multipart/mixed, multipart/related, or application/octet-stream.
Optionalattachments?: booleanQuery parameter to specify whether to include attachments bodies in a response.
OptionalattEncodingInfo?: booleanQuery parameter to specify whether to include the encoding information in attachment stubs if the particular attachment is compressed.
Path parameter to specify the database name.
Path parameter to specify the document ID.
Optionalheaders?: OutgoingHttpHeadersOptionalifNoneMatch?: stringHeader parameter for a conditional HTTP request not matching an ETag.
OptionallocalSeq?: booleanQuery parameter to specify whether to include the last update sequence for the document.
Optionalsignal?: GenericAbortSignalRetrieve cluster membership information.
Displays the nodes that are part of the cluster as cluster_nodes. The field, all_nodes, displays all nodes this
node knows about, including the ones that are part of the cluster. This endpoint is useful when you set up a
cluster.
Optionalparams: GetMembershipInformationParamsThe parameters to send to the service.
Parameters for the getMembershipInformation operation.
Retrieve information about a database partition.
Given a partition key, return the database name, sizes, partition, doc count, and doc delete count.
The parameters to send to the service.
Parameters for the getPartitionInformation operation.
Retrieve the configuration for a persistent replication.
Retrieves a replication document from the _replicator database to view the configuration of the replication. The
status of the replication is no longer recorded in the document but can be checked via the replication scheduler.
The parameters to send to the service.
Parameters for the getReplicationDocument operation.
Optionalattachments?: booleanQuery parameter to specify whether to include attachments bodies in a response.
OptionalattEncodingInfo?: booleanQuery parameter to specify whether to include the encoding information in attachment stubs if the particular attachment is compressed.
Optionalconflicts?: booleanQuery parameter to specify whether to include a list of conflicted revisions in each returned document.
Active only when include_docs is true.
OptionaldeletedConflicts?: booleanQuery parameter to specify whether to include a list of deleted conflicted revisions in the
_deleted_conflicts property of the returned document.
Path parameter to specify the ID of the stored replication configuration in the _replicator database.
Optionalheaders?: OutgoingHttpHeadersOptionalifNoneMatch?: stringHeader parameter for a conditional HTTP request not matching an ETag.
Optionallatest?: booleanQuery parameter to specify whether to force retrieving latest leaf revision, no matter what rev was requested.
OptionallocalSeq?: booleanQuery parameter to specify whether to include the last update sequence for the document.
Optionalmeta?: booleanQuery parameter to specify whether to include document meta information. Acts the same as specifying all of the conflicts, deleted_conflicts and open_revs query parameters.
Optionalrev?: stringQuery parameter to specify a document revision.
Optionalrevs?: booleanQuery parameter to specify whether to include a list of all known document revisions.
OptionalrevsInfo?: booleanQuery parameter to specify whether to includes detailed information for all known document revisions.
Optionalsignal?: GenericAbortSignalRetrieve replication scheduler documents.
Lists replication documents, including information about all documents, even the ones in a completed or failed state. For each document, the endpoint returns the document ID, database, replication ID, source and target, and other information.
Optionalparams: GetSchedulerDocsParamsThe parameters to send to the service.
Parameters for the getSchedulerDocs operation.
Optionalheaders?: OutgoingHttpHeadersOptionallimit?: numberQuery parameter to specify the number of returned documents to limit the result to.
Optionalsignal?: GenericAbortSignalOptionalskip?: numberQuery parameter to specify the number of records before starting to return the results.
Optionalstates?: string[] | States[]Query parameter to include only replication documents in the specified states. String must be a comma-delimited string.
Retrieve a replication scheduler document.
Retrieves information about a replication document from the replicator database. The endpoint returns the document ID, database, replication ID, source and target, and other information.
The parameters to send to the service.
Parameters for the getSchedulerDocument operation.
Retrieve a replication scheduler job.
Retrieves the state of a single replication task based on its replication ID.
The parameters to send to the service.
Parameters for the getSchedulerJob operation.
Retrieve replication scheduler jobs.
Retrieves information about replications that were created via /_replicate endpoint, as well as those created
from replication documents. It doesn't include replications that completed or failed to start because replication
documents were malformed. Each job description includes source and target information, replication ID, history of
recent events, and other information.
Optionalparams: GetSchedulerJobsParamsThe parameters to send to the service.
Parameters for the getSchedulerJobs operation.
Retrieve information about the search index disk size.
Retrieve size of the search index on disk.
The parameters to send to the service.
Parameters for the getSearchDiskSize operation.
Path parameter to specify the database name.
Path parameter to specify the design document name. The design document name is the design document ID
excluding the _design/ prefix.
Optionalheaders?: OutgoingHttpHeadersPath parameter to specify the index name.
Optionalsignal?: GenericAbortSignalRetrieve information about a search index.
Retrieve search index metadata information, such as the size of the index on disk.
The parameters to send to the service.
Parameters for the getSearchInfo operation.
Path parameter to specify the database name.
Path parameter to specify the design document name. The design document name is the design document ID
excluding the _design/ prefix.
Optionalheaders?: OutgoingHttpHeadersPath parameter to specify the index name.
Optionalsignal?: GenericAbortSignalRetrieve database permissions information.
See who has permission to read, write, and manage the database. The credentials you use to log in to the dashboard
automatically include _admin permissions to all databases you create. Everyone and everything else, including
users you share databases with and API keys you create, must be given a permission level explicitly.
The parameters to send to the service.
Parameters for the getSecurity operation.
Retrieve server instance information.
When you access the root of an instance, IBM Cloudant returns meta-information about the instance. The response includes a JSON structure that contains information about the server, including a welcome message and the server's version.
Tip: The authentication for this endpoint is only enforced when using IAM.
Optionalparams: GetServerInformationParamsThe parameters to send to the service.
Parameters for the getServerInformation operation.
Retrieve current session cookie information.
Retrieves information about the authenticated user's session.
Optionalparams: GetSessionInformationParamsThe parameters to send to the service.
Parameters for the getSessionInformation operation.
Retrieve shard information.
List each shard range and the corresponding replicas for a specified database.
The parameters to send to the service.
Parameters for the getShardsInformation operation.
Retrieve information about whether the server is up.
Confirms that the server is up, running, and ready to respond to requests. If maintenance_mode is true or
nolb, the endpoint returns a 404 response.
Tip: The authentication for this endpoint is only enforced when using IAM.
Optionalparams: GetUpInformationParamsThe parameters to send to the service.
Parameters for the getUpInformation operation.
Retrieve one or more UUIDs.
Requests one or more Universally Unique Identifiers (UUIDs) from the instance. The response is a JSON object that provides a list of UUIDs.
Tip: The authentication for this endpoint is only enforced when using IAM.
Optionalparams: GetUuidsParamsThe parameters to send to the service.
Parameters for the getUuids operation.
Retrieve the HTTP headers for an attachment.
Returns the HTTP headers that contain a minimal amount of information about the specified attachment. This method
supports the same query arguments as the GET /{db}/{doc_id}/{attachment_name} method, but only the header
information (including attachment size, encoding, and the MD5 hash as an ETag), is returned.
The parameters to send to the service.
Parameters for the headAttachment operation.
Path parameter to specify the attachment name.
Path parameter to specify the database name.
Path parameter to specify the document ID.
Optionalheaders?: OutgoingHttpHeadersOptionalifMatch?: stringHeader parameter for a conditional HTTP request matching an ETag.
OptionalifNoneMatch?: stringHeader parameter for a conditional HTTP request not matching an ETag.
Optionalrev?: stringQuery parameter to specify a document revision.
Optionalsignal?: GenericAbortSignalRetrieve the HTTP headers for a database.
Returns the HTTP headers that contain a minimal amount of information about the specified database. Since the response body is empty, using the HEAD method is a lightweight way to check if the database exists or not.
The parameters to send to the service.
Parameters for the headDatabase operation.
Retrieve the HTTP headers for a design document.
This method supports the same query arguments as the GET /{db}/_design/{ddoc} method, but the results include
only the header information (including design document size, and the revision as an ETag). The ETag header shows
the current revision for the requested design document, and if you requested the design document in full, the
Content-Length specifies the length of the data. If you add any of the query arguments, then the resulting HTTP
headers correspond to what is returned for the equivalent GET request.
The parameters to send to the service.
Parameters for the headDesignDocument operation.
Path parameter to specify the database name.
Path parameter to specify the design document name. The design document name is the design document ID
excluding the _design/ prefix.
Optionalheaders?: OutgoingHttpHeadersOptionalifNoneMatch?: stringHeader parameter for a conditional HTTP request not matching an ETag.
Optionalsignal?: GenericAbortSignalRetrieve the HTTP headers for the document.
This method supports the same query arguments as the GET /{db}/{docid} method, but only the header information
(including document size and the revision as an ETag) is returned. The ETag header shows the current revision for
the requested document, and the Content-Length specifies the length of the data if the document was requested in
full. Add any of the query arguments, then the resulting HTTP headers that correspond to it are returned.
The parameters to send to the service.
Parameters for the headDocument operation.
Path parameter to specify the database name.
Path parameter to specify the document ID.
Optionalheaders?: OutgoingHttpHeadersOptionalifNoneMatch?: stringHeader parameter for a conditional HTTP request not matching an ETag.
Optionallatest?: booleanQuery parameter to specify whether to force retrieving latest leaf revision, no matter what rev was requested.
Optionalrev?: stringQuery parameter to specify a document revision.
Optionalsignal?: GenericAbortSignalRetrieve HTTP headers for a local document.
Retrieves the HTTP headers containing minimal amount of information about the specified local document. Since the response body is empty, using the HEAD method is a lightweight way to check if the local document exists or not.
The parameters to send to the service.
Parameters for the headLocalDocument operation.
Retrieve the HTTP headers for a persistent replication.
Retrieves the HTTP headers containing minimal amount of information about the specified replication document from
the _replicator database. The method supports the same query arguments as the GET /_replicator/{doc_id}
method, but only headers like content length and the revision (ETag header) are returned.
The parameters to send to the service.
Parameters for the headReplicationDocument operation.
Retrieve HTTP headers for a replication scheduler document.
Retrieves the HTTP headers containing minimal amount of information about the specified replication scheduler document. Since the response body is empty, using the HEAD method is a lightweight way to check if the replication scheduler document exists or not.
The parameters to send to the service.
Parameters for the headSchedulerDocument operation.
Retrieve the HTTP headers for a replication scheduler job.
Returns the HTTP headers that contain a minimal amount of information about the specified replication task. Only the header information is returned.
The parameters to send to the service.
Parameters for the headSchedulerJob operation.
Retrieve HTTP headers about whether the server is up.
Retrieves the HTTP headers about whether the server is up.
Optionalparams: HeadUpInformationParamsThe parameters to send to the service.
Parameters for the headUpInformation operation.
Modify Activity Tracker events configuration.
Configure event types that are being sent to IBM Cloud Activity Tracker for the IBM Cloudant instance.
The parameters to send to the service.
Parameters for the postActivityTrackerEvents operation.
Optionalheaders?: OutgoingHttpHeadersOptionalsignal?: GenericAbortSignalAn array of event types that are being sent to IBM Cloud Activity Tracker for the IBM Cloudant instance. "management" is a required element of this array.
Query a list of all documents in a database.
Queries the primary index (all document IDs). The results that match the request body parameters are returned in a JSON object, including a list of matching documents with basic contents, such as the ID and revision. When no request body parameters are specified, results for all documents in the database are returned. Optionally, document content or additional metadata can be included in the response.
The parameters to send to the service.
Parameters for the postAllDocs operation.
Optionalattachments?: booleanParameter to specify whether to include attachments bodies in a response.
OptionalattEncodingInfo?: booleanParameter to specify whether to include the encoding information in attachment stubs if the particular attachment is compressed.
Optionalconflicts?: booleanParameter 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.
Optionaldescending?: booleanParameter to specify whether to return the documents in descending by key order.
OptionalendKey?: stringSchema for a document ID.
Optionalheaders?: OutgoingHttpHeadersOptionalincludeDocs?: booleanParameter to specify whether to include the full content of the documents in the response.
OptionalinclusiveEnd?: booleanParameter to specify whether the specified end key should be included in the result.
Optionalkey?: stringSchema for a document ID.
Optionalkeys?: string[]Schema for a list of document IDs.
Optionallimit?: numberParameter to specify the number of returned documents to limit the result to.
Optionalsignal?: GenericAbortSignalOptionalskip?: numberParameter to specify the number of records before starting to return the results.
OptionalstartKey?: stringSchema for a document ID.
OptionalupdateSeq?: booleanParameter to specify whether to include in the response an update_seq value indicating the sequence id of the database the view reflects.
Query a list of all documents in a database as stream.
Queries the primary index (all document IDs). The results that match the request body parameters are returned in a JSON object, including a list of matching documents with basic contents, such as the ID and revision. When no request body parameters are specified, results for all documents in the database are returned. Optionally, document content or additional metadata can be included in the response.
The parameters to send to the service.
Parameters for the postAllDocsAsStream operation.
Optionalattachments?: booleanParameter to specify whether to include attachments bodies in a response.
OptionalattEncodingInfo?: booleanParameter to specify whether to include the encoding information in attachment stubs if the particular attachment is compressed.
Optionalconflicts?: booleanParameter 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.
Optionaldescending?: booleanParameter to specify whether to return the documents in descending by key order.
OptionalendKey?: stringSchema for a document ID.
Optionalheaders?: OutgoingHttpHeadersOptionalincludeDocs?: booleanParameter to specify whether to include the full content of the documents in the response.
OptionalinclusiveEnd?: booleanParameter to specify whether the specified end key should be included in the result.
Optionalkey?: stringSchema for a document ID.
Optionalkeys?: string[]Schema for a list of document IDs.
Optionallimit?: numberParameter to specify the number of returned documents to limit the result to.
Optionalsignal?: GenericAbortSignalOptionalskip?: numberParameter to specify the number of records before starting to return the results.
OptionalstartKey?: stringSchema for a document ID.
OptionalupdateSeq?: booleanParameter to specify whether to include in the response an update_seq value indicating the sequence id of the database the view reflects.
Multi-query the list of all documents in a database.
Runs multiple queries using the primary index (all document IDs). Returns a JSON object that contains a list of
result objects, one for each query, with a structure equivalent to that of a single _all_docs request. This
enables you to request multiple queries in a single request, in place of multiple POST /{db}/_all_docs requests.
The parameters to send to the service.
Parameters for the postAllDocsQueries operation.
Path parameter to specify the database name.
Optionalheaders?: OutgoingHttpHeadersAn array of query objects with fields for the parameters of each individual view query to be executed. The
field names and their meaning are the same as the query parameters of a regular /_all_docs request.
Optionalsignal?: GenericAbortSignalMulti-query the list of all documents in a database as stream.
Runs multiple queries using the primary index (all document IDs). Returns a JSON object that contains a list of
result objects, one for each query, with a structure equivalent to that of a single _all_docs request. This
enables you to request multiple queries in a single request, in place of multiple POST /{db}/_all_docs requests.
The parameters to send to the service.
Parameters for the postAllDocsQueriesAsStream operation.
Path parameter to specify the database name.
Optionalheaders?: OutgoingHttpHeadersAn array of query objects with fields for the parameters of each individual view query to be executed. The
field names and their meaning are the same as the query parameters of a regular /_all_docs request.
Optionalsignal?: GenericAbortSignalGenerates API keys for apps or persons to enable database access.
Generates API keys to enable database access for a person or application, but without creating a new IBM Cloudant account for that person or application. An API key is a randomly generated username and password. The key is given the wanted access permissions for a database.
Optionalparams: PostApiKeysParamsThe parameters to send to the service.
Parameters for the postApiKeys operation.
Bulk modify multiple documents in a database.
The bulk document API allows you to create, update, and delete multiple documents at the same time within a single request. The basic operation is similar to creating, updating, or deleting a single document, except that you batch the document structure and information.
The parameters to send to the service.
Parameters for the postBulkDocs operation.
HTTP request body for postBulkDocs.
Path parameter to specify the database name.
Optionalheaders?: OutgoingHttpHeadersOptionalsignal?: GenericAbortSignalBulk query revision information for multiple documents.
Fetch specific revisions or revision histories for multiple documents in bulk as replicators do.
The parameters to send to the service.
Parameters for the postBulkGet operation.
Optionalattachments?: booleanQuery parameter to specify whether to include attachments bodies in a response.
OptionalattEncodingInfo?: booleanQuery parameter to specify whether to include the encoding information in attachment stubs if the particular attachment is compressed.
Path parameter to specify the database name.
List of document items to get in bulk.
Optionalheaders?: OutgoingHttpHeadersOptionallatest?: booleanQuery parameter to specify whether to force retrieving latest leaf revision, no matter what rev was requested.
Optionalrevs?: booleanQuery parameter to specify whether to include a list of all known document revisions.
Optionalsignal?: GenericAbortSignalBulk query revision information for multiple documents as mixed.
Fetch specific revisions or revision histories for multiple documents in bulk as replicators do.
The parameters to send to the service.
Parameters for the postBulkGetAsMixed operation.
Optionalattachments?: booleanQuery parameter to specify whether to include attachments bodies in a response.
OptionalattEncodingInfo?: booleanQuery parameter to specify whether to include the encoding information in attachment stubs if the particular attachment is compressed.
Path parameter to specify the database name.
List of document items to get in bulk.
Optionalheaders?: OutgoingHttpHeadersOptionallatest?: booleanQuery parameter to specify whether to force retrieving latest leaf revision, no matter what rev was requested.
Optionalrevs?: booleanQuery parameter to specify whether to include a list of all known document revisions.
Optionalsignal?: GenericAbortSignalBulk query revision information for multiple documents as related.
Fetch specific revisions or revision histories for multiple documents in bulk as replicators do.
The parameters to send to the service.
Parameters for the postBulkGetAsRelated operation.
Optionalattachments?: booleanQuery parameter to specify whether to include attachments bodies in a response.
OptionalattEncodingInfo?: booleanQuery parameter to specify whether to include the encoding information in attachment stubs if the particular attachment is compressed.
Path parameter to specify the database name.
List of document items to get in bulk.
Optionalheaders?: OutgoingHttpHeadersOptionallatest?: booleanQuery parameter to specify whether to force retrieving latest leaf revision, no matter what rev was requested.
Optionalrevs?: booleanQuery parameter to specify whether to include a list of all known document revisions.
Optionalsignal?: GenericAbortSignalBulk query revision information for multiple documents as stream.
Fetch specific revisions or revision histories for multiple documents in bulk as replicators do.
The parameters to send to the service.
Parameters for the postBulkGetAsStream operation.
Optionalattachments?: booleanQuery parameter to specify whether to include attachments bodies in a response.
OptionalattEncodingInfo?: booleanQuery parameter to specify whether to include the encoding information in attachment stubs if the particular attachment is compressed.
Path parameter to specify the database name.
List of document items to get in bulk.
Optionalheaders?: OutgoingHttpHeadersOptionallatest?: booleanQuery parameter to specify whether to force retrieving latest leaf revision, no matter what rev was requested.
Optionalrevs?: booleanQuery parameter to specify whether to include a list of all known document revisions.
Optionalsignal?: GenericAbortSignalQuery the database document changes feed.
Requests the database changes feed in the same way as GET /{db}/_changes does. It is widely used with the
filter query parameter because it allows one to pass more information to the filter.
Before using the changes feed read the FAQs to understand the limitations and appropriate use cases.
If you need to pass parameters to dynamically change the filtered content use the _selector filter type for
better performance and compatibility. The SDKs have full support for change requests using selector filters, but
don't support passing parameters to design document filters.
The parameters to send to the service.
Parameters for the postChanges operation.
Optionalattachments?: booleanQuery parameter to specify whether to include attachments bodies in a response.
OptionalattEncodingInfo?: booleanQuery parameter to specify whether to include the encoding information in attachment stubs if the particular attachment is compressed.
Optionalconflicts?: booleanQuery 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.
Optionaldescending?: booleanQuery parameter to specify whether to return the documents in descending by key order.
OptionaldocIds?: string[]Schema for a list of document IDs.
Optionalfeed?: stringQuery parameter to specify the changes feed type.
Optionalfields?: string[]JSON array that uses the field syntax. Use this parameter to specify which fields of a document must be returned. If it is omitted or empty, the entire document is returned.
Optionalfilter?: stringQuery parameter to specify a filter to emit only specific events from the changes stream.
The built-in filter types are:
_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. (POST only)_selector - Returns changes for documents that match the selector
request body parameter. The selector syntax is the same as used for
_find. (POST only)_view - Returns changes for documents that match an existing map
function in the view specified by the query parameter view.Additionally, the value can be the name of a JS filter function from a design document. For example:
design_doc/filtername.
Note: For better performance use the built-in _selector, _design or _doc_ids filters rather than JS
based _view or design document filters. If you need to pass values to change the filtered content use the
_selector filter type.
Optionalheaders?: OutgoingHttpHeadersOptionalheartbeat?: numberQuery parameter to specify the period in milliseconds after which an empty line is sent in the results. Off
by default and only applicable for
continuous and eventsource feeds. Overrides any timeout to keep the feed alive indefinitely. May also be
true to use a value of 60000.
Note: Delivery of heartbeats cannot be relied on at specific intervals. If your application runs in an
environment where idle network connections may break, heartbeat is not suitable as a keepalive mechanism.
Instead, consider one of the following options:
timeout parameter with a value that is compatible with your network environment.normal or longpoll).OptionalincludeDocs?: booleanQuery parameter to specify whether to include the full content of the documents in the response.
OptionallastEventId?: stringHeader parameter to specify the ID of the last events received by the server on a previous connection.
Overrides since query parameter.
Optionallimit?: numberQuery parameter to specify the number of returned documents to limit the result to.
Optionalselector?: JsonObjectJSON 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:
$eq operator matches when the specified field contains a value that is equal to the
supplied argument.It is important for query performance to use appropriate selectors:
$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.$not, $or, $in, and $regex cannot be answered from an index. For query
selectors use these operators in conjunction with equality operators or create and use a partial index to reduce
the number of documents that will need to be scanned.See the Cloudant Docsfor a list of all available combination and conditional operators.
For further reference see selector syntax.
OptionalseqInterval?: numberQuery 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.
Optionalsignal?: GenericAbortSignalOptionalsince?: stringQuery 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.
Optionalstyle?: stringQuery 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).
Optionaltimeout?: numberQuery 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.
Optionalview?: stringQuery 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.
Query the database document changes feed as stream.
Requests the database changes feed in the same way as GET /{db}/_changes does. It is widely used with the
filter query parameter because it allows one to pass more information to the filter.
Before using the changes feed read the FAQs to understand the limitations and appropriate use cases.
If you need to pass parameters to dynamically change the filtered content use the _selector filter type for
better performance and compatibility. The SDKs have full support for change requests using selector filters, but
don't support passing parameters to design document filters.
The parameters to send to the service.
Parameters for the postChangesAsStream operation.
Optionalattachments?: booleanQuery parameter to specify whether to include attachments bodies in a response.
OptionalattEncodingInfo?: booleanQuery parameter to specify whether to include the encoding information in attachment stubs if the particular attachment is compressed.
Optionalconflicts?: booleanQuery 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.
Optionaldescending?: booleanQuery parameter to specify whether to return the documents in descending by key order.
OptionaldocIds?: string[]Schema for a list of document IDs.
Optionalfeed?: stringQuery parameter to specify the changes feed type.
Optionalfields?: string[]JSON array that uses the field syntax. Use this parameter to specify which fields of a document must be returned. If it is omitted or empty, the entire document is returned.
Optionalfilter?: stringQuery parameter to specify a filter to emit only specific events from the changes stream.
The built-in filter types are:
_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. (POST only)_selector - Returns changes for documents that match the selector
request body parameter. The selector syntax is the same as used for
_find. (POST only)_view - Returns changes for documents that match an existing map
function in the view specified by the query parameter view.Additionally, the value can be the name of a JS filter function from a design document. For example:
design_doc/filtername.
Note: For better performance use the built-in _selector, _design or _doc_ids filters rather than JS
based _view or design document filters. If you need to pass values to change the filtered content use the
_selector filter type.
Optionalheaders?: OutgoingHttpHeadersOptionalheartbeat?: numberQuery parameter to specify the period in milliseconds after which an empty line is sent in the results. Off
by default and only applicable for
continuous and eventsource feeds. Overrides any timeout to keep the feed alive indefinitely. May also be
true to use a value of 60000.
Note: Delivery of heartbeats cannot be relied on at specific intervals. If your application runs in an
environment where idle network connections may break, heartbeat is not suitable as a keepalive mechanism.
Instead, consider one of the following options:
timeout parameter with a value that is compatible with your network environment.normal or longpoll).OptionalincludeDocs?: booleanQuery parameter to specify whether to include the full content of the documents in the response.
OptionallastEventId?: stringHeader parameter to specify the ID of the last events received by the server on a previous connection.
Overrides since query parameter.
Optionallimit?: numberQuery parameter to specify the number of returned documents to limit the result to.
Optionalselector?: JsonObjectJSON 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:
$eq operator matches when the specified field contains a value that is equal to the
supplied argument.It is important for query performance to use appropriate selectors:
$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.$not, $or, $in, and $regex cannot be answered from an index. For query
selectors use these operators in conjunction with equality operators or create and use a partial index to reduce
the number of documents that will need to be scanned.See the Cloudant Docsfor a list of all available combination and conditional operators.
For further reference see selector syntax.
OptionalseqInterval?: numberQuery 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.
Optionalsignal?: GenericAbortSignalOptionalsince?: stringQuery 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.
Optionalstyle?: stringQuery 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).
Optionaltimeout?: numberQuery 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.
Optionalview?: stringQuery 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.
Query information about multiple databases.
This operation enables you to request information about multiple databases in a single request, instead of issuing
multiple GET /{db} requests. It returns a list that contains an information object for each database specified in
the request.
The parameters to send to the service.
Parameters for the postDbsInfo operation.
Query a list of all design documents in a database.
Queries the index of all design document IDs. The results matching the request body parameters are returned in a JSON object, including a list of matching design documents with basic contents, such as the ID and revision. When no request body parameters are specified, results for all design documents in the database are returned. Optionally, the design document content or additional metadata can be included in the response.
The parameters to send to the service.
Parameters for the postDesignDocs operation.
Optionalattachments?: booleanParameter to specify whether to include attachments bodies in a response.
OptionalattEncodingInfo?: booleanParameter to specify whether to include the encoding information in attachment stubs if the particular attachment is compressed.
Optionalconflicts?: booleanParameter 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.
Optionaldescending?: booleanParameter to specify whether to return the documents in descending by key order.
OptionalendKey?: stringSchema for a document ID.
Optionalheaders?: OutgoingHttpHeadersOptionalincludeDocs?: booleanParameter to specify whether to include the full content of the documents in the response.
OptionalinclusiveEnd?: booleanParameter to specify whether the specified end key should be included in the result.
Optionalkey?: stringSchema for a document ID.
Optionalkeys?: string[]Schema for a list of document IDs.
Optionallimit?: numberParameter to specify the number of returned documents to limit the result to.
Optionalsignal?: GenericAbortSignalOptionalskip?: numberParameter to specify the number of records before starting to return the results.
OptionalstartKey?: stringSchema for a document ID.
OptionalupdateSeq?: booleanParameter to specify whether to include in the response an update_seq value indicating the sequence id of the database the view reflects.
Multi-query the list of all design documents.
This operation runs multiple view queries of all design documents in the database. This operation enables you to
request numerous queries in a single request, in place of multiple POST /{db}/_design_docs requests.
The parameters to send to the service.
Parameters for the postDesignDocsQueries operation.
Optionalaccept?: stringThe type of the response: application/json or application/octet-stream.
Path parameter to specify the database name.
Optionalheaders?: OutgoingHttpHeadersAn array of query objects with fields for the parameters of each individual view query to be executed. The
field names and their meaning are the same as the query parameters of a regular /_all_docs request.
Optionalsignal?: GenericAbortSignalCreate or modify a document in a database.
Creates or modifies a document in the specified database by using the supplied JSON document.
For creation, you may specify the document ID but you should not specify the revision. If you don't specify the document ID, then the server generates an ID for your document.
For modification, you must specify the document ID and a revision identifier in the JSON document.
If your document ID includes the _local/ or _design/ prefix, then this operation creates or modifies a local or
a design document respectively.
The parameters to send to the service.
Parameters for the postDocument operation.
Optionalbatch?: stringQuery parameter to specify whether to store in batch mode. The server will respond with a HTTP 202 Accepted response code immediately.
OptionalcontentType?: stringThe type of the input.
Path parameter to specify the database name.
HTTP request body for Document operations.
Optionalheaders?: OutgoingHttpHeadersOptionalsignal?: GenericAbortSignalRetrieve information about which index is used for a query.
Shows which index is being used by the query. Parameters are the same as the _find endpoint.
The parameters to send to the service.
Parameters for the postExplain operation.
OptionalallowFallback?: booleanWhether to allow fallback to other indexes. Default is true.
Optionalbookmark?: stringOpaque bookmark token used when paginating results.
Optionalconflicts?: booleanA boolean value that indicates whether or not to include information about existing conflicts in the document.
Path parameter to specify the database name.
OptionalexecutionStats?: booleanUse this option to find information about the query that was run. This information includes total key
lookups, total document lookups (when include_docs=true is used), and total quorum document lookups (when each
document replica is fetched).
Optionalfields?: string[]JSON array that uses the field syntax. Use this parameter to specify which fields of a document must be returned. If it is omitted or empty, the entire document is returned.
Optionalheaders?: OutgoingHttpHeadersOptionallimit?: numberMaximum number of results returned. The type: text indexes are limited to 200 results when queried.
Optionalr?: numberThe read quorum that is needed for the result. The value defaults to 1, in which case the document that was found in the index is returned. If set to a higher value, each document is read from at least that many replicas before it is returned in the results. The request will take more time than using only the document that is stored locally with the index.
JSON 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:
$eq operator matches when the specified field contains a value that is equal to the
supplied argument.It is important for query performance to use appropriate selectors:
$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.$not, $or, $in, and $regex cannot be answered from an index. For query
selectors use these operators in conjunction with equality operators or create and use a partial index to reduce
the number of documents that will need to be scanned.See the Cloudant Docsfor a list of all available combination and conditional operators.
For further reference see selector syntax.
Optionalsignal?: GenericAbortSignalOptionalskip?: numberSkip the first 'n' results, where 'n' is the value that is specified.
Optionalsort?: JsonObject[]The sort field contains a list of pairs, each mapping a field name to a sort direction (asc or desc). The first field name and direction pair is the topmost level of sort. The second pair, if provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document fields.
For example in JSON: [{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]
When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the same order and each object in the sort array has a single key or at least one of the sort fields is included in the selector. All sorting fields must use the same sort direction, either all ascending or all descending.
Optionalstable?: booleanWhether or not the view results should be returned from a "stable" set of shards.
Optionalupdate?: stringWhether to update the index prior to returning the result.
OptionaluseIndex?: string[]Use this option to identify a specific index to answer the query, rather than letting the IBM Cloudant query
planner choose an index. Specified as a two element array of design document id followed by index name, for
example ["my_design_doc", "my_index"].
It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new indexes that might get added later.
If the specified index doesn't exist or can't answer the query then the server ignores the value and answers
using another index or a full scan of all documents. To change this behavior set allow_fallback to false and
the server responds instead with a 400 status code if the requested index is unsuitable to answer the query.
Query an index by using selector syntax.
Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
all fields in selector by using the _index endpoint.
Queries without an appropriate backing index by default fallback to using the built-in _all_docs index. This
isn't recommended because it has a significant performance impact causing a full scan of the database with each
request. In this case the response body includes a warning field recommending the creation of an index.
To avoid the fallback behavior set the allow_fallback option to false and the server responds with a 400
status code if no suitable index exists. If you want to use only a specific index for your query set
allow_fallback to false and set the use_index option.
The parameters to send to the service.
Parameters for the postFind operation.
OptionalallowFallback?: booleanWhether to allow fallback to other indexes. Default is true.
Optionalbookmark?: stringOpaque bookmark token used when paginating results.
Optionalconflicts?: booleanA boolean value that indicates whether or not to include information about existing conflicts in the document.
Path parameter to specify the database name.
OptionalexecutionStats?: booleanUse this option to find information about the query that was run. This information includes total key
lookups, total document lookups (when include_docs=true is used), and total quorum document lookups (when each
document replica is fetched).
Optionalfields?: string[]JSON array that uses the field syntax. Use this parameter to specify which fields of a document must be returned. If it is omitted or empty, the entire document is returned.
Optionalheaders?: OutgoingHttpHeadersOptionallimit?: numberMaximum number of results returned. The type: text indexes are limited to 200 results when queried.
Optionalr?: numberThe read quorum that is needed for the result. The value defaults to 1, in which case the document that was found in the index is returned. If set to a higher value, each document is read from at least that many replicas before it is returned in the results. The request will take more time than using only the document that is stored locally with the index.
JSON 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:
$eq operator matches when the specified field contains a value that is equal to the
supplied argument.It is important for query performance to use appropriate selectors:
$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.$not, $or, $in, and $regex cannot be answered from an index. For query
selectors use these operators in conjunction with equality operators or create and use a partial index to reduce
the number of documents that will need to be scanned.See the Cloudant Docsfor a list of all available combination and conditional operators.
For further reference see selector syntax.
Optionalsignal?: GenericAbortSignalOptionalskip?: numberSkip the first 'n' results, where 'n' is the value that is specified.
Optionalsort?: JsonObject[]The sort field contains a list of pairs, each mapping a field name to a sort direction (asc or desc). The first field name and direction pair is the topmost level of sort. The second pair, if provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document fields.
For example in JSON: [{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]
When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the same order and each object in the sort array has a single key or at least one of the sort fields is included in the selector. All sorting fields must use the same sort direction, either all ascending or all descending.
Optionalstable?: booleanWhether or not the view results should be returned from a "stable" set of shards.
Optionalupdate?: stringWhether to update the index prior to returning the result.
OptionaluseIndex?: string[]Use this option to identify a specific index to answer the query, rather than letting the IBM Cloudant query
planner choose an index. Specified as a two element array of design document id followed by index name, for
example ["my_design_doc", "my_index"].
It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new indexes that might get added later.
If the specified index doesn't exist or can't answer the query then the server ignores the value and answers
using another index or a full scan of all documents. To change this behavior set allow_fallback to false and
the server responds instead with a 400 status code if the requested index is unsuitable to answer the query.
Query an index by using selector syntax as stream.
Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
all fields in selector by using the _index endpoint.
Queries without an appropriate backing index by default fallback to using the built-in _all_docs index. This
isn't recommended because it has a significant performance impact causing a full scan of the database with each
request. In this case the response body includes a warning field recommending the creation of an index.
To avoid the fallback behavior set the allow_fallback option to false and the server responds with a 400
status code if no suitable index exists. If you want to use only a specific index for your query set
allow_fallback to false and set the use_index option.
The parameters to send to the service.
Parameters for the postFindAsStream operation.
OptionalallowFallback?: booleanWhether to allow fallback to other indexes. Default is true.
Optionalbookmark?: stringOpaque bookmark token used when paginating results.
Optionalconflicts?: booleanA boolean value that indicates whether or not to include information about existing conflicts in the document.
Path parameter to specify the database name.
OptionalexecutionStats?: booleanUse this option to find information about the query that was run. This information includes total key
lookups, total document lookups (when include_docs=true is used), and total quorum document lookups (when each
document replica is fetched).
Optionalfields?: string[]JSON array that uses the field syntax. Use this parameter to specify which fields of a document must be returned. If it is omitted or empty, the entire document is returned.
Optionalheaders?: OutgoingHttpHeadersOptionallimit?: numberMaximum number of results returned. The type: text indexes are limited to 200 results when queried.
Optionalr?: numberThe read quorum that is needed for the result. The value defaults to 1, in which case the document that was found in the index is returned. If set to a higher value, each document is read from at least that many replicas before it is returned in the results. The request will take more time than using only the document that is stored locally with the index.
JSON 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:
$eq operator matches when the specified field contains a value that is equal to the
supplied argument.It is important for query performance to use appropriate selectors:
$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.$not, $or, $in, and $regex cannot be answered from an index. For query
selectors use these operators in conjunction with equality operators or create and use a partial index to reduce
the number of documents that will need to be scanned.See the Cloudant Docsfor a list of all available combination and conditional operators.
For further reference see selector syntax.
Optionalsignal?: GenericAbortSignalOptionalskip?: numberSkip the first 'n' results, where 'n' is the value that is specified.
Optionalsort?: JsonObject[]The sort field contains a list of pairs, each mapping a field name to a sort direction (asc or desc). The first field name and direction pair is the topmost level of sort. The second pair, if provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document fields.
For example in JSON: [{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]
When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the same order and each object in the sort array has a single key or at least one of the sort fields is included in the selector. All sorting fields must use the same sort direction, either all ascending or all descending.
Optionalstable?: booleanWhether or not the view results should be returned from a "stable" set of shards.
Optionalupdate?: stringWhether to update the index prior to returning the result.
OptionaluseIndex?: string[]Use this option to identify a specific index to answer the query, rather than letting the IBM Cloudant query
planner choose an index. Specified as a two element array of design document id followed by index name, for
example ["my_design_doc", "my_index"].
It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new indexes that might get added later.
If the specified index doesn't exist or can't answer the query then the server ignores the value and answers
using another index or a full scan of all documents. To change this behavior set allow_fallback to false and
the server responds instead with a 400 status code if the requested index is unsuitable to answer the query.
Create a new index on a database.
Create a new index on a database.
The parameters to send to the service.
Parameters for the postIndex operation.
Path parameter to specify the database name.
Optionalddoc?: stringSpecifies the design document name in which the index will be created. The design document name is the
design document ID excluding the _design/ prefix.
Optionalheaders?: OutgoingHttpHeadersSchema for a json or text query index definition. Indexes of type text have additional configuration
properties that do not apply to json indexes, these are:
default_analyzer - the default text analyzer to use * default_field - whether to index the text in all
document fields and what analyzer to use for that purpose.Optionalname?: stringname.
Optionalpartitioned?: booleanThe default value is true for databases with partitioned: true and false otherwise. For databases with
partitioned: false if this option is specified the value must be false.
Optionalsignal?: GenericAbortSignalOptionaltype?: stringSchema for the type of an index.
Query a list of all documents in a database partition.
Queries the primary index (all document IDs). The results that match the query parameters are returned in a JSON object, including a list of matching documents with basic contents, such as the ID and revision. When no query parameters are specified, results for all documents in the database partition are returned. Optionally, document content or additional metadata can be included in the response.
The parameters to send to the service.
Parameters for the postPartitionAllDocs operation.
Optionalattachments?: booleanParameter to specify whether to include attachments bodies in a response.
OptionalattEncodingInfo?: booleanParameter to specify whether to include the encoding information in attachment stubs if the particular attachment is compressed.
Optionalconflicts?: booleanParameter 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.
Optionaldescending?: booleanParameter to specify whether to return the documents in descending by key order.
OptionalendKey?: stringSchema for a document ID.
Optionalheaders?: OutgoingHttpHeadersOptionalincludeDocs?: booleanParameter to specify whether to include the full content of the documents in the response.
OptionalinclusiveEnd?: booleanParameter to specify whether the specified end key should be included in the result.
Optionalkey?: stringSchema for a document ID.
Optionalkeys?: string[]Schema for a list of document IDs.
Optionallimit?: numberParameter to specify the number of returned documents to limit the result to.
Path parameter to specify the database partition key.
Optionalsignal?: GenericAbortSignalOptionalskip?: numberParameter to specify the number of records before starting to return the results.
OptionalstartKey?: stringSchema for a document ID.
OptionalupdateSeq?: booleanParameter to specify whether to include in the response an update_seq value indicating the sequence id of the database the view reflects.
Query a list of all documents in a database partition as stream.
Queries the primary index (all document IDs). The results that match the query parameters are returned in a JSON object, including a list of matching documents with basic contents, such as the ID and revision. When no query parameters are specified, results for all documents in the database partition are returned. Optionally, document content or additional metadata can be included in the response.
The parameters to send to the service.
Parameters for the postPartitionAllDocsAsStream operation.
Optionalattachments?: booleanParameter to specify whether to include attachments bodies in a response.
OptionalattEncodingInfo?: booleanParameter to specify whether to include the encoding information in attachment stubs if the particular attachment is compressed.
Optionalconflicts?: booleanParameter 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.
Optionaldescending?: booleanParameter to specify whether to return the documents in descending by key order.
OptionalendKey?: stringSchema for a document ID.
Optionalheaders?: OutgoingHttpHeadersOptionalincludeDocs?: booleanParameter to specify whether to include the full content of the documents in the response.
OptionalinclusiveEnd?: booleanParameter to specify whether the specified end key should be included in the result.
Optionalkey?: stringSchema for a document ID.
Optionalkeys?: string[]Schema for a list of document IDs.
Optionallimit?: numberParameter to specify the number of returned documents to limit the result to.
Path parameter to specify the database partition key.
Optionalsignal?: GenericAbortSignalOptionalskip?: numberParameter to specify the number of records before starting to return the results.
OptionalstartKey?: stringSchema for a document ID.
OptionalupdateSeq?: booleanParameter to specify whether to include in the response an update_seq value indicating the sequence id of the database the view reflects.
Retrieve information about which partition index is used for a query.
Shows which index is being used by the query. Parameters are the same as the
/{db}/_partition/{partition_key}/_find endpoint.
The parameters to send to the service.
Parameters for the postPartitionExplain operation.
OptionalallowFallback?: booleanWhether to allow fallback to other indexes. Default is true.
Optionalbookmark?: stringOpaque bookmark token used when paginating results.
Optionalconflicts?: booleanA boolean value that indicates whether or not to include information about existing conflicts in the document.
Path parameter to specify the database name.
OptionalexecutionStats?: booleanUse this option to find information about the query that was run. This information includes total key
lookups, total document lookups (when include_docs=true is used), and total quorum document lookups (when each
document replica is fetched).
Optionalfields?: string[]JSON array that uses the field syntax. Use this parameter to specify which fields of a document must be returned. If it is omitted or empty, the entire document is returned.
Optionalheaders?: OutgoingHttpHeadersOptionallimit?: numberMaximum number of results returned. The type: text indexes are limited to 200 results when queried.
Path parameter to specify the database partition key.
JSON 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:
$eq operator matches when the specified field contains a value that is equal to the
supplied argument.It is important for query performance to use appropriate selectors:
$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.$not, $or, $in, and $regex cannot be answered from an index. For query
selectors use these operators in conjunction with equality operators or create and use a partial index to reduce
the number of documents that will need to be scanned.See the Cloudant Docsfor a list of all available combination and conditional operators.
For further reference see selector syntax.
Optionalsignal?: GenericAbortSignalOptionalskip?: numberSkip the first 'n' results, where 'n' is the value that is specified.
Optionalsort?: JsonObject[]The sort field contains a list of pairs, each mapping a field name to a sort direction (asc or desc). The first field name and direction pair is the topmost level of sort. The second pair, if provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document fields.
For example in JSON: [{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]
When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the same order and each object in the sort array has a single key or at least one of the sort fields is included in the selector. All sorting fields must use the same sort direction, either all ascending or all descending.
Optionalstable?: booleanWhether or not the view results should be returned from a "stable" set of shards.
Optionalupdate?: stringWhether to update the index prior to returning the result.
OptionaluseIndex?: string[]Use this option to identify a specific index to answer the query, rather than letting the IBM Cloudant query
planner choose an index. Specified as a two element array of design document id followed by index name, for
example ["my_design_doc", "my_index"].
It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new indexes that might get added later.
If the specified index doesn't exist or can't answer the query then the server ignores the value and answers
using another index or a full scan of all documents. To change this behavior set allow_fallback to false and
the server responds instead with a 400 status code if the requested index is unsuitable to answer the query.
Query a database partition index by using selector syntax.
Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
all fields in selector by using the _index endpoint.
Queries without an appropriate backing index by default fallback to using the built-in _all_docs index. This
isn't recommended because it has a significant performance impact causing a full scan of the partition with each
request. In this case the response body includes a warning field recommending the creation of an index.
To avoid the fallback behavior set the allow_fallback option to false and the server responds with a 400
status code if no suitable index exists. If you want to use only a specific index for your query set
allow_fallback to false and set the use_index option.
Before using read the FAQs to understand the limitations and appropriate use cases.
The parameters to send to the service.
Parameters for the postPartitionFind operation.
OptionalallowFallback?: booleanWhether to allow fallback to other indexes. Default is true.
Optionalbookmark?: stringOpaque bookmark token used when paginating results.
Optionalconflicts?: booleanA boolean value that indicates whether or not to include information about existing conflicts in the document.
Path parameter to specify the database name.
OptionalexecutionStats?: booleanUse this option to find information about the query that was run. This information includes total key
lookups, total document lookups (when include_docs=true is used), and total quorum document lookups (when each
document replica is fetched).
Optionalfields?: string[]JSON array that uses the field syntax. Use this parameter to specify which fields of a document must be returned. If it is omitted or empty, the entire document is returned.
Optionalheaders?: OutgoingHttpHeadersOptionallimit?: numberMaximum number of results returned. The type: text indexes are limited to 200 results when queried.
Path parameter to specify the database partition key.
JSON 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:
$eq operator matches when the specified field contains a value that is equal to the
supplied argument.It is important for query performance to use appropriate selectors:
$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.$not, $or, $in, and $regex cannot be answered from an index. For query
selectors use these operators in conjunction with equality operators or create and use a partial index to reduce
the number of documents that will need to be scanned.See the Cloudant Docsfor a list of all available combination and conditional operators.
For further reference see selector syntax.
Optionalsignal?: GenericAbortSignalOptionalskip?: numberSkip the first 'n' results, where 'n' is the value that is specified.
Optionalsort?: JsonObject[]The sort field contains a list of pairs, each mapping a field name to a sort direction (asc or desc). The first field name and direction pair is the topmost level of sort. The second pair, if provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document fields.
For example in JSON: [{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]
When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the same order and each object in the sort array has a single key or at least one of the sort fields is included in the selector. All sorting fields must use the same sort direction, either all ascending or all descending.
Optionalstable?: booleanWhether or not the view results should be returned from a "stable" set of shards.
Optionalupdate?: stringWhether to update the index prior to returning the result.
OptionaluseIndex?: string[]Use this option to identify a specific index to answer the query, rather than letting the IBM Cloudant query
planner choose an index. Specified as a two element array of design document id followed by index name, for
example ["my_design_doc", "my_index"].
It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new indexes that might get added later.
If the specified index doesn't exist or can't answer the query then the server ignores the value and answers
using another index or a full scan of all documents. To change this behavior set allow_fallback to false and
the server responds instead with a 400 status code if the requested index is unsuitable to answer the query.
Query a database partition index by using selector syntax as stream.
Query documents by using a declarative JSON querying syntax. It's best practice to create an appropriate index for
all fields in selector by using the _index endpoint.
Queries without an appropriate backing index by default fallback to using the built-in _all_docs index. This
isn't recommended because it has a significant performance impact causing a full scan of the partition with each
request. In this case the response body includes a warning field recommending the creation of an index.
To avoid the fallback behavior set the allow_fallback option to false and the server responds with a 400
status code if no suitable index exists. If you want to use only a specific index for your query set
allow_fallback to false and set the use_index option.
Before using read the FAQs to understand the limitations and appropriate use cases.
The parameters to send to the service.
Parameters for the postPartitionFindAsStream operation.
OptionalallowFallback?: booleanWhether to allow fallback to other indexes. Default is true.
Optionalbookmark?: stringOpaque bookmark token used when paginating results.
Optionalconflicts?: booleanA boolean value that indicates whether or not to include information about existing conflicts in the document.
Path parameter to specify the database name.
OptionalexecutionStats?: booleanUse this option to find information about the query that was run. This information includes total key
lookups, total document lookups (when include_docs=true is used), and total quorum document lookups (when each
document replica is fetched).
Optionalfields?: string[]JSON array that uses the field syntax. Use this parameter to specify which fields of a document must be returned. If it is omitted or empty, the entire document is returned.
Optionalheaders?: OutgoingHttpHeadersOptionallimit?: numberMaximum number of results returned. The type: text indexes are limited to 200 results when queried.
Path parameter to specify the database partition key.
JSON 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:
$eq operator matches when the specified field contains a value that is equal to the
supplied argument.It is important for query performance to use appropriate selectors:
$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.$not, $or, $in, and $regex cannot be answered from an index. For query
selectors use these operators in conjunction with equality operators or create and use a partial index to reduce
the number of documents that will need to be scanned.See the Cloudant Docsfor a list of all available combination and conditional operators.
For further reference see selector syntax.
Optionalsignal?: GenericAbortSignalOptionalskip?: numberSkip the first 'n' results, where 'n' is the value that is specified.
Optionalsort?: JsonObject[]The sort field contains a list of pairs, each mapping a field name to a sort direction (asc or desc). The first field name and direction pair is the topmost level of sort. The second pair, if provided, is the next level of sort. The field can be any field, using dotted notation if desired for sub-document fields.
For example in JSON: [{"fieldName1": "desc"}, {"fieldName2.subFieldName1": "desc"}]
When sorting with multiple fields, ensure that there is an index already defined with all the sort fields in the same order and each object in the sort array has a single key or at least one of the sort fields is included in the selector. All sorting fields must use the same sort direction, either all ascending or all descending.
Optionalstable?: booleanWhether or not the view results should be returned from a "stable" set of shards.
Optionalupdate?: stringWhether to update the index prior to returning the result.
OptionaluseIndex?: string[]Use this option to identify a specific index to answer the query, rather than letting the IBM Cloudant query
planner choose an index. Specified as a two element array of design document id followed by index name, for
example ["my_design_doc", "my_index"].
It’s recommended to specify indexes explicitly in your queries to prevent existing queries being affected by new indexes that might get added later.
If the specified index doesn't exist or can't answer the query then the server ignores the value and answers
using another index or a full scan of all documents. To change this behavior set allow_fallback to false and
the server responds instead with a 400 status code if the requested index is unsuitable to answer the query.
Query a database partition search index.
Partitioned Search indexes, which are defined in design documents, allow partition databases to be queried by using Lucene Query Parser Syntax. Search indexes are defined by an index function, similar to a map function in MapReduce views. The index function decides what data to index and store in the index.
Before using read the FAQs to understand the limitations and appropriate use cases.
The parameters to send to the service.
Parameters for the postPartitionSearch operation.
Optionalbookmark?: stringOpaque bookmark token used when paginating results.
Path parameter to specify the database name.
Path parameter to specify the design document name. The design document name is the design document ID
excluding the _design/ prefix.
Optionalheaders?: OutgoingHttpHeadersOptionalhighlightFields?: string[]Specifies which fields to highlight. If specified, the result object contains a highlights field with an entry for each specified field.
OptionalhighlightNumber?: numberNumber of fragments that are returned in highlights. If the search term occurs less often than the number of fragments that are specified, longer fragments are returned.
OptionalhighlightPostTag?: stringA string that is inserted after the highlighted word in the highlights output.
OptionalhighlightPreTag?: stringA string that is inserted before the highlighted word in the highlights output.
OptionalhighlightSize?: numberNumber of characters in each fragment for highlights.
OptionalincludeDocs?: booleanInclude the full content of the documents in the return.
OptionalincludeFields?: string[]A JSON array of field names to include in search results. Any fields that are included must be indexed with the store:true option. The default is all fields.
Path parameter to specify the index name.
Optionallimit?: numberLimit the number of the returned documents to the specified number.
Path parameter to specify the database partition key.
The Lucene query to execute.
Optionalsignal?: GenericAbortSignalOptionalsort?: string[]Specifies the sort order of the results. In a grouped search (when group_field is used), this parameter specifies the sort order within a group. The default sort order is relevance. A JSON string of the form "fieldname<type>" or "-fieldname<type>" for descending order, where fieldname is the name of a string or number field, and type is either a number, a string, or a JSON array of strings. The type part is optional, and defaults to number. Some examples are "foo", "-foo", "bar<string>", "-foo<number>" and ["-foo<number>", "bar<string>"]. String fields that are used for sorting must not be analyzed fields. Fields that are used for sorting must be indexed by the same indexer that is used for the search query.
Optionalstale?: stringDo not wait for the index to finish building to return results.
Query a database partition search index as stream.
Partitioned Search indexes, which are defined in design documents, allow partition databases to be queried by using Lucene Query Parser Syntax. Search indexes are defined by an index function, similar to a map function in MapReduce views. The index function decides what data to index and store in the index.
Before using read the FAQs to understand the limitations and appropriate use cases.
The parameters to send to the service.
Parameters for the postPartitionSearchAsStream operation.
Optionalbookmark?: stringOpaque bookmark token used when paginating results.
Path parameter to specify the database name.
Path parameter to specify the design document name. The design document name is the design document ID
excluding the _design/ prefix.
Optionalheaders?: OutgoingHttpHeadersOptionalhighlightFields?: string[]Specifies which fields to highlight. If specified, the result object contains a highlights field with an entry for each specified field.
OptionalhighlightNumber?: numberNumber of fragments that are returned in highlights. If the search term occurs less often than the number of fragments that are specified, longer fragments are returned.
OptionalhighlightPostTag?: stringA string that is inserted after the highlighted word in the highlights output.
OptionalhighlightPreTag?: stringA string that is inserted before the highlighted word in the highlights output.
OptionalhighlightSize?: numberNumber of characters in each fragment for highlights.
OptionalincludeDocs?: booleanInclude the full content of the documents in the return.
OptionalincludeFields?: string[]A JSON array of field names to include in search results. Any fields that are included must be indexed with the store:true option. The default is all fields.
Path parameter to specify the index name.
Optionallimit?: numberLimit the number of the returned documents to the specified number.
Path parameter to specify the database partition key.
The Lucene query to execute.
Optionalsignal?: GenericAbortSignalOptionalsort?: string[]Specifies the sort order of the results. In a grouped search (when group_field is used), this parameter specifies the sort order within a group. The default sort order is relevance. A JSON string of the form "fieldname<type>" or "-fieldname<type>" for descending order, where fieldname is the name of a string or number field, and type is either a number, a string, or a JSON array of strings. The type part is optional, and defaults to number. Some examples are "foo", "-foo", "bar<string>", "-foo<number>" and ["-foo<number>", "bar<string>"]. String fields that are used for sorting must not be analyzed fields. Fields that are used for sorting must be indexed by the same indexer that is used for the search query.
Optionalstale?: stringDo not wait for the index to finish building to return results.
Query a database partition MapReduce view function.
Runs the specified view function from the specified design document. Unlike GET /{db}/_design/{ddoc}/_view/{view}
for accessing views, the POST method supports the specification of explicit keys to be retrieved from the view
results. The remainder of the POST view functionality is identical to the GET /{db}/_design/{ddoc}/_view/{view}
API.
Before using read the FAQs to understand the limitations and appropriate use cases.
The parameters to send to the service.
Parameters for the postPartitionView operation.
Optionalattachments?: booleanParameter to specify whether to include attachments bodies in a response.
OptionalattEncodingInfo?: booleanParameter to specify whether to include the encoding information in attachment stubs if the particular attachment is compressed.
Optionalconflicts?: booleanParameter 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.
Path parameter to specify the design document name. The design document name is the design document ID
excluding the _design/ prefix.
Optionaldescending?: booleanParameter to specify whether to return the documents in descending by key order.
OptionalendKey?: anySchema for any JSON type.
OptionalendKeyDocId?: stringSchema for a document ID.
Optionalgroup?: booleanParameter to specify whether to group reduced results by key. Valid only if a reduce function defined in the
view. If the view emits key in JSON array format, then it is possible to reduce groups further based on the
number of array elements with the group_level parameter.
OptionalgroupLevel?: numberParameter to specify a group level to be used. Only applicable if the view uses keys that are JSON arrays.
Implies group is true. Group level groups the reduced results by the specified number of array elements. If
unset, results are grouped by the entire array key, returning a reduced value for each complete key.
Optionalheaders?: OutgoingHttpHeadersOptionalincludeDocs?: booleanParameter to specify whether to include the full content of the documents in the response.
OptionalinclusiveEnd?: booleanParameter to specify whether the specified end key should be included in the result.
Optionalkey?: anySchema for any JSON type.
Optionalkeys?: any[]Parameter to specify returning only documents that match any of the specified keys. A JSON array of keys that match the key type emitted by the view function.
Optionallimit?: numberParameter to specify the number of returned documents to limit the result to.
Path parameter to specify the database partition key.
Optionalreduce?: booleanParameter to specify whether to use the reduce function in a map-reduce view. Default is true when a reduce function is defined.
A default reduce view type can be disabled to behave like a map by setting reduce=false explicitly.
Be aware that include_docs=true can only be used with map views.
Optionalsignal?: GenericAbortSignalOptionalskip?: numberParameter to specify the number of records before starting to return the results.
OptionalstartKey?: anySchema for any JSON type.
OptionalstartKeyDocId?: stringSchema for a document ID.
Optionalupdate?: stringParameter to specify whether or not the view in question should be updated prior to responding to the user.
true - Return results after the view is updated.false - Return results without updating the view.lazy - Return the view results without waiting for an update, but update them immediately after the request.OptionalupdateSeq?: booleanParameter to specify whether to include in the response an update_seq value indicating the sequence id of the database the view reflects.
Path parameter to specify the map reduce view function name.
Query a database partition MapReduce view function as stream.
Runs the specified view function from the specified design document. Unlike GET /{db}/_design/{ddoc}/_view/{view}
for accessing views, the POST method supports the specification of explicit keys to be retrieved from the view
results. The remainder of the POST view functionality is identical to the GET /{db}/_design/{ddoc}/_view/{view}
API.
Before using read the FAQs to understand the limitations and appropriate use cases.
The parameters to send to the service.
Parameters for the postPartitionViewAsStream operation.
Optionalattachments?: booleanParameter to specify whether to include attachments bodies in a response.
OptionalattEncodingInfo?: booleanParameter to specify whether to include the encoding information in attachment stubs if the particular attachment is compressed.
Optionalconflicts?: booleanParameter 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.
Path parameter to specify the design document name. The design document name is the design document ID
excluding the _design/ prefix.
Optionaldescending?: booleanParameter to specify whether to return the documents in descending by key order.
OptionalendKey?: anySchema for any JSON type.
OptionalendKeyDocId?: stringSchema for a document ID.
Optionalgroup?: booleanParameter to specify whether to group reduced results by key. Valid only if a reduce function defined in the
view. If the view emits key in JSON array format, then it is possible to reduce groups further based on the
number of array elements with the group_level parameter.
OptionalgroupLevel?: numberParameter to specify a group level to be used. Only applicable if the view uses keys that are JSON arrays.
Implies group is true. Group level groups the reduced results by the specified number of array elements. If
unset, results are grouped by the entire array key, returning a reduced value for each complete key.
Optionalheaders?: OutgoingHttpHeadersOptionalincludeDocs?: booleanParameter to specify whether to include the full content of the documents in the response.
OptionalinclusiveEnd?: booleanParameter to specify whether the specified end key should be included in the result.
Optionalkey?: anySchema for any JSON type.
Optionalkeys?: any[]Parameter to specify returning only documents that match any of the specified keys. A JSON array of keys that match the key type emitted by the view function.
Optionallimit?: numberParameter to specify the number of returned documents to limit the result to.
Path parameter to specify the database partition key.
Optionalreduce?: booleanParameter to specify whether to use the reduce function in a map-reduce view. Default is true when a reduce function is defined.
A default reduce view type can be disabled to behave like a map by setting reduce=false explicitly.
Be aware that include_docs=true can only be used with map views.
Optionalsignal?: GenericAbortSignalOptionalskip?: numberParameter to specify the number of records before starting to return the results.
OptionalstartKey?: anySchema for any JSON type.
OptionalstartKeyDocId?: stringSchema for a document ID.
Optionalupdate?: stringParameter to specify whether or not the view in question should be updated prior to responding to the user.
true - Return results after the view is updated.false - Return results without updating the view.lazy - Return the view results without waiting for an update, but update them immediately after the request.OptionalupdateSeq?: booleanParameter to specify whether to include in the response an update_seq value indicating the sequence id of the database the view reflects.
Path parameter to specify the map reduce view function name.
Create a persistent replication with a generated ID.
Creates or modifies a document in the _replicator database to start a new replication or to edit an existing
replication.
The parameters to send to the service.
Parameters for the postReplicator operation.
Optionalbatch?: stringQuery parameter to specify whether to store in batch mode. The server will respond with a HTTP 202 Accepted response code immediately.
Optionalheaders?: OutgoingHttpHeadersHTTP request body for replication operations.
Optionalsignal?: GenericAbortSignalQuery the document revisions and possible ancestors missing from the database.
The replicator is the primary user of this operation. After receiving a set of new revision IDs from the source
database, the replicator sends this set to the destination database's _revs_diff to find out which of them
already exists there. It can then avoid fetching and sending already-known document bodies.
The parameters to send to the service.
Parameters for the postRevsDiff operation.
Path parameter to specify the database name.
HTTP request body for operations with Document revisions.
Optionalheaders?: OutgoingHttpHeadersOptionalsignal?: GenericAbortSignalQuery a search index.
Search indexes, which are defined in design documents, allow databases to be queried by using Lucene Query Parser
Syntax. An index function defines a search index, similar to a map function in MapReduce views. The index function
decides what data to index and what data to store in the index. The advantage of using the HTTP POST method is
that the query is submitted as a JSON object in the request body. This avoids the limitations of passing query
options as URL query parameters of a GET request.
The parameters to send to the service.
Parameters for the postSearch operation.
Optionalbookmark?: stringOpaque bookmark token used when paginating results.
Optionalcounts?: string[]This field defines an array of names of string fields, for which counts are requested. The response contains counts for each unique value of this field name among the documents that match the search query. Faceting must be enabled for this parameter to function. This option is only available when making global queries.
Path parameter to specify the database name.
Path parameter to specify the design document name. The design document name is the design document ID
excluding the _design/ prefix.
Optionaldrilldown?: string[][]Restrict results to documents with a dimension equal to the specified label(s). The search matches only documents containing the value that was provided in the named field. It differs from using "fieldname:value" in the q parameter only in that the values are not analyzed. Faceting must be enabled for this parameter to function.
OptionalgroupField?: stringField by which to group search matches. A string that contains the name of a string field. Fields containing other data such as numbers, objects, or arrays cannot be used. This option is only available when making global queries.
OptionalgroupLimit?: numberMaximum group count. This field can be used only if group_field is specified. This option is only available when making global queries.
OptionalgroupSort?: string[]This field defines the order of the groups in a search that uses group_field. The default sort order is relevance. This field can have the same values as the sort field, so single fields and arrays of fields are supported. This option is only available when making global queries.
Optionalheaders?: OutgoingHttpHeadersOptionalhighlightFields?: string[]Specifies which fields to highlight. If specified, the result object contains a highlights field with an entry for each specified field.
OptionalhighlightNumber?: numberNumber of fragments that are returned in highlights. If the search term occurs less often than the number of fragments that are specified, longer fragments are returned.
OptionalhighlightPostTag?: stringA string that is inserted after the highlighted word in the highlights output.
OptionalhighlightPreTag?: stringA string that is inserted before the highlighted word in the highlights output.
OptionalhighlightSize?: numberNumber of characters in each fragment for highlights.
OptionalincludeDocs?: booleanInclude the full content of the documents in the return.
OptionalincludeFields?: string[]A JSON array of field names to include in search results. Any fields that are included must be indexed with the store:true option. The default is all fields.
Path parameter to specify the index name.
Optionallimit?: numberLimit the number of the returned documents to the specified number.
The Lucene query to execute.
Optionalranges?: JsonObjectObject mapping faceted, numeric search field names to the required ranges. Each key is a field name and each value is another object defining the ranges by mapping range name keys to string values describing the numeric ranges, for example "[0 TO 10]". This option is only available when making global queries.
Optionalsignal?: GenericAbortSignalOptionalsort?: string[]Specifies the sort order of the results. In a grouped search (when group_field is used), this parameter specifies the sort order within a group. The default sort order is relevance. A JSON string of the form "fieldname<type>" or "-fieldname<type>" for descending order, where fieldname is the name of a string or number field, and type is either a number, a string, or a JSON array of strings. The type part is optional, and defaults to number. Some examples are "foo", "-foo", "bar<string>", "-foo<number>" and ["-foo<number>", "bar<string>"]. String fields that are used for sorting must not be analyzed fields. Fields that are used for sorting must be indexed by the same indexer that is used for the search query.
Optionalstale?: stringDo not wait for the index to finish building to return results.
Query tokenization of sample text.
Returns the results of analyzer tokenization of the provided sample text. This endpoint can be used for testing analyzer tokenization.
The parameters to send to the service.
Parameters for the postSearchAnalyze operation.
Query a search index as stream.
Search indexes, which are defined in design documents, allow databases to be queried by using Lucene Query Parser
Syntax. An index function defines a search index, similar to a map function in MapReduce views. The index function
decides what data to index and what data to store in the index. The advantage of using the HTTP POST method is
that the query is submitted as a JSON object in the request body. This avoids the limitations of passing query
options as URL query parameters of a GET request.
The parameters to send to the service.
Parameters for the postSearchAsStream operation.
Optionalbookmark?: stringOpaque bookmark token used when paginating results.
Optionalcounts?: string[]This field defines an array of names of string fields, for which counts are requested. The response contains counts for each unique value of this field name among the documents that match the search query. Faceting must be enabled for this parameter to function. This option is only available when making global queries.
Path parameter to specify the database name.
Path parameter to specify the design document name. The design document name is the design document ID
excluding the _design/ prefix.
Optionaldrilldown?: string[][]Restrict results to documents with a dimension equal to the specified label(s). The search matches only documents containing the value that was provided in the named field. It differs from using "fieldname:value" in the q parameter only in that the values are not analyzed. Faceting must be enabled for this parameter to function.
OptionalgroupField?: stringField by which to group search matches. A string that contains the name of a string field. Fields containing other data such as numbers, objects, or arrays cannot be used. This option is only available when making global queries.
OptionalgroupLimit?: numberMaximum group count. This field can be used only if group_field is specified. This option is only available when making global queries.
OptionalgroupSort?: string[]This field defines the order of the groups in a search that uses group_field. The default sort order is relevance. This field can have the same values as the sort field, so single fields and arrays of fields are supported. This option is only available when making global queries.
Optionalheaders?: OutgoingHttpHeadersOptionalhighlightFields?: string[]Specifies which fields to highlight. If specified, the result object contains a highlights field with an entry for each specified field.
OptionalhighlightNumber?: numberNumber of fragments that are returned in highlights. If the search term occurs less often than the number of fragments that are specified, longer fragments are returned.
OptionalhighlightPostTag?: stringA string that is inserted after the highlighted word in the highlights output.
OptionalhighlightPreTag?: stringA string that is inserted before the highlighted word in the highlights output.
OptionalhighlightSize?: numberNumber of characters in each fragment for highlights.
OptionalincludeDocs?: booleanInclude the full content of the documents in the return.
OptionalincludeFields?: string[]A JSON array of field names to include in search results. Any fields that are included must be indexed with the store:true option. The default is all fields.
Path parameter to specify the index name.
Optionallimit?: numberLimit the number of the returned documents to the specified number.
The Lucene query to execute.
Optionalranges?: JsonObjectObject mapping faceted, numeric search field names to the required ranges. Each key is a field name and each value is another object defining the ranges by mapping range name keys to string values describing the numeric ranges, for example "[0 TO 10]". This option is only available when making global queries.
Optionalsignal?: GenericAbortSignalOptionalsort?: string[]Specifies the sort order of the results. In a grouped search (when group_field is used), this parameter specifies the sort order within a group. The default sort order is relevance. A JSON string of the form "fieldname<type>" or "-fieldname<type>" for descending order, where fieldname is the name of a string or number field, and type is either a number, a string, or a JSON array of strings. The type part is optional, and defaults to number. Some examples are "foo", "-foo", "bar<string>", "-foo<number>" and ["-foo<number>", "bar<string>"]. String fields that are used for sorting must not be analyzed fields. Fields that are used for sorting must be indexed by the same indexer that is used for the search query.
Optionalstale?: stringDo not wait for the index to finish building to return results.
Query a MapReduce view.
This operation queries the specified MapReduce view of the specified design document. By default, the map and
reduce functions of the view are run to update the view before returning the response. The advantage of using the
HTTP POST method is that the query is submitted as a JSON object in the request body. This avoids the limitations
of passing query options as URL query parameters of a GET request.
The parameters to send to the service.
Parameters for the postView operation.
Optionalattachments?: booleanParameter to specify whether to include attachments bodies in a response.
OptionalattEncodingInfo?: booleanParameter to specify whether to include the encoding information in attachment stubs if the particular attachment is compressed.
Optionalconflicts?: booleanParameter 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.
Path parameter to specify the design document name. The design document name is the design document ID
excluding the _design/ prefix.
Optionaldescending?: booleanParameter to specify whether to return the documents in descending by key order.
OptionalendKey?: anySchema for any JSON type.
OptionalendKeyDocId?: stringSchema for a document ID.
Optionalgroup?: booleanParameter to specify whether to group reduced results by key. Valid only if a reduce function defined in the
view. If the view emits key in JSON array format, then it is possible to reduce groups further based on the
number of array elements with the group_level parameter.
OptionalgroupLevel?: numberParameter to specify a group level to be used. Only applicable if the view uses keys that are JSON arrays.
Implies group is true. Group level groups the reduced results by the specified number of array elements. If
unset, results are grouped by the entire array key, returning a reduced value for each complete key.
Optionalheaders?: OutgoingHttpHeadersOptionalincludeDocs?: booleanParameter to specify whether to include the full content of the documents in the response.
OptionalinclusiveEnd?: booleanParameter to specify whether the specified end key should be included in the result.
Optionalkey?: anySchema for any JSON type.
Optionalkeys?: any[]Parameter to specify returning only documents that match any of the specified keys. A JSON array of keys that match the key type emitted by the view function.
Optionallimit?: numberParameter to specify the number of returned documents to limit the result to.
Optionalreduce?: booleanParameter to specify whether to use the reduce function in a map-reduce view. Default is true when a reduce function is defined.
A default reduce view type can be disabled to behave like a map by setting reduce=false explicitly.
Be aware that include_docs=true can only be used with map views.
Optionalsignal?: GenericAbortSignalOptionalskip?: numberParameter to specify the number of records before starting to return the results.
Optionalstable?: booleanQuery parameter to specify whether use the same replica of the index on each request. The default value
false contacts all replicas and returns the result from the first, fastest, responder. Setting it to true
when used in conjunction with update=false may improve consistency at the expense of increased latency and
decreased throughput if the selected replica is not the fastest of the available replicas.
Note: In general setting true is discouraged and is strictly not recommended when using update=true.
OptionalstartKey?: anySchema for any JSON type.
OptionalstartKeyDocId?: stringSchema for a document ID.
Optionalupdate?: stringParameter to specify whether or not the view in question should be updated prior to responding to the user.
true - Return results after the view is updated.false - Return results without updating the view.lazy - Return the view results without waiting for an update, but update them immediately after the request.OptionalupdateSeq?: booleanParameter to specify whether to include in the response an update_seq value indicating the sequence id of the database the view reflects.
Path parameter to specify the map reduce view function name.
Query a MapReduce view as stream.
This operation queries the specified MapReduce view of the specified design document. By default, the map and
reduce functions of the view are run to update the view before returning the response. The advantage of using the
HTTP POST method is that the query is submitted as a JSON object in the request body. This avoids the limitations
of passing query options as URL query parameters of a GET request.
The parameters to send to the service.
Parameters for the postViewAsStream operation.
Optionalattachments?: booleanParameter to specify whether to include attachments bodies in a response.
OptionalattEncodingInfo?: booleanParameter to specify whether to include the encoding information in attachment stubs if the particular attachment is compressed.
Optionalconflicts?: booleanParameter 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.
Path parameter to specify the design document name. The design document name is the design document ID
excluding the _design/ prefix.
Optionaldescending?: booleanParameter to specify whether to return the documents in descending by key order.
OptionalendKey?: anySchema for any JSON type.
OptionalendKeyDocId?: stringSchema for a document ID.
Optionalgroup?: booleanParameter to specify whether to group reduced results by key. Valid only if a reduce function defined in the
view. If the view emits key in JSON array format, then it is possible to reduce groups further based on the
number of array elements with the group_level parameter.
OptionalgroupLevel?: numberParameter to specify a group level to be used. Only applicable if the view uses keys that are JSON arrays.
Implies group is true. Group level groups the reduced results by the specified number of array elements. If
unset, results are grouped by the entire array key, returning a reduced value for each complete key.
Optionalheaders?: OutgoingHttpHeadersOptionalincludeDocs?: booleanParameter to specify whether to include the full content of the documents in the response.
OptionalinclusiveEnd?: booleanParameter to specify whether the specified end key should be included in the result.
Optionalkey?: anySchema for any JSON type.
Optionalkeys?: any[]Parameter to specify returning only documents that match any of the specified keys. A JSON array of keys that match the key type emitted by the view function.
Optionallimit?: numberParameter to specify the number of returned documents to limit the result to.
Optionalreduce?: booleanParameter to specify whether to use the reduce function in a map-reduce view. Default is true when a reduce function is defined.
A default reduce view type can be disabled to behave like a map by setting reduce=false explicitly.
Be aware that include_docs=true can only be used with map views.
Optionalsignal?: GenericAbortSignalOptionalskip?: numberParameter to specify the number of records before starting to return the results.
Optionalstable?: booleanQuery parameter to specify whether use the same replica of the index on each request. The default value
false contacts all replicas and returns the result from the first, fastest, responder. Setting it to true
when used in conjunction with update=false may improve consistency at the expense of increased latency and
decreased throughput if the selected replica is not the fastest of the available replicas.
Note: In general setting true is discouraged and is strictly not recommended when using update=true.
OptionalstartKey?: anySchema for any JSON type.
OptionalstartKeyDocId?: stringSchema for a document ID.
Optionalupdate?: stringParameter to specify whether or not the view in question should be updated prior to responding to the user.
true - Return results after the view is updated.false - Return results without updating the view.lazy - Return the view results without waiting for an update, but update them immediately after the request.OptionalupdateSeq?: booleanParameter to specify whether to include in the response an update_seq value indicating the sequence id of the database the view reflects.
Path parameter to specify the map reduce view function name.
Multi-query a MapReduce view.
This operation runs multiple specified view queries against the view function from the specified design document.
The parameters to send to the service.
Parameters for the postViewQueries operation.
Path parameter to specify the database name.
Path parameter to specify the design document name. The design document name is the design document ID
excluding the _design/ prefix.
Optionalheaders?: OutgoingHttpHeadersAn array of query objects with fields for the parameters of each individual view query to be executed. The field names and their meaning are the same as the query parameters of a regular view request.
Optionalsignal?: GenericAbortSignalPath parameter to specify the map reduce view function name.
Multi-query a MapReduce view as stream.
This operation runs multiple specified view queries against the view function from the specified design document.
The parameters to send to the service.
Parameters for the postViewQueriesAsStream operation.
Path parameter to specify the database name.
Path parameter to specify the design document name. The design document name is the design document ID
excluding the _design/ prefix.
Optionalheaders?: OutgoingHttpHeadersAn array of query objects with fields for the parameters of each individual view query to be executed. The field names and their meaning are the same as the query parameters of a regular view request.
Optionalsignal?: GenericAbortSignalPath parameter to specify the map reduce view function name.
Create or modify an attachment.
Uploads the supplied content as an attachment to the specified document. The attachment name that you provide must
be a URL encoded string. You must supply the Content-Type header, and for an existing document, you must also
supply either the rev query argument or the If-Match HTTP header. If you omit the revision, a new, otherwise
empty, document is created with the provided attachment, or a conflict occurs. If the uploaded attachment uses an
existing attachment name in the remote database, it updates the corresponding stored content of the database. Since
you must supply the revision information to add an attachment to the document, this serves as validation to update
the existing attachment.
The parameters to send to the service.
Parameters for the putAttachment operation.
HTTP request body for attachment operations.
Path parameter to specify the attachment name.
Content-Type of the attachment.
Path parameter to specify the database name.
Path parameter to specify the document ID.
Optionalheaders?: OutgoingHttpHeadersOptionalifMatch?: stringHeader parameter for a conditional HTTP request matching an ETag.
Optionalrev?: stringQuery parameter to specify a document revision.
Optionalsignal?: GenericAbortSignalUpdate the target provisioned throughput capacity.
Sets the target provisioned throughput capacity for an IBM Cloudant instance. When target capacity is changed, the current capacity asynchronously changes to meet the target capacity.
The parameters to send to the service.
Parameters for the putCapacityThroughputConfiguration operation.
Modify only Cloudant related database permissions.
Modify only Cloudant related permissions to database. Be careful: by removing an API key from the list, you remove the API key from the list of users that have access to the database.
The nobody username applies to all unauthenticated connection attempts. For example, if an application tries to
read data from a database, but did not identify itself, the task can continue only if the nobody user has the
role _reader.
The parameters to send to the service.
Parameters for the putCloudantSecurityConfiguration operation.
Optionaladmins?: CloudantV1.SecurityObjectSchema for names and roles to map to a database permission.
Database permissions for Cloudant users and/or API keys.
OptionalcouchdbAuthOnly?: booleanManage permissions using the _users database only.
Path parameter to specify the database name.
Optionalheaders?: OutgoingHttpHeadersOptionalmembers?: CloudantV1.SecurityObjectSchema for names and roles to map to a database permission.
Optionalsignal?: GenericAbortSignalModify CORS configuration.
Sets the CORS configuration. The configuration applies to all databases and all account level endpoints in your account.
The parameters to send to the service.
Parameters for the putCorsConfiguration operation.
OptionalallowCredentials?: booleanBoolean value to allow authentication credentials. If set to true, browser requests must be done by using withCredentials = true.
OptionalenableCors?: booleanBoolean value to turn CORS on and off.
Optionalheaders?: OutgoingHttpHeadersAn array of strings that contain allowed origin domains. You have to specify the full URL including the protocol. It is recommended that only the HTTPS protocol is used. Subdomains count as separate domains, so you have to specify all subdomains used.
Optionalsignal?: GenericAbortSignalCreate a database.
Create a new database with the requested properties.
The parameters to send to the service.
Parameters for the putDatabase operation.
Path parameter to specify the database name.
Optionalheaders?: OutgoingHttpHeadersOptionalpartitioned?: booleanQuery parameter to specify whether to enable database partitions when creating a database.
Before using read the FAQs to understand the limitations and appropriate use cases.
Optionalq?: numberThe number of shards in the database. Each shard is a partition of the hash value range. Cloudant recommends using the default value for most databases. However, if your database is expected to be larger than 250 GB or have a lot of indexes, you may need to adjust the settings. In these cases, it's best to reach out to IBM Cloudant customer support for guidance on how to meet your specific needs and requirements.
Optionalsignal?: GenericAbortSignalCreate or modify a design document.
The PUT method creates a new named design document, or creates a new revision of the existing design document.
The parameters to send to the service.
Parameters for the putDesignDocument operation.
Optionalbatch?: stringQuery parameter to specify whether to store in batch mode. The server will respond with a HTTP 202 Accepted response code immediately.
Path parameter to specify the database name.
Path parameter to specify the design document name. The design document name is the design document ID
excluding the _design/ prefix.
HTTP request body for DesignDocument operations.
Optionalheaders?: OutgoingHttpHeadersOptionalifMatch?: stringHeader parameter for a conditional HTTP request matching an ETag.
OptionalnewEdits?: booleanQuery parameter to specify whether to prevent insertion of conflicting document revisions. If false, a well-formed _rev must be included in the document. False is used by the replicator to insert documents into the target database even if that leads to the creation of conflicts.
Avoid using this parameter, since this option applies document revisions without checking for conflicts, so it is very easy to accidentally end up with a large number of conflicts.
Optionalrev?: stringQuery parameter to specify a document revision.
Optionalsignal?: GenericAbortSignalCreate or modify a document.
Creates or modifies a document in the specified database.
For creation, you must specify the document ID but you should not specify the revision.
For modification, you must specify the document ID and a revision identifier.
The parameters to send to the service.
Parameters for the putDocument operation.
Optionalbatch?: stringQuery parameter to specify whether to store in batch mode. The server will respond with a HTTP 202 Accepted response code immediately.
OptionalcontentType?: stringThe type of the input.
Path parameter to specify the database name.
Path parameter to specify the document ID.
HTTP request body for Document operations.
Optionalheaders?: OutgoingHttpHeadersOptionalifMatch?: stringHeader parameter for a conditional HTTP request matching an ETag.
OptionalnewEdits?: booleanQuery parameter to specify whether to prevent insertion of conflicting document revisions. If false, a well-formed _rev must be included in the document. False is used by the replicator to insert documents into the target database even if that leads to the creation of conflicts.
Avoid using this parameter, since this option applies document revisions without checking for conflicts, so it is very easy to accidentally end up with a large number of conflicts.
Optionalrev?: stringQuery parameter to specify a document revision.
Optionalsignal?: GenericAbortSignalCreate or modify a local document.
Stores the specified local document. The semantics are identical to storing a standard document in the specified database, except that the document is not replicated.
The parameters to send to the service.
Parameters for the putLocalDocument operation.
Optionalbatch?: stringQuery parameter to specify whether to store in batch mode. The server will respond with a HTTP 202 Accepted response code immediately.
OptionalcontentType?: stringThe type of the input.
Path parameter to specify the database name.
Path parameter to specify the document ID.
HTTP request body for Document operations.
Optionalheaders?: OutgoingHttpHeadersOptionalsignal?: GenericAbortSignalCreate or modify a persistent replication.
Creates or modifies a document in the _replicator database to start a new replication or to edit an existing
replication.
The parameters to send to the service.
Parameters for the putReplicationDocument operation.
Optionalbatch?: stringQuery parameter to specify whether to store in batch mode. The server will respond with a HTTP 202 Accepted response code immediately.
Path parameter to specify the ID of the stored replication configuration in the _replicator database.
Optionalheaders?: OutgoingHttpHeadersOptionalifMatch?: stringHeader parameter for a conditional HTTP request matching an ETag.
OptionalnewEdits?: booleanQuery parameter to specify whether to prevent insertion of conflicting document revisions. If false, a well-formed _rev must be included in the document. False is used by the replicator to insert documents into the target database even if that leads to the creation of conflicts.
Avoid using this parameter, since this option applies document revisions without checking for conflicts, so it is very easy to accidentally end up with a large number of conflicts.
HTTP request body for replication operations.
Optionalrev?: stringQuery parameter to specify a document revision.
Optionalsignal?: GenericAbortSignalModify database permissions.
Modify who has permission to read, write, or manage a database. This endpoint can be used to modify both Cloudant and CouchDB related permissions. Be careful: by removing a Cloudant API key, a member or an admin from the list of users that have access permissions, you remove it from the list of users that have access to the database.
The nobody username applies to all unauthenticated connection attempts. For example, if an application tries to
read data from a database, but did not identify itself, the task can continue only if the nobody user has the
role _reader.
The parameters to send to the service.
Parameters for the putSecurity operation.
Optionaladmins?: CloudantV1.SecurityObjectSchema for names and roles to map to a database permission.
Optionalcloudant?: JsonObjectDatabase permissions for Cloudant users and/or API keys.
OptionalcouchdbAuthOnly?: booleanManage permissions using the _users database only.
Path parameter to specify the database name.
Optionalheaders?: OutgoingHttpHeadersOptionalmembers?: CloudantV1.SecurityObjectSchema for names and roles to map to a database permission.
Optionalsignal?: GenericAbortSignalTurn request body compression on or off. Cloudant specific extensions:
Will turn it on if 'true', off if 'false'.
Set the service URL to send requests to and use the new service URL for CouchDB Session Authentication to claim session token from.
The base URL for the service.
StaticnewConstructs an instance of CloudantV1 with passed in options and external configuration.
Optionaloptions: UserOptionsThe parameters to send to the service.
The name of the service to configure
The Authenticator object used to authenticate requests to the service
The base URL for the service
NoSQL database based on Apache CouchDB
See: https://cloud.ibm.com/docs/services/Cloudant/