Database
In this guide
Database resources provide an interface to an entire database. The following table lists the database resources:
| HTTP Method | URI pattern | Description |
|---|---|---|
PUT
|
/{db}
| Creates a new database |
GET
|
/{db}
| Retrieves information about a database |
DELETE
|
/{db}
| Deletes a database |
GET
|
/{db}/_all_docs
| Retrieves the built-in view of all documents in the database |
POST
|
/{db}/_all_docs
| Retrieves specified documents from the built-in view of all documents in the database |
POST
|
/{db}/_bulk_docs
| Inserts multiple documents into the database in a single request |
GET
|
/{db}/_changes
| Returns changes for the database |
POST
|
/{db}/_compact
| Starts a compaction for the database |
POST
|
/{db}/_purge
| Purges some historical documents from the database history |
POST
|
/{db}/_temp_view
| Executes a given view function for all documents and returns the result |
In the URI patterns, {db} represents the name of the database on which you want to operate.
Articles
- PUT /{db}
- Create a new database
- GET /{db}
- Retrieve information about a database
- DELETE /{db}
- Delete a database
- GET /{db}/_all_docs
- Retrieve the built-in view of all documents
- POST /{db}/_all_docs
- Retrieve specified documents from the database
- POST /{db}/_bulk_docs
- Add, update, or delete multiple documents to a database
- GET /{db}/_changes
- Retrieve a list of changes
- POST /{db}/_compact
- Compress the disk file
- POST /{db}/_purge
- Purge deleted documents
- POST /{db}/_temp_view
- Executes a temporary view function