Method | PUT /db | |
Request | None | |
Response | JSON success statement | |
Admin Privileges Required | no | |
Return Codes | ||
400 | Invalid database name | |
412 | Database already exists |
Creates a new database. The database name must be composed of one or more of the following characters:
Lowercase characters (a-z
)
Name must begin with a lowercase letter
Digits (0-9
)
Any of the characters _
,
$
, (
,
)
, +
,
-
, and /
.
Trying to create a database that does not meet these requirements will return an error quoting these restrictions.
To create the database recipes
:
PUT http://couchdb:5984/recipes Content-Type: application/json
The returned content contains the JSON status:
{ "ok" : true }
Anything should be treated as an error, and the problem should be taken form the HTTP response code.