{ "openapi": "3.0.3", "info": { "title": "CouchDB API", "version": "3.3.0" }, "servers": [ { "url": "http://localhost:5984" } ], "paths": { "/": { "get": { "summary": "", "tags": [ "server" ], "description": "Accessing the root of a CouchDB instance returns meta information about the\ninstance. The response is a JSON structure containing information about the\nserver, including a welcome message and the version of the server.", "parameters": [], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" } } } }, "/_active_tasks": { "get": { "summary": "", "tags": [ "server" ], "description": "List of running tasks, including the task type, name, status\nand process ID. The result is a JSON array of the currently running tasks,\nwith each task being described with a single object. Depending on operation\ntype set of response object fields might be different.", "parameters": [], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "401": { "description": "401 Unauthorized \u2013 CouchDB Server Administrator privileges required" } } } }, "/_all_dbs": { "get": { "summary": "", "tags": [ "server" ], "description": "Returns a list of all the databases in the CouchDB instance.", "parameters": [ { "name": "descending", "in": "query", "description": "descending (boolean) \u2013 Return the databases in descending order by key.\nDefault is false.", "schema": { "type": "boolean" } }, { "name": "endkey", "in": "query", "description": "endkey (json) \u2013 Stop returning databases when the specified key is\nreached.", "schema": { "type": "object" } }, { "name": "end_key", "in": "query", "description": "end_key (json) \u2013 Alias for endkey param", "schema": { "type": "object" } }, { "name": "limit", "in": "query", "description": "limit (number) \u2013 Limit the number of the returned databases to the\nspecified number.", "schema": { "type": "number" } }, { "name": "skip", "in": "query", "description": "skip (number) \u2013 Skip this number of databases before starting to return\nthe results. Default is 0.", "schema": { "type": "number" } }, { "name": "startkey", "in": "query", "description": "startkey (json) \u2013 Return databases starting with the specified key.", "schema": { "type": "object" } }, { "name": "start_key", "in": "query", "description": "start_key (json) \u2013 Alias for startkey.", "schema": { "type": "object" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" } } } }, "/_dbs_info": { "get": { "summary": "", "tags": [ "server" ], "description": "Returns a list of all the databases information in the CouchDB instance.", "parameters": [ { "name": "descending", "in": "query", "description": "descending (boolean) \u2013 Return databases information in descending order\nby key. Default is false.", "schema": { "type": "boolean" } }, { "name": "endkey", "in": "query", "description": "endkey (json) \u2013 Stop returning databases information when the specified\nkey is reached.", "schema": { "type": "object" } }, { "name": "end_key", "in": "query", "description": "end_key (json) \u2013 Alias for endkey param", "schema": { "type": "object" } }, { "name": "limit", "in": "query", "description": "limit (number) \u2013 Limit the number of the returned databases information\nto the specified number.", "schema": { "type": "number" } }, { "name": "skip", "in": "query", "description": "skip (number) \u2013 Skip this number of databases before starting to return\nthe results. Default is 0.", "schema": { "type": "number" } }, { "name": "startkey", "in": "query", "description": "startkey (json) \u2013 Return databases information starting with the\nspecified key.", "schema": { "type": "object" } }, { "name": "start_key", "in": "query", "description": "start_key (json) \u2013 Alias for startkey.", "schema": { "type": "object" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "400": { "description": "400 Bad Request \u2013 Missing keys or exceeded keys in request" } } }, "post": { "summary": "", "tags": [ "server" ], "description": "Returns a list of all the databases information in the CouchDB instance.", "parameters": [ { "name": "descending", "in": "query", "description": "descending (boolean) \u2013 Return databases information in descending order\nby key. Default is false.", "schema": { "type": "boolean" } }, { "name": "endkey", "in": "query", "description": "endkey (json) \u2013 Stop returning databases information when the specified\nkey is reached.", "schema": { "type": "object" } }, { "name": "end_key", "in": "query", "description": "end_key (json) \u2013 Alias for endkey param", "schema": { "type": "object" } }, { "name": "limit", "in": "query", "description": "limit (number) \u2013 Limit the number of the returned databases information\nto the specified number.", "schema": { "type": "number" } }, { "name": "skip", "in": "query", "description": "skip (number) \u2013 Skip this number of databases before starting to return\nthe results. Default is 0.", "schema": { "type": "number" } }, { "name": "startkey", "in": "query", "description": "startkey (json) \u2013 Return databases information starting with the\nspecified key.", "schema": { "type": "object" } }, { "name": "start_key", "in": "query", "description": "start_key (json) \u2013 Alias for startkey.", "schema": { "type": "object" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "400": { "description": "400 Bad Request \u2013 Missing keys or exceeded keys in request" } } } }, "/_cluster_setup": { "get": { "summary": "", "tags": [ "server" ], "description": "Returns the status of the node or cluster, per the cluster setup wizard.", "parameters": [ { "name": "ensure_dbs_exist", "in": "query", "description": "ensure_dbs_exist (array) \u2013 List of system databases to ensure exist\non the node/cluster. Defaults to\n[\"_users\",\"_replicator\"].", "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" } } }, "post": { "summary": "", "tags": [ "server" ], "description": "Returns the status of the node or cluster, per the cluster setup wizard.", "parameters": [ { "name": "ensure_dbs_exist", "in": "query", "description": "ensure_dbs_exist (array) \u2013 List of system databases to ensure exist\non the node/cluster. Defaults to\n[\"_users\",\"_replicator\"].", "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" } } } }, "/_db_updates": { "get": { "summary": "", "tags": [ "server" ], "description": "Returns a list of all database events in the CouchDB instance. The\nexistence of the _global_changes database is required to use this\nendpoint.", "parameters": [ { "name": "feed", "in": "query", "description": "feed (string) \u2013 ", "schema": { "type": "string" } }, { "name": "timeout", "in": "query", "description": "timeout (number) \u2013 Number of milliseconds until CouchDB closes the\nconnection. Default is 60000.", "schema": { "type": "number" } }, { "name": "heartbeat", "in": "query", "description": "heartbeat (number) \u2013 Period in milliseconds after which an empty\nline is sent in the results. Only applicable for longpoll,\ncontinuous, and eventsource feeds. Overrides any timeout to\nkeep the feed alive indefinitely. Default is 60000. May be true\nto use default value.", "schema": { "type": "number" } }, { "name": "since", "in": "query", "description": "since (string) \u2013 Return only updates since the specified sequence ID.\nIf the sequence ID is specified but does not exist, all changes are returned.\nMay be the string now to begin showing only new updates.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "401": { "description": "401 Unauthorized \u2013 CouchDB Server Administrator privileges required" } } } }, "/_membership": { "get": { "summary": "", "tags": [ "server" ], "description": "Displays the nodes that are part of the cluster as cluster_nodes. The\nfield all_nodes displays all nodes this node knows about, including the\nones that are part of the cluster. The endpoint is useful when setting up a\ncluster, see Node Management", "parameters": [], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" } } } }, "/_replicate": { "post": { "summary": "", "tags": [ "server" ], "description": "Request, configure, or stop, a replication operation.", "parameters": [], "responses": { "200": { "description": "200 OK \u2013 Replication request successfully completed" }, "202": { "description": "202 Accepted \u2013 Continuous replication request has been accepted" }, "400": { "description": "400 Bad Request \u2013 Invalid JSON data" }, "401": { "description": "401 Unauthorized \u2013 CouchDB Server Administrator privileges required" }, "404": { "description": "404 Not Found \u2013 Either the source or target DB is not found or attempt to\ncancel unknown replication task" }, "500": { "description": "500 Internal Server Error \u2013 JSON specification was invalid" } } } }, "/_scheduler/jobs": { "get": { "summary": "", "tags": [ "server" ], "description": "List of replication jobs. Includes replications created via\n/_replicate endpoint as well as those created from\nreplication documents. Does not include replications which have completed\nor have failed to start because replication documents were malformed. Each\njob description will include source and target information, replication id,\na history of recent event, and a few other things.", "parameters": [ { "name": "limit", "in": "query", "description": "limit (number) \u2013 How many results to return", "schema": { "type": "number" } }, { "name": "skip", "in": "query", "description": "skip (number) \u2013 How many result to skip starting at the beginning,\nordered by replication ID", "schema": { "type": "number" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "401": { "description": "401 Unauthorized \u2013 CouchDB Server Administrator privileges required" } } } }, "/_scheduler/docs": { "get": { "summary": "", "tags": [ "server" ], "description": "List of replication document states. Includes information about all the\ndocuments, even in completed and failed states. For each document\nit returns the document ID, the database, the replication ID, source and\ntarget, and other information.", "parameters": [ { "name": "limit", "in": "query", "description": "limit (number) \u2013 How many results to return", "schema": { "type": "number" } }, { "name": "skip", "in": "query", "description": "skip (number) \u2013 How many result to skip starting at the beginning, if\nordered by document ID", "schema": { "type": "number" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "401": { "description": "401 Unauthorized \u2013 CouchDB Server Administrator privileges required" } } } }, "/_scheduler/docs/{replicator_db}": { "get": { "summary": "", "tags": [ "server" ], "description": "List of replication document states. Includes information about all the\ndocuments, even in completed and failed states. For each document\nit returns the document ID, the database, the replication ID, source and\ntarget, and other information.", "parameters": [ { "name": "limit", "in": "query", "description": "limit (number) \u2013 How many results to return", "schema": { "type": "number" } }, { "name": "skip", "in": "query", "description": "skip (number) \u2013 How many result to skip starting at the beginning, if\nordered by document ID", "schema": { "type": "number" } }, { "name": "replicator_db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "401": { "description": "401 Unauthorized \u2013 CouchDB Server Administrator privileges required" } } } }, "/_scheduler/docs/{replicator_db}/{docid}": { "get": { "summary": "", "tags": [ "server" ], "description": "List of replication document states. Includes information about all the\ndocuments, even in completed and failed states. For each document\nit returns the document ID, the database, the replication ID, source and\ntarget, and other information.", "parameters": [ { "name": "limit", "in": "query", "description": "limit (number) \u2013 How many results to return", "schema": { "type": "number" } }, { "name": "skip", "in": "query", "description": "skip (number) \u2013 How many result to skip starting at the beginning, if\nordered by document ID", "schema": { "type": "number" } }, { "name": "replicator_db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "docid", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "401": { "description": "401 Unauthorized \u2013 CouchDB Server Administrator privileges required" } } } }, "/_node/{node-name}": { "get": { "summary": "", "tags": [ "server" ], "description": "The /_node/{node-name} endpoint can be used to confirm the Erlang\nnode name of the server that processes the request. This is most useful\nwhen accessing /_node/_local to retrieve this information. Repeatedly\nretrieving this information for a CouchDB endpoint can be useful to determine\nif a CouchDB cluster is correctly proxied through a reverse load balancer.", "parameters": [ { "name": "node-name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" } } } }, "/_node/{node-name}/_stats": { "get": { "summary": "", "tags": [ "server" ], "description": "The _stats resource returns a JSON object containing the statistics\nfor the running server. The object is structured with top-level sections\ncollating the statistics for a range of entries, with each individual\nstatistic being easily identified, and the content of each statistic is\nself-describing.", "parameters": [ { "name": "node-name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" } } } }, "/_node/{node-name}/_prometheus": { "get": { "summary": "", "tags": [ "server" ], "description": "The _prometheus resource returns a text/plain response that consolidates our\n/_node/{node-name}/_stats, and /_node/{node-name}/_system endpoints. The format is\ndetermined by Prometheus.\nThe format version is 2.0.", "parameters": [ { "name": "node-name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "default": { "description": "No information about this response. Give it a go!" } } } }, "/_node/{node-name}/_system": { "get": { "summary": "", "tags": [ "server" ], "description": "The _system resource returns a JSON object containing various\nsystem-level statistics for the running server. The object is structured\nwith top-level sections collating the statistics for a range of entries,\nwith each individual statistic being easily identified, and the content of\neach statistic is self-describing.", "parameters": [ { "name": "node-name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" } } } }, "/_node/{node-name}/_restart": { "post": { "summary": "", "tags": [ "server" ], "description": "This API is to facilitate integration testing only\nit is not meant to be used in production", "parameters": [ { "name": "node-name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" } } } }, "/_node/{node-name}/_versions": { "get": { "summary": "", "tags": [ "server" ], "description": "The _versions resource returns a JSON object containing various\nsystem-level informations for the running server.", "parameters": [ { "name": "node-name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" } } } }, "/_search_analyze": { "post": { "summary": "", "tags": [ "server" ], "description": "Tests the results of Lucene analyzer tokenization on sample text.", "parameters": [], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "400": { "description": "400 Bad Request \u2013 Request body is wrong (malformed or missing one of the mandatory fields)" }, "500": { "description": "500 Internal Server Error \u2013 A server error (or other kind of error) occurred" } } } }, "/_utils": { "get": { "summary": "", "tags": [ "server" ], "description": "Accesses the built-in Fauxton administration interface for CouchDB.", "parameters": [], "responses": { "301": { "description": "301 Moved Permanently \u2013 Redirects to GET /_utils/" }, "200": { "description": "200 OK \u2013 Request completed successfully" } } } }, "/_utils/": { "get": { "summary": "", "tags": [ "server" ], "description": "Accesses the built-in Fauxton administration interface for CouchDB.", "parameters": [], "responses": { "301": { "description": "301 Moved Permanently \u2013 Redirects to GET /_utils/" }, "200": { "description": "200 OK \u2013 Request completed successfully" } } } }, "/_up": { "get": { "summary": "", "tags": [ "server" ], "description": "Confirms that the server is up, running, and ready to respond to requests.\nIf maintenance_mode is\ntrue or nolb, the endpoint will return a 404 response.", "parameters": [], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "404": { "description": "404 Not Found \u2013 The server is unavailable for requests at this time." } } } }, "/_uuids": { "get": { "summary": "", "tags": [ "server" ], "description": "Requests one or more Universally Unique Identifiers (UUIDs) from the\nCouchDB instance. The response is a JSON object providing a list of UUIDs.", "parameters": [ { "name": "count", "in": "query", "description": "count (number) \u2013 Number of UUIDs to return. Default is 1.", "schema": { "type": "number" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "400": { "description": "400 Bad Request \u2013 Requested more UUIDs than is allowed to retrieve" } } } }, "/favicon.ico": { "get": { "summary": "", "tags": [ "server" ], "description": "Binary content for the favicon.ico site icon.", "parameters": [], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "404": { "description": "404 Not Found \u2013 The requested content could not be found" } } } }, "/_reshard": { "get": { "summary": "", "tags": [ "server" ], "description": "Returns a count of completed, failed, running, stopped, and total jobs\nalong with the state of resharding on the cluster.", "parameters": [], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "401": { "description": "401 Unauthorized \u2013 CouchDB Server Administrator privileges required" }, "400": { "description": "400 Bad Request \u2013 Invalid request. Could be a bad state name, for example." }, "201": { "description": "201 Created \u2013 One or more jobs were successfully created" }, "404": { "description": "404 Not Found \u2013 The job was not found" } } } }, "/_reshard/state": { "get": { "summary": "", "tags": [ "server" ], "description": "Returns a count of completed, failed, running, stopped, and total jobs\nalong with the state of resharding on the cluster.", "parameters": [], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "401": { "description": "401 Unauthorized \u2013 CouchDB Server Administrator privileges required" }, "400": { "description": "400 Bad Request \u2013 Invalid request. Could be a bad state name, for example." }, "201": { "description": "201 Created \u2013 One or more jobs were successfully created" }, "404": { "description": "404 Not Found \u2013 The job was not found" } } }, "put": { "summary": "", "tags": [ "server" ], "description": "Returns a count of completed, failed, running, stopped, and total jobs\nalong with the state of resharding on the cluster.", "parameters": [], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "401": { "description": "401 Unauthorized \u2013 CouchDB Server Administrator privileges required" }, "400": { "description": "400 Bad Request \u2013 Invalid request. Could be a bad state name, for example." }, "201": { "description": "201 Created \u2013 One or more jobs were successfully created" }, "404": { "description": "404 Not Found \u2013 The job was not found" } } } }, "/_reshard/jobs": { "get": { "summary": "", "tags": [ "server" ], "description": "Returns a count of completed, failed, running, stopped, and total jobs\nalong with the state of resharding on the cluster.", "parameters": [], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "401": { "description": "401 Unauthorized \u2013 CouchDB Server Administrator privileges required" }, "400": { "description": "400 Bad Request \u2013 Invalid request. Could be a bad state name, for example." }, "201": { "description": "201 Created \u2013 One or more jobs were successfully created" }, "404": { "description": "404 Not Found \u2013 The job was not found" } } }, "post": { "summary": "", "tags": [ "server" ], "description": "Returns a count of completed, failed, running, stopped, and total jobs\nalong with the state of resharding on the cluster.", "parameters": [], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "401": { "description": "401 Unauthorized \u2013 CouchDB Server Administrator privileges required" }, "400": { "description": "400 Bad Request \u2013 Invalid request. Could be a bad state name, for example." }, "201": { "description": "201 Created \u2013 One or more jobs were successfully created" }, "404": { "description": "404 Not Found \u2013 The job was not found" } } } }, "/_reshard/jobs/{jobid}": { "get": { "summary": "", "tags": [ "server" ], "description": "Returns a count of completed, failed, running, stopped, and total jobs\nalong with the state of resharding on the cluster.", "parameters": [ { "name": "jobid", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "401": { "description": "401 Unauthorized \u2013 CouchDB Server Administrator privileges required" }, "400": { "description": "400 Bad Request \u2013 Invalid request. Could be a bad state name, for example." }, "201": { "description": "201 Created \u2013 One or more jobs were successfully created" }, "404": { "description": "404 Not Found \u2013 The job was not found" } } }, "delete": { "summary": "", "tags": [ "server" ], "description": "Returns a count of completed, failed, running, stopped, and total jobs\nalong with the state of resharding on the cluster.", "parameters": [ { "name": "jobid", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "401": { "description": "401 Unauthorized \u2013 CouchDB Server Administrator privileges required" }, "400": { "description": "400 Bad Request \u2013 Invalid request. Could be a bad state name, for example." }, "201": { "description": "201 Created \u2013 One or more jobs were successfully created" }, "404": { "description": "404 Not Found \u2013 The job was not found" } } } }, "/_reshard/jobs/{jobid}/state": { "get": { "summary": "", "tags": [ "server" ], "description": "Returns a count of completed, failed, running, stopped, and total jobs\nalong with the state of resharding on the cluster.", "parameters": [ { "name": "jobid", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "401": { "description": "401 Unauthorized \u2013 CouchDB Server Administrator privileges required" }, "400": { "description": "400 Bad Request \u2013 Invalid request. Could be a bad state name, for example." }, "201": { "description": "201 Created \u2013 One or more jobs were successfully created" }, "404": { "description": "404 Not Found \u2013 The job was not found" } } }, "put": { "summary": "", "tags": [ "server" ], "description": "Returns a count of completed, failed, running, stopped, and total jobs\nalong with the state of resharding on the cluster.", "parameters": [ { "name": "jobid", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "401": { "description": "401 Unauthorized \u2013 CouchDB Server Administrator privileges required" }, "400": { "description": "400 Bad Request \u2013 Invalid request. Could be a bad state name, for example." }, "201": { "description": "201 Created \u2013 One or more jobs were successfully created" }, "404": { "description": "404 Not Found \u2013 The job was not found" } } } }, "/{db}": { "head": { "summary": "", "tags": [ "database" ], "description": "Returns the HTTP Headers containing a minimal amount of information\nabout the specified database. Since the response body is empty, using the\nHEAD method is a lightweight way to check if the database exists already or\nnot.", "parameters": [ { "name": "q", "in": "query", "description": "q (integer) \u2013 Shards, aka the number of range partitions. Default is\n8, unless overridden in the cluster config.", "schema": { "type": "integer" } }, { "name": "n", "in": "query", "description": "n (integer) \u2013 Replicas. The number of copies of the database in the\ncluster. The default is 3, unless overridden in the\ncluster config .", "schema": { "type": "integer" } }, { "name": "partitioned", "in": "query", "description": "partitioned (boolean) \u2013 Whether to create a partitioned database.\nDefault is false.", "schema": { "type": "boolean" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Database removed successfully (quorum is met and database is deleted by at least one node)" }, "404": { "description": "404 Not Found \u2013 Database doesn\u2019t exist" }, "201": { "description": "201 Created \u2013 Document created and stored on disk" }, "202": { "description": "202 Accepted \u2013 Document data accepted, but not yet stored on disk" }, "400": { "description": "400 Bad Request \u2013 Invalid database name" }, "401": { "description": "401 Unauthorized \u2013 Write privileges required" }, "412": { "description": "412 Precondition Failed \u2013 Database already exists" }, "409": { "description": "409 Conflict \u2013 A Conflicting Document with same ID already exists" } } }, "get": { "summary": "", "tags": [ "database" ], "description": "Returns the HTTP Headers containing a minimal amount of information\nabout the specified database. Since the response body is empty, using the\nHEAD method is a lightweight way to check if the database exists already or\nnot.", "parameters": [ { "name": "q", "in": "query", "description": "q (integer) \u2013 Shards, aka the number of range partitions. Default is\n8, unless overridden in the cluster config.", "schema": { "type": "integer" } }, { "name": "n", "in": "query", "description": "n (integer) \u2013 Replicas. The number of copies of the database in the\ncluster. The default is 3, unless overridden in the\ncluster config .", "schema": { "type": "integer" } }, { "name": "partitioned", "in": "query", "description": "partitioned (boolean) \u2013 Whether to create a partitioned database.\nDefault is false.", "schema": { "type": "boolean" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Database removed successfully (quorum is met and database is deleted by at least one node)" }, "404": { "description": "404 Not Found \u2013 Database doesn\u2019t exist" }, "201": { "description": "201 Created \u2013 Document created and stored on disk" }, "202": { "description": "202 Accepted \u2013 Document data accepted, but not yet stored on disk" }, "400": { "description": "400 Bad Request \u2013 Invalid database name" }, "401": { "description": "401 Unauthorized \u2013 Write privileges required" }, "412": { "description": "412 Precondition Failed \u2013 Database already exists" }, "409": { "description": "409 Conflict \u2013 A Conflicting Document with same ID already exists" } } }, "put": { "summary": "", "tags": [ "database" ], "description": "Returns the HTTP Headers containing a minimal amount of information\nabout the specified database. Since the response body is empty, using the\nHEAD method is a lightweight way to check if the database exists already or\nnot.", "parameters": [ { "name": "q", "in": "query", "description": "q (integer) \u2013 Shards, aka the number of range partitions. Default is\n8, unless overridden in the cluster config.", "schema": { "type": "integer" } }, { "name": "n", "in": "query", "description": "n (integer) \u2013 Replicas. The number of copies of the database in the\ncluster. The default is 3, unless overridden in the\ncluster config .", "schema": { "type": "integer" } }, { "name": "partitioned", "in": "query", "description": "partitioned (boolean) \u2013 Whether to create a partitioned database.\nDefault is false.", "schema": { "type": "boolean" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Database removed successfully (quorum is met and database is deleted by at least one node)" }, "404": { "description": "404 Not Found \u2013 Database doesn\u2019t exist" }, "201": { "description": "201 Created \u2013 Document created and stored on disk" }, "202": { "description": "202 Accepted \u2013 Document data accepted, but not yet stored on disk" }, "400": { "description": "400 Bad Request \u2013 Invalid database name" }, "401": { "description": "401 Unauthorized \u2013 Write privileges required" }, "412": { "description": "412 Precondition Failed \u2013 Database already exists" }, "409": { "description": "409 Conflict \u2013 A Conflicting Document with same ID already exists" } } }, "delete": { "summary": "", "tags": [ "database" ], "description": "Returns the HTTP Headers containing a minimal amount of information\nabout the specified database. Since the response body is empty, using the\nHEAD method is a lightweight way to check if the database exists already or\nnot.", "parameters": [ { "name": "q", "in": "query", "description": "q (integer) \u2013 Shards, aka the number of range partitions. Default is\n8, unless overridden in the cluster config.", "schema": { "type": "integer" } }, { "name": "n", "in": "query", "description": "n (integer) \u2013 Replicas. The number of copies of the database in the\ncluster. The default is 3, unless overridden in the\ncluster config .", "schema": { "type": "integer" } }, { "name": "partitioned", "in": "query", "description": "partitioned (boolean) \u2013 Whether to create a partitioned database.\nDefault is false.", "schema": { "type": "boolean" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Database removed successfully (quorum is met and database is deleted by at least one node)" }, "404": { "description": "404 Not Found \u2013 Database doesn\u2019t exist" }, "201": { "description": "201 Created \u2013 Document created and stored on disk" }, "202": { "description": "202 Accepted \u2013 Document data accepted, but not yet stored on disk" }, "400": { "description": "400 Bad Request \u2013 Invalid database name" }, "401": { "description": "401 Unauthorized \u2013 Write privileges required" }, "412": { "description": "412 Precondition Failed \u2013 Database already exists" }, "409": { "description": "409 Conflict \u2013 A Conflicting Document with same ID already exists" } } }, "post": { "summary": "", "tags": [ "database" ], "description": "Returns the HTTP Headers containing a minimal amount of information\nabout the specified database. Since the response body is empty, using the\nHEAD method is a lightweight way to check if the database exists already or\nnot.", "parameters": [ { "name": "q", "in": "query", "description": "q (integer) \u2013 Shards, aka the number of range partitions. Default is\n8, unless overridden in the cluster config.", "schema": { "type": "integer" } }, { "name": "n", "in": "query", "description": "n (integer) \u2013 Replicas. The number of copies of the database in the\ncluster. The default is 3, unless overridden in the\ncluster config .", "schema": { "type": "integer" } }, { "name": "partitioned", "in": "query", "description": "partitioned (boolean) \u2013 Whether to create a partitioned database.\nDefault is false.", "schema": { "type": "boolean" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Database removed successfully (quorum is met and database is deleted by at least one node)" }, "404": { "description": "404 Not Found \u2013 Database doesn\u2019t exist" }, "201": { "description": "201 Created \u2013 Document created and stored on disk" }, "202": { "description": "202 Accepted \u2013 Document data accepted, but not yet stored on disk" }, "400": { "description": "400 Bad Request \u2013 Invalid database name" }, "401": { "description": "401 Unauthorized \u2013 Write privileges required" }, "412": { "description": "412 Precondition Failed \u2013 Database already exists" }, "409": { "description": "409 Conflict \u2013 A Conflicting Document with same ID already exists" } } } }, "/{db}/_find": { "post": { "summary": "", "tags": [ "database" ], "description": "Find documents using a declarative JSON querying syntax.\nQueries will use custom indexes, specified using the _index\nendpoint, if available.\nOtherwise, they use the built-in _all_docs index, which\ncan be arbitrarily slow.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "400": { "description": "400 Bad Request \u2013 Invalid request" }, "401": { "description": "401 Unauthorized \u2013 Read permission required" }, "404": { "description": "404 Not Found \u2013 Requested database not found" }, "500": { "description": "500 Internal Server Error \u2013 Query execution error" } } } }, "/{db}/_index": { "post": { "summary": "", "tags": [ "database" ], "description": "Create a new index on a database", "parameters": [ { "name": "index", "in": "query", "description": "index (json) \u2013 JSON object describing the index to create.", "schema": { "type": "object" } }, { "name": "ddoc", "in": "query", "description": "ddoc (string) \u2013 Name of the design document in which the index will be\ncreated. By default, each index will be created in its own design\ndocument.\nIndexes can be grouped into design documents for efficiency. However, a\nchange to one index in a design document will invalidate all other\nindexes in the same document (similar to views). Optional", "schema": { "type": "string" } }, { "name": "name", "in": "query", "description": "name (string) \u2013 Name of the index. If no name is provided, a name will\nbe generated automatically. Optional", "schema": { "type": "string" } }, { "name": "type", "in": "query", "description": "type (string) \u2013 Can be \"json\" or \"text\". Defaults to json.\nGeospatial indexes will be supported in the future. Optional\nText indexes are supported via a third party library Optional", "schema": { "type": "string" } }, { "name": "partitioned", "in": "query", "description": "partitioned (boolean) \u2013 Determines whether a JSON index is partitioned\nor global. The default value of partitioned is the partitioned\nproperty of the database. To create a global index on a\npartitioned database, specify\nfalse for the \"partitioned\" field. If you specify true\nfor the \"partitioned\" field on an unpartitioned database, an\nerror occurs.", "schema": { "type": "boolean" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Success" }, "400": { "description": "400 Bad Request \u2013 Invalid request" }, "401": { "description": "401 Unauthorized \u2013 Writer permission required" }, "404": { "description": "404 Not Found \u2013 Index not found" }, "500": { "description": "500 Internal Server Error \u2013 Execution error" } } }, "get": { "summary": "", "tags": [ "database" ], "description": "When you make a GET request to /db/_index, you get a list of all\nindexes in the database. In addition to the information available through\nthis API, indexes are also stored in design documents .\nDesign documents are regular documents that have an ID starting with\n_design/. Design documents can be retrieved and modified in the same\nway as any other document, although this is not necessary when using Mango.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Success" }, "400": { "description": "400 Bad Request \u2013 Invalid request" }, "401": { "description": "401 Unauthorized \u2013 Writer permission required" }, "500": { "description": "500 Internal Server Error \u2013 Execution error" }, "404": { "description": "404 Not Found \u2013 Index not found" } } } }, "/{db}/_index/{designdoc}/json/{name}": { "delete": { "summary": "", "tags": [ "database" ], "description": "When you make a GET request to /db/_index, you get a list of all\nindexes in the database. In addition to the information available through\nthis API, indexes are also stored in design documents .\nDesign documents are regular documents that have an ID starting with\n_design/. Design documents can be retrieved and modified in the same\nway as any other document, although this is not necessary when using Mango.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "designdoc", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "name", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Success" }, "400": { "description": "400 Bad Request \u2013 Invalid request" }, "401": { "description": "401 Unauthorized \u2013 Writer permission required" }, "500": { "description": "500 Internal Server Error \u2013 Execution error" }, "404": { "description": "404 Not Found \u2013 Index not found" } } } }, "/{db}/_explain": { "post": { "summary": "", "tags": [ "database" ], "description": "Shows which index is being used by the query. Parameters are the same as\n_find", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "400": { "description": "400 Bad Request \u2013 Invalid request" }, "401": { "description": "401 Unauthorized \u2013 Read permission required" }, "500": { "description": "500 Internal Server Error \u2013 Execution error" } } } }, "/{db}/_shards": { "get": { "summary": "", "tags": [ "database" ], "description": "The response will contain a list of database shards. Each shard will\nhave its internal database range, and the nodes on which replicas of\nthose shards are stored.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "400": { "description": "400 Bad Request \u2013 Invalid database name" }, "401": { "description": "401 Unauthorized \u2013 Read privilege required" }, "415": { "description": "415 Unsupported Media Type \u2013 Bad Content-Type value" }, "500": { "description": "500 Internal Server Error \u2013 Internal server error or timeout" } } } }, "/{db}/_shards/{docid}": { "get": { "summary": "", "tags": [ "database" ], "description": "Returns information about the specific shard into which a given document\nhas been stored, along with information about the nodes on which that\nshard has a replica.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "docid", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "401": { "description": "401 Unauthorized \u2013 Read privilege required" }, "404": { "description": "404 Not Found \u2013 Database or document not found" }, "500": { "description": "500 Internal Server Error \u2013 Internal server error or timeout" } } } }, "/{db}/_sync_shards": { "post": { "summary": "", "tags": [ "database" ], "description": "For the given database, force-starts internal shard synchronization\nfor all replicas of all database shards.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "202": { "description": "202 Accepted \u2013 Request accepted" }, "400": { "description": "400 Bad Request \u2013 Invalid database name" }, "401": { "description": "401 Unauthorized \u2013 CouchDB Server Administrator privileges required" }, "404": { "description": "404 Not Found \u2013 Database not found" }, "500": { "description": "500 Internal Server Error \u2013 Internal server error or timeout" } } } }, "/{db}/_changes": { "get": { "summary": "", "tags": [ "database" ], "description": "Returns a sorted list of changes made to documents in the database, in time\norder of application, can be obtained from the database\u2019s _changes\nresource. Only the most recent change for a given document is guaranteed to\nbe provided, for example if a document has had fields added, and then\ndeleted, an API client checking for changes will not necessarily receive\nthe intermediate state of added documents.", "parameters": [ { "name": "doc_ids", "in": "query", "description": "doc_ids (array) \u2013 List of document IDs to filter the changes feed as\nvalid JSON array. Used with _doc_ids\nfilter. Since length of URL is limited, it is better to use\nPOST /{db}/_changes instead.", "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "conflicts", "in": "query", "description": "conflicts (boolean) \u2013 Includes conflicts information in response.\nIgnored if include_docs isn\u2019t true. Default is false.", "schema": { "type": "boolean" } }, { "name": "descending", "in": "query", "description": "descending (boolean) \u2013 Return the change results in descending sequence\norder (most recent change first). Default is false.", "schema": { "type": "boolean" } }, { "name": "feed", "in": "query", "description": "feed (string) \u2013 ", "schema": { "type": "string" } }, { "name": "filter", "in": "query", "description": "filter (string) \u2013 Reference to a filter function\nfrom a design document that will filter whole stream emitting only\nfiltered events. See the section Change Notifications in the book\nCouchDB The Definitive Guide for more information.", "schema": { "type": "string" } }, { "name": "heartbeat", "in": "query", "description": "heartbeat (number) \u2013 Period in milliseconds after which an empty\nline is sent in the results. Only applicable for longpoll, continuous, and\neventsource feeds. Overrides any timeout\nto keep the feed alive indefinitely. Default is 60000. May be\ntrue to use default value.", "schema": { "type": "number" } }, { "name": "include_docs", "in": "query", "description": "include_docs (boolean) \u2013 Include the associated document with each\nresult. If there are conflicts, only the winning revision is returned.\nDefault is false.", "schema": { "type": "boolean" } }, { "name": "attachments", "in": "query", "description": "attachments (boolean) \u2013 Include the Base64-encoded content of\nattachments in the documents that\nare included if include_docs is true. Ignored if include_docs\nisn\u2019t true. Default is false.", "schema": { "type": "boolean" } }, { "name": "att_encoding_info", "in": "query", "description": "att_encoding_info (boolean) \u2013 Include encoding information in attachment\nstubs if include_docs is true and the particular attachment is\ncompressed. Ignored if include_docs isn\u2019t true.\nDefault is false.", "schema": { "type": "boolean" } }, { "name": "last-event-id", "in": "query", "description": "last-event-id (number) \u2013 Alias of Last-Event-ID header.", "schema": { "type": "number" } }, { "name": "limit", "in": "query", "description": "limit (number) \u2013 Limit number of result rows to the specified value\n(note that using 0 here has the same effect as 1).", "schema": { "type": "number" } }, { "name": "since", "in": "query", "description": "since \u2013 Start the results from the change immediately after the given\nupdate sequence. Can be valid update sequence or now value.\nDefault is 0.", "schema": { "type": "object" } }, { "name": "style", "in": "query", "description": "style (string) \u2013 Specifies how many revisions are returned in\nthe changes array. The default, main_only, will only return\nthe current \u201cwinning\u201d revision; all_docs will return all leaf\nrevisions (including conflicts and deleted former conflicts).", "schema": { "type": "string" } }, { "name": "timeout", "in": "query", "description": "timeout (number) \u2013 Maximum period in milliseconds to wait for a change\nbefore the response is sent, even if there are no results.\nOnly applicable for longpoll or\ncontinuous feeds.\nDefault value is specified by chttpd/changes_timeout\nconfiguration option. Note that 60000 value is also the default\nmaximum timeout to prevent undetected dead connections.", "schema": { "type": "number" } }, { "name": "view", "in": "query", "description": "view (string) \u2013 Allows to use view functions as filters. Documents\ncounted as \u201cpassed\u201d for view filter in case if map function emits\nat least one record for them.\nSee _view for more info.", "schema": { "type": "string" } }, { "name": "seq_interval", "in": "query", "description": "seq_interval (number) \u2013 When fetching changes in a batch, setting the\nseq_interval parameter tells CouchDB to only calculate the update seq\nwith every Nth result returned. By setting seq_interval=\n, where is the number of results requested per batch,\nload can be reduced on the source CouchDB database; computing the seq\nvalue across many shards (esp. in highly-sharded databases) is expensive\nin a heavily loaded CouchDB cluster.", "schema": { "type": "number" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "400": { "description": "400 Bad Request \u2013 Bad request" } } }, "post": { "summary": "", "tags": [ "database" ], "description": "Returns a sorted list of changes made to documents in the database, in time\norder of application, can be obtained from the database\u2019s _changes\nresource. Only the most recent change for a given document is guaranteed to\nbe provided, for example if a document has had fields added, and then\ndeleted, an API client checking for changes will not necessarily receive\nthe intermediate state of added documents.", "parameters": [ { "name": "doc_ids", "in": "query", "description": "doc_ids (array) \u2013 List of document IDs to filter the changes feed as\nvalid JSON array. Used with _doc_ids\nfilter. Since length of URL is limited, it is better to use\nPOST /{db}/_changes instead.", "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "conflicts", "in": "query", "description": "conflicts (boolean) \u2013 Includes conflicts information in response.\nIgnored if include_docs isn\u2019t true. Default is false.", "schema": { "type": "boolean" } }, { "name": "descending", "in": "query", "description": "descending (boolean) \u2013 Return the change results in descending sequence\norder (most recent change first). Default is false.", "schema": { "type": "boolean" } }, { "name": "feed", "in": "query", "description": "feed (string) \u2013 ", "schema": { "type": "string" } }, { "name": "filter", "in": "query", "description": "filter (string) \u2013 Reference to a filter function\nfrom a design document that will filter whole stream emitting only\nfiltered events. See the section Change Notifications in the book\nCouchDB The Definitive Guide for more information.", "schema": { "type": "string" } }, { "name": "heartbeat", "in": "query", "description": "heartbeat (number) \u2013 Period in milliseconds after which an empty\nline is sent in the results. Only applicable for longpoll, continuous, and\neventsource feeds. Overrides any timeout\nto keep the feed alive indefinitely. Default is 60000. May be\ntrue to use default value.", "schema": { "type": "number" } }, { "name": "include_docs", "in": "query", "description": "include_docs (boolean) \u2013 Include the associated document with each\nresult. If there are conflicts, only the winning revision is returned.\nDefault is false.", "schema": { "type": "boolean" } }, { "name": "attachments", "in": "query", "description": "attachments (boolean) \u2013 Include the Base64-encoded content of\nattachments in the documents that\nare included if include_docs is true. Ignored if include_docs\nisn\u2019t true. Default is false.", "schema": { "type": "boolean" } }, { "name": "att_encoding_info", "in": "query", "description": "att_encoding_info (boolean) \u2013 Include encoding information in attachment\nstubs if include_docs is true and the particular attachment is\ncompressed. Ignored if include_docs isn\u2019t true.\nDefault is false.", "schema": { "type": "boolean" } }, { "name": "last-event-id", "in": "query", "description": "last-event-id (number) \u2013 Alias of Last-Event-ID header.", "schema": { "type": "number" } }, { "name": "limit", "in": "query", "description": "limit (number) \u2013 Limit number of result rows to the specified value\n(note that using 0 here has the same effect as 1).", "schema": { "type": "number" } }, { "name": "since", "in": "query", "description": "since \u2013 Start the results from the change immediately after the given\nupdate sequence. Can be valid update sequence or now value.\nDefault is 0.", "schema": { "type": "object" } }, { "name": "style", "in": "query", "description": "style (string) \u2013 Specifies how many revisions are returned in\nthe changes array. The default, main_only, will only return\nthe current \u201cwinning\u201d revision; all_docs will return all leaf\nrevisions (including conflicts and deleted former conflicts).", "schema": { "type": "string" } }, { "name": "timeout", "in": "query", "description": "timeout (number) \u2013 Maximum period in milliseconds to wait for a change\nbefore the response is sent, even if there are no results.\nOnly applicable for longpoll or\ncontinuous feeds.\nDefault value is specified by chttpd/changes_timeout\nconfiguration option. Note that 60000 value is also the default\nmaximum timeout to prevent undetected dead connections.", "schema": { "type": "number" } }, { "name": "view", "in": "query", "description": "view (string) \u2013 Allows to use view functions as filters. Documents\ncounted as \u201cpassed\u201d for view filter in case if map function emits\nat least one record for them.\nSee _view for more info.", "schema": { "type": "string" } }, { "name": "seq_interval", "in": "query", "description": "seq_interval (number) \u2013 When fetching changes in a batch, setting the\nseq_interval parameter tells CouchDB to only calculate the update seq\nwith every Nth result returned. By setting seq_interval=\n, where is the number of results requested per batch,\nload can be reduced on the source CouchDB database; computing the seq\nvalue across many shards (esp. in highly-sharded databases) is expensive\nin a heavily loaded CouchDB cluster.", "schema": { "type": "number" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "400": { "description": "400 Bad Request \u2013 Bad request" } } } }, "/{db}/_compact": { "post": { "summary": "", "tags": [ "database" ], "description": "Request compaction of the specified database. Compaction compresses the\ndisk database file by performing the following operations:", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "202": { "description": "202 Accepted \u2013 Compaction request has been accepted" }, "400": { "description": "400 Bad Request \u2013 Invalid database name" }, "401": { "description": "401 Unauthorized \u2013 CouchDB Server Administrator privileges required" }, "415": { "description": "415 Unsupported Media Type \u2013 Bad Content-Type value" } } } }, "/{db}/_compact/{ddoc}": { "post": { "summary": "", "tags": [ "database" ], "description": "Compacts the view indexes associated with the specified design document.\nIt may be that compacting a large view can return more storage than\ncompacting the actual db. Thus, you can use this in place of the full\ndatabase compaction if you know a specific set of view indexes have been\naffected by a recent database change.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "202": { "description": "202 Accepted \u2013 Compaction request has been accepted" }, "400": { "description": "400 Bad Request \u2013 Invalid database name" }, "401": { "description": "401 Unauthorized \u2013 CouchDB Server Administrator privileges required" }, "404": { "description": "404 Not Found \u2013 Design document not found" }, "415": { "description": "415 Unsupported Media Type \u2013 Bad Content-Type value" } } } }, "/{db}/_ensure_full_commit": { "post": { "summary": "", "tags": [ "database" ], "description": "Before 3.0 this was used to commit recent changes to the database in case\nthe delayed_commits=true option was set. That option is always\nfalse now, so commits are never delayed. However, this endpoint is kept\nfor compatibility with older replicators.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "201": { "description": "201 Created \u2013 Commit completed successfully" }, "400": { "description": "400 Bad Request \u2013 Invalid database name" }, "415": { "description": "415 Unsupported Media Type \u2013 Bad Content-Type value" } } } }, "/{db}/_view_cleanup": { "post": { "summary": "", "tags": [ "database" ], "description": "Removes view index files that are no longer required by CouchDB as a result\nof changed views within design documents. As the view filename is based on\na hash of the view functions, over time old views will remain, consuming\nstorage. This call cleans up the cached view output on disk for\na given view.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "202": { "description": "202 Accepted \u2013 Compaction request has been accepted" }, "400": { "description": "400 Bad Request \u2013 Invalid database name" }, "401": { "description": "401 Unauthorized \u2013 CouchDB Server Administrator privileges required" }, "415": { "description": "415 Unsupported Media Type \u2013 Bad Content-Type value" } } } }, "/{db}/_security": { "get": { "summary": "", "tags": [ "database" ], "description": "Returns the current security object from the specified database.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "401": { "description": "401 Unauthorized \u2013 CouchDB Server Administrator privileges required" } } }, "put": { "summary": "", "tags": [ "database" ], "description": "Returns the current security object from the specified database.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "401": { "description": "401 Unauthorized \u2013 CouchDB Server Administrator privileges required" } } } }, "/{db}/_purge": { "post": { "summary": "", "tags": [ "database" ], "description": "A database purge permanently removes the references to documents\nin the database. Normal deletion of a document within CouchDB does not\nremove the document from the database, instead, the document is marked as\n_deleted=true (and a new revision is created). This is to ensure that\ndeleted documents can be replicated to other databases as having been\ndeleted. This also means that you can check the status of a document and\nidentify that the document has been deleted by its absence.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "201": { "description": "201 Created \u2013 Request completed successfully" }, "202": { "description": "202 Accepted \u2013 Request was accepted, and was completed successfully on at least\none replica, but quorum was not reached." }, "400": { "description": "400 Bad Request \u2013 Invalid database name or JSON payload" }, "415": { "description": "415 Unsupported Media Type \u2013 Bad Content-Type value" }, "500": { "description": "500 Internal Server Error \u2013 Internal server error or timeout" } } } }, "/{db}/_purged_infos_limit": { "get": { "summary": "", "tags": [ "database" ], "description": "Gets the current purged_infos_limit (purged documents limit) setting,\nthe maximum number of historical purges (purged document Ids with their\nrevisions) that can be stored in the database.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "400": { "description": "400 Bad Request \u2013 Invalid JSON data" } } }, "put": { "summary": "", "tags": [ "database" ], "description": "Gets the current purged_infos_limit (purged documents limit) setting,\nthe maximum number of historical purges (purged document Ids with their\nrevisions) that can be stored in the database.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "400": { "description": "400 Bad Request \u2013 Invalid JSON data" } } } }, "/{db}/_missing_revs": { "post": { "summary": "", "tags": [ "database" ], "description": "With given a list of document revisions, returns the document revisions\nthat do not exist in the database.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "400": { "description": "400 Bad Request \u2013 Invalid database name or JSON payload" } } } }, "/{db}/_revs_diff": { "post": { "summary": "", "tags": [ "database" ], "description": "Given a set of document/revision IDs, returns the subset of those that do\nnot correspond to revisions stored in the database.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "400": { "description": "400 Bad Request \u2013 Invalid database name or JSON payload" } } } }, "/{db}/_revs_limit": { "get": { "summary": "", "tags": [ "database" ], "description": "Gets the current revs_limit (revision limit) setting.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "400": { "description": "400 Bad Request \u2013 Invalid JSON data" } } }, "put": { "summary": "", "tags": [ "database" ], "description": "Gets the current revs_limit (revision limit) setting.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "400": { "description": "400 Bad Request \u2013 Invalid JSON data" } } } }, "/{db}/{docid}": { "head": { "summary": "", "tags": [ "document" ], "description": "Returns the HTTP Headers containing a minimal amount of information about\nthe specified document. The method supports the same query arguments as the\nGET /{db}/{docid} method, but only the header information (including\ndocument size, and the revision as an ETag), is returned.", "parameters": [ { "name": "attachments", "in": "query", "description": "attachments (boolean) \u2013 Includes attachments bodies in response.\nDefault is false", "schema": { "type": "boolean" } }, { "name": "att_encoding_info", "in": "query", "description": "att_encoding_info (boolean) \u2013 Includes encoding information in\nattachment stubs if the particular attachment is compressed. Default is\nfalse.", "schema": { "type": "boolean" } }, { "name": "atts_since", "in": "query", "description": "atts_since (array) \u2013 Includes attachments only since specified\nrevisions. Doesn\u2019t includes attachments for specified revisions.\nOptional", "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "conflicts", "in": "query", "description": "conflicts (boolean) \u2013 Includes information about conflicts in document.\nDefault is false", "schema": { "type": "boolean" } }, { "name": "deleted_conflicts", "in": "query", "description": "deleted_conflicts (boolean) \u2013 Includes information about deleted\nconflicted revisions. Default is false", "schema": { "type": "boolean" } }, { "name": "latest", "in": "query", "description": "latest (boolean) \u2013 Forces retrieving latest \u201cleaf\u201d revision, no matter\nwhat rev was requested. Default is false", "schema": { "type": "boolean" } }, { "name": "local_seq", "in": "query", "description": "local_seq (boolean) \u2013 Includes last update sequence for the\ndocument. Default is false", "schema": { "type": "boolean" } }, { "name": "meta", "in": "query", "description": "meta (boolean) \u2013 Acts same as specifying all conflicts,\ndeleted_conflicts and revs_info query parameters. Default is\nfalse", "schema": { "type": "boolean" } }, { "name": "open_revs", "in": "query", "description": "open_revs (array) \u2013 Retrieves documents of specified leaf revisions.\nAdditionally, it accepts value as all to return all leaf revisions.\nOptional", "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "rev", "in": "query", "description": "rev (string) \u2013 Retrieves document of specified revision. Optional", "schema": { "type": "string" } }, { "name": "revs", "in": "query", "description": "revs (boolean) \u2013 Includes list of all known document revisions.\nDefault is false", "schema": { "type": "boolean" } }, { "name": "revs_info", "in": "query", "description": "revs_info (boolean) \u2013 Includes detailed information for all known\ndocument revisions. Default is false", "schema": { "type": "boolean" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "docid", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Document successfully removed" }, "304": { "description": "304 Not Modified \u2013 Document wasn\u2019t modified since specified revision" }, "401": { "description": "401 Unauthorized \u2013 Read or write privileges required" }, "404": { "description": "404 Not Found \u2013 Specified database, document ID or revision doesn\u2019t exists" }, "400": { "description": "400 Bad Request \u2013 Invalid request body or parameters" }, "201": { "description": "201 Created \u2013 Document successfully created" }, "202": { "description": "202 Accepted \u2013 Request was accepted, but changes are not yet stored on disk" }, "409": { "description": "409 Conflict \u2013 Document with the specified ID already exists or specified\nrevision is not latest for target document" } } }, "get": { "summary": "", "tags": [ "document" ], "description": "Returns the HTTP Headers containing a minimal amount of information about\nthe specified document. The method supports the same query arguments as the\nGET /{db}/{docid} method, but only the header information (including\ndocument size, and the revision as an ETag), is returned.", "parameters": [ { "name": "attachments", "in": "query", "description": "attachments (boolean) \u2013 Includes attachments bodies in response.\nDefault is false", "schema": { "type": "boolean" } }, { "name": "att_encoding_info", "in": "query", "description": "att_encoding_info (boolean) \u2013 Includes encoding information in\nattachment stubs if the particular attachment is compressed. Default is\nfalse.", "schema": { "type": "boolean" } }, { "name": "atts_since", "in": "query", "description": "atts_since (array) \u2013 Includes attachments only since specified\nrevisions. Doesn\u2019t includes attachments for specified revisions.\nOptional", "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "conflicts", "in": "query", "description": "conflicts (boolean) \u2013 Includes information about conflicts in document.\nDefault is false", "schema": { "type": "boolean" } }, { "name": "deleted_conflicts", "in": "query", "description": "deleted_conflicts (boolean) \u2013 Includes information about deleted\nconflicted revisions. Default is false", "schema": { "type": "boolean" } }, { "name": "latest", "in": "query", "description": "latest (boolean) \u2013 Forces retrieving latest \u201cleaf\u201d revision, no matter\nwhat rev was requested. Default is false", "schema": { "type": "boolean" } }, { "name": "local_seq", "in": "query", "description": "local_seq (boolean) \u2013 Includes last update sequence for the\ndocument. Default is false", "schema": { "type": "boolean" } }, { "name": "meta", "in": "query", "description": "meta (boolean) \u2013 Acts same as specifying all conflicts,\ndeleted_conflicts and revs_info query parameters. Default is\nfalse", "schema": { "type": "boolean" } }, { "name": "open_revs", "in": "query", "description": "open_revs (array) \u2013 Retrieves documents of specified leaf revisions.\nAdditionally, it accepts value as all to return all leaf revisions.\nOptional", "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "rev", "in": "query", "description": "rev (string) \u2013 Retrieves document of specified revision. Optional", "schema": { "type": "string" } }, { "name": "revs", "in": "query", "description": "revs (boolean) \u2013 Includes list of all known document revisions.\nDefault is false", "schema": { "type": "boolean" } }, { "name": "revs_info", "in": "query", "description": "revs_info (boolean) \u2013 Includes detailed information for all known\ndocument revisions. Default is false", "schema": { "type": "boolean" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "docid", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Document successfully removed" }, "304": { "description": "304 Not Modified \u2013 Document wasn\u2019t modified since specified revision" }, "401": { "description": "401 Unauthorized \u2013 Read or write privileges required" }, "404": { "description": "404 Not Found \u2013 Specified database, document ID or revision doesn\u2019t exists" }, "400": { "description": "400 Bad Request \u2013 Invalid request body or parameters" }, "201": { "description": "201 Created \u2013 Document successfully created" }, "202": { "description": "202 Accepted \u2013 Request was accepted, but changes are not yet stored on disk" }, "409": { "description": "409 Conflict \u2013 Document with the specified ID already exists or specified\nrevision is not latest for target document" } } }, "put": { "summary": "", "tags": [ "document" ], "description": "Returns the HTTP Headers containing a minimal amount of information about\nthe specified document. The method supports the same query arguments as the\nGET /{db}/{docid} method, but only the header information (including\ndocument size, and the revision as an ETag), is returned.", "parameters": [ { "name": "attachments", "in": "query", "description": "attachments (boolean) \u2013 Includes attachments bodies in response.\nDefault is false", "schema": { "type": "boolean" } }, { "name": "att_encoding_info", "in": "query", "description": "att_encoding_info (boolean) \u2013 Includes encoding information in\nattachment stubs if the particular attachment is compressed. Default is\nfalse.", "schema": { "type": "boolean" } }, { "name": "atts_since", "in": "query", "description": "atts_since (array) \u2013 Includes attachments only since specified\nrevisions. Doesn\u2019t includes attachments for specified revisions.\nOptional", "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "conflicts", "in": "query", "description": "conflicts (boolean) \u2013 Includes information about conflicts in document.\nDefault is false", "schema": { "type": "boolean" } }, { "name": "deleted_conflicts", "in": "query", "description": "deleted_conflicts (boolean) \u2013 Includes information about deleted\nconflicted revisions. Default is false", "schema": { "type": "boolean" } }, { "name": "latest", "in": "query", "description": "latest (boolean) \u2013 Forces retrieving latest \u201cleaf\u201d revision, no matter\nwhat rev was requested. Default is false", "schema": { "type": "boolean" } }, { "name": "local_seq", "in": "query", "description": "local_seq (boolean) \u2013 Includes last update sequence for the\ndocument. Default is false", "schema": { "type": "boolean" } }, { "name": "meta", "in": "query", "description": "meta (boolean) \u2013 Acts same as specifying all conflicts,\ndeleted_conflicts and revs_info query parameters. Default is\nfalse", "schema": { "type": "boolean" } }, { "name": "open_revs", "in": "query", "description": "open_revs (array) \u2013 Retrieves documents of specified leaf revisions.\nAdditionally, it accepts value as all to return all leaf revisions.\nOptional", "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "rev", "in": "query", "description": "rev (string) \u2013 Retrieves document of specified revision. Optional", "schema": { "type": "string" } }, { "name": "revs", "in": "query", "description": "revs (boolean) \u2013 Includes list of all known document revisions.\nDefault is false", "schema": { "type": "boolean" } }, { "name": "revs_info", "in": "query", "description": "revs_info (boolean) \u2013 Includes detailed information for all known\ndocument revisions. Default is false", "schema": { "type": "boolean" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "docid", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Document successfully removed" }, "304": { "description": "304 Not Modified \u2013 Document wasn\u2019t modified since specified revision" }, "401": { "description": "401 Unauthorized \u2013 Read or write privileges required" }, "404": { "description": "404 Not Found \u2013 Specified database, document ID or revision doesn\u2019t exists" }, "400": { "description": "400 Bad Request \u2013 Invalid request body or parameters" }, "201": { "description": "201 Created \u2013 Document successfully created" }, "202": { "description": "202 Accepted \u2013 Request was accepted, but changes are not yet stored on disk" }, "409": { "description": "409 Conflict \u2013 Document with the specified ID already exists or specified\nrevision is not latest for target document" } } }, "delete": { "summary": "", "tags": [ "document" ], "description": "Returns the HTTP Headers containing a minimal amount of information about\nthe specified document. The method supports the same query arguments as the\nGET /{db}/{docid} method, but only the header information (including\ndocument size, and the revision as an ETag), is returned.", "parameters": [ { "name": "attachments", "in": "query", "description": "attachments (boolean) \u2013 Includes attachments bodies in response.\nDefault is false", "schema": { "type": "boolean" } }, { "name": "att_encoding_info", "in": "query", "description": "att_encoding_info (boolean) \u2013 Includes encoding information in\nattachment stubs if the particular attachment is compressed. Default is\nfalse.", "schema": { "type": "boolean" } }, { "name": "atts_since", "in": "query", "description": "atts_since (array) \u2013 Includes attachments only since specified\nrevisions. Doesn\u2019t includes attachments for specified revisions.\nOptional", "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "conflicts", "in": "query", "description": "conflicts (boolean) \u2013 Includes information about conflicts in document.\nDefault is false", "schema": { "type": "boolean" } }, { "name": "deleted_conflicts", "in": "query", "description": "deleted_conflicts (boolean) \u2013 Includes information about deleted\nconflicted revisions. Default is false", "schema": { "type": "boolean" } }, { "name": "latest", "in": "query", "description": "latest (boolean) \u2013 Forces retrieving latest \u201cleaf\u201d revision, no matter\nwhat rev was requested. Default is false", "schema": { "type": "boolean" } }, { "name": "local_seq", "in": "query", "description": "local_seq (boolean) \u2013 Includes last update sequence for the\ndocument. Default is false", "schema": { "type": "boolean" } }, { "name": "meta", "in": "query", "description": "meta (boolean) \u2013 Acts same as specifying all conflicts,\ndeleted_conflicts and revs_info query parameters. Default is\nfalse", "schema": { "type": "boolean" } }, { "name": "open_revs", "in": "query", "description": "open_revs (array) \u2013 Retrieves documents of specified leaf revisions.\nAdditionally, it accepts value as all to return all leaf revisions.\nOptional", "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "rev", "in": "query", "description": "rev (string) \u2013 Retrieves document of specified revision. Optional", "schema": { "type": "string" } }, { "name": "revs", "in": "query", "description": "revs (boolean) \u2013 Includes list of all known document revisions.\nDefault is false", "schema": { "type": "boolean" } }, { "name": "revs_info", "in": "query", "description": "revs_info (boolean) \u2013 Includes detailed information for all known\ndocument revisions. Default is false", "schema": { "type": "boolean" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "docid", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Document successfully removed" }, "304": { "description": "304 Not Modified \u2013 Document wasn\u2019t modified since specified revision" }, "401": { "description": "401 Unauthorized \u2013 Read or write privileges required" }, "404": { "description": "404 Not Found \u2013 Specified database, document ID or revision doesn\u2019t exists" }, "400": { "description": "400 Bad Request \u2013 Invalid request body or parameters" }, "201": { "description": "201 Created \u2013 Document successfully created" }, "202": { "description": "202 Accepted \u2013 Request was accepted, but changes are not yet stored on disk" }, "409": { "description": "409 Conflict \u2013 Document with the specified ID already exists or specified\nrevision is not latest for target document" } } } }, "/{db}/{docid}/{attname}": { "head": { "summary": "", "tags": [ "document" ], "description": "Returns the HTTP headers containing a minimal amount of information about\nthe specified attachment. The method supports the same query arguments as\nthe GET /{db}/{docid}/{attname} method, but only the header information\n(including attachment size, encoding and the MD5 hash as an\nETag), is returned.", "parameters": [ { "name": "rev", "in": "query", "description": "rev (string) \u2013 Document\u2019s revision. Optional", "schema": { "type": "string" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "docid", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "attname", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Attachment successfully removed" }, "401": { "description": "401 Unauthorized \u2013 Write privileges required" }, "404": { "description": "404 Not Found \u2013 Specified database, document or attachment was not found" }, "201": { "description": "201 Created \u2013 Attachment created and stored on disk" }, "202": { "description": "202 Accepted \u2013 Request was accepted, but changes are not yet stored on disk" }, "400": { "description": "400 Bad Request \u2013 Invalid request body or parameters" }, "409": { "description": "409 Conflict \u2013 Document\u2019s revision wasn\u2019t specified or it\u2019s not the latest" } } }, "get": { "summary": "", "tags": [ "document" ], "description": "Returns the HTTP headers containing a minimal amount of information about\nthe specified attachment. The method supports the same query arguments as\nthe GET /{db}/{docid}/{attname} method, but only the header information\n(including attachment size, encoding and the MD5 hash as an\nETag), is returned.", "parameters": [ { "name": "rev", "in": "query", "description": "rev (string) \u2013 Document\u2019s revision. Optional", "schema": { "type": "string" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "docid", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "attname", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Attachment successfully removed" }, "401": { "description": "401 Unauthorized \u2013 Write privileges required" }, "404": { "description": "404 Not Found \u2013 Specified database, document or attachment was not found" }, "201": { "description": "201 Created \u2013 Attachment created and stored on disk" }, "202": { "description": "202 Accepted \u2013 Request was accepted, but changes are not yet stored on disk" }, "400": { "description": "400 Bad Request \u2013 Invalid request body or parameters" }, "409": { "description": "409 Conflict \u2013 Document\u2019s revision wasn\u2019t specified or it\u2019s not the latest" } } }, "put": { "summary": "", "tags": [ "document" ], "description": "Returns the HTTP headers containing a minimal amount of information about\nthe specified attachment. The method supports the same query arguments as\nthe GET /{db}/{docid}/{attname} method, but only the header information\n(including attachment size, encoding and the MD5 hash as an\nETag), is returned.", "parameters": [ { "name": "rev", "in": "query", "description": "rev (string) \u2013 Document\u2019s revision. Optional", "schema": { "type": "string" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "docid", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "attname", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Attachment successfully removed" }, "401": { "description": "401 Unauthorized \u2013 Write privileges required" }, "404": { "description": "404 Not Found \u2013 Specified database, document or attachment was not found" }, "201": { "description": "201 Created \u2013 Attachment created and stored on disk" }, "202": { "description": "202 Accepted \u2013 Request was accepted, but changes are not yet stored on disk" }, "400": { "description": "400 Bad Request \u2013 Invalid request body or parameters" }, "409": { "description": "409 Conflict \u2013 Document\u2019s revision wasn\u2019t specified or it\u2019s not the latest" } } }, "delete": { "summary": "", "tags": [ "document" ], "description": "Returns the HTTP headers containing a minimal amount of information about\nthe specified attachment. The method supports the same query arguments as\nthe GET /{db}/{docid}/{attname} method, but only the header information\n(including attachment size, encoding and the MD5 hash as an\nETag), is returned.", "parameters": [ { "name": "rev", "in": "query", "description": "rev (string) \u2013 Document\u2019s revision. Optional", "schema": { "type": "string" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "docid", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "attname", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Attachment successfully removed" }, "401": { "description": "401 Unauthorized \u2013 Write privileges required" }, "404": { "description": "404 Not Found \u2013 Specified database, document or attachment was not found" }, "201": { "description": "201 Created \u2013 Attachment created and stored on disk" }, "202": { "description": "202 Accepted \u2013 Request was accepted, but changes are not yet stored on disk" }, "400": { "description": "400 Bad Request \u2013 Invalid request body or parameters" }, "409": { "description": "409 Conflict \u2013 Document\u2019s revision wasn\u2019t specified or it\u2019s not the latest" } } } }, "/{db}/_design/{ddoc}": { "head": { "summary": "", "tags": [ "design-document" ], "description": "Returns the HTTP Headers containing a minimal amount of information about\nthe specified design document.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "default": { "description": "No information about this response. Give it a go!" } } }, "get": { "summary": "", "tags": [ "design-document" ], "description": "Returns the HTTP Headers containing a minimal amount of information about\nthe specified design document.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "default": { "description": "No information about this response. Give it a go!" } } }, "put": { "summary": "", "tags": [ "design-document" ], "description": "Returns the HTTP Headers containing a minimal amount of information about\nthe specified design document.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "default": { "description": "No information about this response. Give it a go!" } } }, "delete": { "summary": "", "tags": [ "design-document" ], "description": "Returns the HTTP Headers containing a minimal amount of information about\nthe specified design document.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "default": { "description": "No information about this response. Give it a go!" } } } }, "/{db}/_design/{ddoc}/{attname}": { "head": { "summary": "", "tags": [ "design-document" ], "description": "Returns the HTTP headers containing a minimal amount of information about\nthe specified attachment.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "attname", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "default": { "description": "No information about this response. Give it a go!" } } }, "get": { "summary": "", "tags": [ "design-document" ], "description": "Returns the HTTP headers containing a minimal amount of information about\nthe specified attachment.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "attname", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "default": { "description": "No information about this response. Give it a go!" } } }, "put": { "summary": "", "tags": [ "design-document" ], "description": "Returns the HTTP headers containing a minimal amount of information about\nthe specified attachment.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "attname", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "default": { "description": "No information about this response. Give it a go!" } } }, "delete": { "summary": "", "tags": [ "design-document" ], "description": "Returns the HTTP headers containing a minimal amount of information about\nthe specified attachment.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "attname", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "default": { "description": "No information about this response. Give it a go!" } } } }, "/{db}/_design/{ddoc}/_info": { "get": { "summary": "", "tags": [ "design-document" ], "description": "Obtains information about the specified design document, including the\nindex, index size and current status of the design document and associated\nindex information.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" } } } }, "/{db}/_design/{ddoc}/_view/{view}": { "get": { "summary": "", "tags": [ "design-document" ], "description": "Executes the specified view function from the specified design document.", "parameters": [ { "name": "conflicts", "in": "query", "description": "conflicts (boolean) \u2013 Include conflicts information in response.\nIgnored if include_docs isn\u2019t true. Default is false.", "schema": { "type": "boolean" } }, { "name": "descending", "in": "query", "description": "descending (boolean) \u2013 Return the documents in descending order by key.\nDefault is false.", "schema": { "type": "boolean" } }, { "name": "endkey", "in": "query", "description": "endkey (json) \u2013 Stop returning records when the specified key is\nreached.", "schema": { "type": "object" } }, { "name": "end_key", "in": "query", "description": "end_key (json) \u2013 Alias for endkey param", "schema": { "type": "object" } }, { "name": "endkey_docid", "in": "query", "description": "endkey_docid (string) \u2013 Stop returning records when the specified\ndocument ID is reached. Ignored if endkey is not set.", "schema": { "type": "string" } }, { "name": "end_key_doc_id", "in": "query", "description": "end_key_doc_id (string) \u2013 Alias for endkey_docid.", "schema": { "type": "string" } }, { "name": "group", "in": "query", "description": "group (boolean) \u2013 Group the results using the reduce function to a\ngroup or single row. Implies reduce is true and the maximum\ngroup_level. Default is false.", "schema": { "type": "boolean" } }, { "name": "group_level", "in": "query", "description": "group_level (number) \u2013 Specify the group level to be used. Implies\ngroup is true.", "schema": { "type": "number" } }, { "name": "include_docs", "in": "query", "description": "include_docs (boolean) \u2013 Include the associated document with each row.\nDefault is false.", "schema": { "type": "boolean" } }, { "name": "attachments", "in": "query", "description": "attachments (boolean) \u2013 Include the Base64-encoded content of\nattachments in the documents that are\nincluded if include_docs is true. Ignored if include_docs isn\u2019t\ntrue. Default is false.", "schema": { "type": "boolean" } }, { "name": "att_encoding_info", "in": "query", "description": "att_encoding_info (boolean) \u2013 Include encoding information in\nattachment stubs if include_docs is true and the particular\nattachment is compressed. Ignored if include_docs isn\u2019t true.\nDefault is false.", "schema": { "type": "boolean" } }, { "name": "inclusive_end", "in": "query", "description": "inclusive_end (boolean) \u2013 Specifies whether the specified end key\nshould be included in the result. Default is true.", "schema": { "type": "boolean" } }, { "name": "key", "in": "query", "description": "key (json) \u2013 Return only documents that match the specified key.", "schema": { "type": "object" } }, { "name": "keys", "in": "query", "description": "keys (json-array) \u2013 Return only documents where the key matches one of\nthe keys specified in the array.", "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "limit", "in": "query", "description": "limit (number) \u2013 Limit the number of the returned documents to the\nspecified number.", "schema": { "type": "number" } }, { "name": "reduce", "in": "query", "description": "reduce (boolean) \u2013 Use the reduction function. Default is true when\na reduce function is defined.", "schema": { "type": "boolean" } }, { "name": "skip", "in": "query", "description": "skip (number) \u2013 Skip this number of records before starting to return\nthe results. Default is 0.", "schema": { "type": "number" } }, { "name": "sorted", "in": "query", "description": "sorted (boolean) \u2013 Sort returned rows (see Sorting Returned Rows). Setting this to false offers a performance\nboost. The total_rows and offset fields are not available when this\nis set to false. Default is true.", "schema": { "type": "boolean" } }, { "name": "stable", "in": "query", "description": "stable (boolean) \u2013 Whether or not the view results should be returned\nfrom a stable set of shards. Default is false.", "schema": { "type": "boolean" } }, { "name": "stale", "in": "query", "description": "stale (string) \u2013 Allow the results from a stale view to be used.\nSupported values: ok and update_after.\nok is equivalent to stable=true&update=false.\nupdate_after is equivalent to stable=true&update=lazy.\nThe default behavior is equivalent to stable=false&update=true.\nNote that this parameter is deprecated. Use stable and update instead.\nSee Views Generation for more details.", "schema": { "type": "string" } }, { "name": "startkey", "in": "query", "description": "startkey (json) \u2013 Return records starting with the specified key.", "schema": { "type": "object" } }, { "name": "start_key", "in": "query", "description": "start_key (json) \u2013 Alias for startkey.", "schema": { "type": "object" } }, { "name": "startkey_docid", "in": "query", "description": "startkey_docid (string) \u2013 Return records starting with the specified\ndocument ID. Ignored if startkey is not set.", "schema": { "type": "string" } }, { "name": "start_key_doc_id", "in": "query", "description": "start_key_doc_id (string) \u2013 Alias for startkey_docid param", "schema": { "type": "string" } }, { "name": "update", "in": "query", "description": "update (string) \u2013 Whether or not the view in question should be updated\nprior to responding to the user. Supported values: true, false,\nlazy. Default is true.", "schema": { "type": "string" } }, { "name": "update_seq", "in": "query", "description": "update_seq (boolean) \u2013 Whether to include in the response an\nupdate_seq value indicating the sequence id of the database the view\nreflects. Default is false.", "schema": { "type": "boolean" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "view", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "400": { "description": "400 Bad Request \u2013 Invalid request" }, "401": { "description": "401 Unauthorized \u2013 Read permission required" }, "404": { "description": "404 Not Found \u2013 Specified database, design document or view is missing" }, "500": { "description": "500 Internal Server Error \u2013 View function execution error" } } }, "post": { "summary": "", "tags": [ "design-document" ], "description": "Executes the specified view function from the specified design document.", "parameters": [ { "name": "conflicts", "in": "query", "description": "conflicts (boolean) \u2013 Include conflicts information in response.\nIgnored if include_docs isn\u2019t true. Default is false.", "schema": { "type": "boolean" } }, { "name": "descending", "in": "query", "description": "descending (boolean) \u2013 Return the documents in descending order by key.\nDefault is false.", "schema": { "type": "boolean" } }, { "name": "endkey", "in": "query", "description": "endkey (json) \u2013 Stop returning records when the specified key is\nreached.", "schema": { "type": "object" } }, { "name": "end_key", "in": "query", "description": "end_key (json) \u2013 Alias for endkey param", "schema": { "type": "object" } }, { "name": "endkey_docid", "in": "query", "description": "endkey_docid (string) \u2013 Stop returning records when the specified\ndocument ID is reached. Ignored if endkey is not set.", "schema": { "type": "string" } }, { "name": "end_key_doc_id", "in": "query", "description": "end_key_doc_id (string) \u2013 Alias for endkey_docid.", "schema": { "type": "string" } }, { "name": "group", "in": "query", "description": "group (boolean) \u2013 Group the results using the reduce function to a\ngroup or single row. Implies reduce is true and the maximum\ngroup_level. Default is false.", "schema": { "type": "boolean" } }, { "name": "group_level", "in": "query", "description": "group_level (number) \u2013 Specify the group level to be used. Implies\ngroup is true.", "schema": { "type": "number" } }, { "name": "include_docs", "in": "query", "description": "include_docs (boolean) \u2013 Include the associated document with each row.\nDefault is false.", "schema": { "type": "boolean" } }, { "name": "attachments", "in": "query", "description": "attachments (boolean) \u2013 Include the Base64-encoded content of\nattachments in the documents that are\nincluded if include_docs is true. Ignored if include_docs isn\u2019t\ntrue. Default is false.", "schema": { "type": "boolean" } }, { "name": "att_encoding_info", "in": "query", "description": "att_encoding_info (boolean) \u2013 Include encoding information in\nattachment stubs if include_docs is true and the particular\nattachment is compressed. Ignored if include_docs isn\u2019t true.\nDefault is false.", "schema": { "type": "boolean" } }, { "name": "inclusive_end", "in": "query", "description": "inclusive_end (boolean) \u2013 Specifies whether the specified end key\nshould be included in the result. Default is true.", "schema": { "type": "boolean" } }, { "name": "key", "in": "query", "description": "key (json) \u2013 Return only documents that match the specified key.", "schema": { "type": "object" } }, { "name": "keys", "in": "query", "description": "keys (json-array) \u2013 Return only documents where the key matches one of\nthe keys specified in the array.", "schema": { "type": "array", "items": { "type": "string" } } }, { "name": "limit", "in": "query", "description": "limit (number) \u2013 Limit the number of the returned documents to the\nspecified number.", "schema": { "type": "number" } }, { "name": "reduce", "in": "query", "description": "reduce (boolean) \u2013 Use the reduction function. Default is true when\na reduce function is defined.", "schema": { "type": "boolean" } }, { "name": "skip", "in": "query", "description": "skip (number) \u2013 Skip this number of records before starting to return\nthe results. Default is 0.", "schema": { "type": "number" } }, { "name": "sorted", "in": "query", "description": "sorted (boolean) \u2013 Sort returned rows (see Sorting Returned Rows). Setting this to false offers a performance\nboost. The total_rows and offset fields are not available when this\nis set to false. Default is true.", "schema": { "type": "boolean" } }, { "name": "stable", "in": "query", "description": "stable (boolean) \u2013 Whether or not the view results should be returned\nfrom a stable set of shards. Default is false.", "schema": { "type": "boolean" } }, { "name": "stale", "in": "query", "description": "stale (string) \u2013 Allow the results from a stale view to be used.\nSupported values: ok and update_after.\nok is equivalent to stable=true&update=false.\nupdate_after is equivalent to stable=true&update=lazy.\nThe default behavior is equivalent to stable=false&update=true.\nNote that this parameter is deprecated. Use stable and update instead.\nSee Views Generation for more details.", "schema": { "type": "string" } }, { "name": "startkey", "in": "query", "description": "startkey (json) \u2013 Return records starting with the specified key.", "schema": { "type": "object" } }, { "name": "start_key", "in": "query", "description": "start_key (json) \u2013 Alias for startkey.", "schema": { "type": "object" } }, { "name": "startkey_docid", "in": "query", "description": "startkey_docid (string) \u2013 Return records starting with the specified\ndocument ID. Ignored if startkey is not set.", "schema": { "type": "string" } }, { "name": "start_key_doc_id", "in": "query", "description": "start_key_doc_id (string) \u2013 Alias for startkey_docid param", "schema": { "type": "string" } }, { "name": "update", "in": "query", "description": "update (string) \u2013 Whether or not the view in question should be updated\nprior to responding to the user. Supported values: true, false,\nlazy. Default is true.", "schema": { "type": "string" } }, { "name": "update_seq", "in": "query", "description": "update_seq (boolean) \u2013 Whether to include in the response an\nupdate_seq value indicating the sequence id of the database the view\nreflects. Default is false.", "schema": { "type": "boolean" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "view", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "400": { "description": "400 Bad Request \u2013 Invalid request" }, "401": { "description": "401 Unauthorized \u2013 Read permission required" }, "404": { "description": "404 Not Found \u2013 Specified database, design document or view is missing" }, "500": { "description": "500 Internal Server Error \u2013 View function execution error" } } } }, "/{db}/_design/{ddoc}/_view/{view}/queries": { "post": { "summary": "", "tags": [ "design-document" ], "description": "Executes multiple specified view queries against the view function\nfrom the specified design document.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "view", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "400": { "description": "400 Bad Request \u2013 Invalid request" }, "401": { "description": "401 Unauthorized \u2013 Read permission required" }, "404": { "description": "404 Not Found \u2013 Specified database, design document or view is missing" }, "500": { "description": "500 Internal Server Error \u2013 View function execution error" } } } }, "/{db}/_design/{ddoc}/_search/{index}": { "get": { "summary": "", "tags": [ "design-document" ], "description": "Executes a search request against the named index in the specified design document.", "parameters": [ { "name": "bookmark", "in": "query", "description": "bookmark (string) \u2013 A bookmark received from a previous search. This parameter\nenables paging through the results. If there are no more results after the\nbookmark, you get a response with an empty rows array and the same bookmark,\nconfirming the end of the result list.", "schema": { "type": "string" } }, { "name": "counts", "in": "query", "description": "counts (json) \u2013 An array of names of string fields for which counts\nare requested. The response contains counts for each unique value of this field\nname among the documents that match the search query. Faceting must be enabled for this parameter to function.", "schema": { "type": "object" } }, { "name": "drilldown", "in": "query", "description": "drilldown (json) \u2013 This field can be used several times. Each use defines a pair\nwith a field name and a value. The search matches only documents containing the\nvalue that was provided in the named field. It differs from using\n\"fieldname:value\" in the q parameter only in that the values are not\nanalyzed. Faceting must be enabled for this\nparameter to function.", "schema": { "type": "object" } }, { "name": "group_field", "in": "query", "description": "group_field (string) \u2013 Field by which to group search matches. :query number\ngroup_limit: Maximum group count. This field can be used only if group_field\nis specified.", "schema": { "type": "string" } }, { "name": "group_sort", "in": "query", "description": "group_sort (json) \u2013 This field defines the order of the groups in a search that\nuses group_field. The default sort order is relevance.", "schema": { "type": "object" } }, { "name": "highlight_fields", "in": "query", "description": "highlight_fields (json) \u2013 Specifies which fields to highlight. If specified, the\nresult object contains a highlights field with an entry for each specified\nfield.", "schema": { "type": "object" } }, { "name": "highlight_pre_tag", "in": "query", "description": "highlight_pre_tag (string) \u2013 A string that is inserted before the highlighted\nword in the highlights output.", "schema": { "type": "string" } }, { "name": "highlight_post_tag", "in": "query", "description": "highlight_post_tag (string) \u2013 A string that is inserted after the highlighted\nword in the highlights output.", "schema": { "type": "string" } }, { "name": "highlight_number", "in": "query", "description": "highlight_number (number) \u2013 Number of fragments that are returned in highlights.\nIf the search term occurs less often than the number of fragments that are\nspecified, longer fragments are returned.", "schema": { "type": "number" } }, { "name": "highlight_size", "in": "query", "description": "highlight_size (number) \u2013 Number of characters in each fragment for highlights.", "schema": { "type": "number" } }, { "name": "include_docs", "in": "query", "description": "include_docs (boolean) \u2013 Include the full content of the documents in the\nresponse.", "schema": { "type": "boolean" } }, { "name": "include_fields", "in": "query", "description": "include_fields (json) \u2013 A JSON array of field names to include in search\nresults. Any fields that are included must be indexed with the store:true option.", "schema": { "type": "object" } }, { "name": "limit", "in": "query", "description": "limit (number) \u2013 Limit the number of the returned documents to the specified\nnumber. For a grouped search, this parameter limits the number of documents per\ngroup.", "schema": { "type": "number" } }, { "name": "q", "in": "query", "description": "q (string) \u2013 Alias for query.", "schema": { "type": "string" } }, { "name": "query", "in": "query", "description": "query (string) \u2013 Required. The Lucene query string.", "schema": { "type": "string" } }, { "name": "ranges", "in": "query", "description": "ranges (json) \u2013 This field defines ranges for faceted, numeric search fields. The\nvalue is a JSON object where the fields names are faceted numeric search fields,\nand the values of the fields are JSON objects. The field names of the JSON objects\nare names for ranges. The values are strings that describe the range, for example\n\u201c[0 TO 10]\u201d.", "schema": { "type": "object" } }, { "name": "sort", "in": "query", "description": "sort (json) \u2013 Specifies the sort order of the results. In a grouped search (when\ngroup_field is used), this parameter specifies the sort order within a group.\nThe default sort order is relevance. A JSON string of the form\n\"fieldname\" or -fieldname for descending order, where\nfieldname is the name of a string or number field, and type is either a\nnumber, a string, or a JSON array of strings. The type part is optional, and\ndefaults to number. Some examples are \"foo\", \"-foo\", \"bar\",\n\"-foo\" and [\"-foo\", \"bar\"]. String fields that\nare used for sorting must not be analyzed fields. Fields that are used for sorting\nmust be indexed by the same indexer that is used for the search query.", "schema": { "type": "object" } }, { "name": "stale", "in": "query", "description": "stale (string) \u2013 Set to ok to allow the use of an out-of-date index.", "schema": { "type": "string" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "index", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "400": { "description": "400 Bad Request \u2013 Invalid request" }, "401": { "description": "401 Unauthorized \u2013 Read permission required" }, "404": { "description": "404 Not Found \u2013 Specified database, design document or view is missed" } } } }, "/{db}/_design/{ddoc}/_search_info/{index}": { "get": { "summary": "", "tags": [ "design-document" ], "description": "", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "index", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "400": { "description": "400 Bad Request \u2013 Request body is wrong (malformed or missing one of the mandatory fields)" }, "500": { "description": "500 Internal Server Error \u2013 A server error (or other kind of error) occurred" } } } }, "/{db}/_design/{ddoc}/_show/{func}": { "get": { "summary": "", "tags": [ "design-document" ], "description": "Applies show function for null document.", "parameters": [ { "name": "format", "in": "query", "description": "format (string) \u2013 Format of the returned response.\nUsed by provides() function", "schema": { "type": "string" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "func", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "500": { "description": "500 Internal Server Error \u2013 Query server error" } } }, "post": { "summary": "", "tags": [ "design-document" ], "description": "Applies show function for null document.", "parameters": [ { "name": "format", "in": "query", "description": "format (string) \u2013 Format of the returned response.\nUsed by provides() function", "schema": { "type": "string" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "func", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "500": { "description": "500 Internal Server Error \u2013 Query server error" } } } }, "/{db}/_design/{ddoc}/_show/{func}/{docid}": { "get": { "summary": "", "tags": [ "design-document" ], "description": "Applies show function for the specified document.", "parameters": [ { "name": "format", "in": "query", "description": "format (string) \u2013 Format of the returned response.\nUsed by provides() function", "schema": { "type": "string" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "func", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "docid", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "500": { "description": "500 Internal Server Error \u2013 Query server error" } } }, "post": { "summary": "", "tags": [ "design-document" ], "description": "Applies show function for the specified document.", "parameters": [ { "name": "format", "in": "query", "description": "format (string) \u2013 Format of the returned response.\nUsed by provides() function", "schema": { "type": "string" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "func", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "docid", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "500": { "description": "500 Internal Server Error \u2013 Query server error" } } } }, "/{db}/_design/{ddoc}/_list/{func}/{view}": { "get": { "summary": "", "tags": [ "design-document" ], "description": "Applies list function for the view function from the same design document.", "parameters": [ { "name": "format", "in": "query", "description": "format (string) \u2013 Format of the returned response.\nUsed by provides() function", "schema": { "type": "string" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "func", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "view", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "500": { "description": "500 Internal Server Error \u2013 Query server error" } } }, "post": { "summary": "", "tags": [ "design-document" ], "description": "Applies list function for the view function from the same design document.", "parameters": [ { "name": "format", "in": "query", "description": "format (string) \u2013 Format of the returned response.\nUsed by provides() function", "schema": { "type": "string" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "func", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "view", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "500": { "description": "500 Internal Server Error \u2013 Query server error" } } } }, "/{db}/_design/{ddoc}/_list/{func}/{other-ddoc}/{view}": { "get": { "summary": "", "tags": [ "design-document" ], "description": "Applies list function for the view function from the other design document.", "parameters": [ { "name": "format", "in": "query", "description": "format (string) \u2013 Format of the returned response.\nUsed by provides() function", "schema": { "type": "string" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "func", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "other-ddoc", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "view", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "500": { "description": "500 Internal Server Error \u2013 Query server error" } } }, "post": { "summary": "", "tags": [ "design-document" ], "description": "Applies list function for the view function from the other design document.", "parameters": [ { "name": "format", "in": "query", "description": "format (string) \u2013 Format of the returned response.\nUsed by provides() function", "schema": { "type": "string" } }, { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "func", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "other-ddoc", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "view", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" }, "500": { "description": "500 Internal Server Error \u2013 Query server error" } } } }, "/{db}/_design/{ddoc}/_update/{func}": { "post": { "summary": "", "tags": [ "design-document" ], "description": "Executes update function on server side for null\ndocument.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "func", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 No document was created or updated" }, "201": { "description": "201 Created \u2013 Document was created or updated" }, "500": { "description": "500 Internal Server Error \u2013 Query server error" } } } }, "/{db}/_design/{ddoc}/_update/{func}/{docid}": { "put": { "summary": "", "tags": [ "design-document" ], "description": "Executes update function on server side for the specified\ndocument.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "func", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "docid", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 No document was created or updated" }, "201": { "description": "201 Created \u2013 Document was created or updated" }, "500": { "description": "500 Internal Server Error \u2013 Query server error" } } } }, "/{db}/_design/{ddoc}/_rewrite/{path}": { "post": { "summary": "", "tags": [ "design-document" ], "description": "Rewrites the specified path by rules defined in the specified design\ndocument. The rewrite rules are defined by the rewrites field of the\ndesign document. The rewrites field can either be a string containing\nthe a rewrite function or an array of rule definitions.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "path", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "default": { "description": "No information about this response. Give it a go!" } } } }, "/{db}/_partition/{partition}": { "get": { "summary": "", "tags": [ "partitioned-database" ], "description": "This endpoint returns information describing the provided partition.\nIt includes document and deleted document counts along with external\nand active data sizes.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "partition", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "200 OK \u2013 Request completed successfully" } } } }, "/{db}/_partition/{partition}/_all_docs": { "get": { "summary": "", "tags": [ "partitioned-database" ], "description": "This endpoint is a convenience endpoint for automatically setting\nbounds on the provided partition range. Similar results can be had\nby using the global /db/_all_docs endpoint with appropriately\nconfigured values for start_key and end_key.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "partition", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "default": { "description": "No information about this response. Give it a go!" } } } }, "/{db}/_partition/{partition}/_design/{ddoc}/_view/{view}": { "get": { "summary": "", "tags": [ "partitioned-database" ], "description": "This endpoint is responsible for executing a partitioned query. The\nreturned view result will only contain rows with the specified\npartition name.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "partition", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "ddoc", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "view", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "default": { "description": "No information about this response. Give it a go!" } } } }, "/{db}/_partition/{partition_id}/_find": { "post": { "summary": "", "tags": [ "partitioned-database" ], "description": "This endpoint is responsible for finding a partition query by its ID.\nThe returned view result will only contain rows with the\nspecified partition id.", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "partition_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "default": { "description": "No information about this response. Give it a go!" } } } }, "/{db}/_partition/{partition_id}/_explain": { "post": { "summary": "", "tags": [ "partitioned-database" ], "description": "Name of the partition to query", "parameters": [ { "name": "db", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "partition_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "default": { "description": "No information about this response. Give it a go!" } } } } }, "components": { "schemas": {}, "responses": {}, "parameters": {}, "examples": {}, "requestBodies": {}, "headers": {}, "securitySchemes": {}, "links": {}, "callbacks": {} } }