The official documentation has moved to http://docs.couchdb.org — The transition is not 100% complete, but http://docs.couchdb.org should be seen as having the latest info. In some cases, the wiki still has some more or older info on certain topics inside CouchDB.

You need to be added to the ContributorsGroup to edit the wiki. But don't worry! Just email any Mailing List or grab us on IRC and let us know your user name.

HTTP GET _uuids

Method

GET

Path

/_uuids

Query args

count=n

How many UUIDs to generate (optional, default 1)

Request body

None

Response body

JSON object containing a list of generated UUIDs

Description

Returns a list of generated UUIDs. CouchDB generated UUIDs are of all lowercase strings of 32 characters; they do not conform to the UUID standard. They are obtained from through this API, and automatically used when using POST to add articles to a database, but are not otherwise used anywhere. There is no need to use the UUIDs generated by CouchDB for anything. The generated UUIDs are not checked for uniqueness. In the (very unlikely) case of where there is a duplicate, this is expected to be resolved when documents are inserted in to the database.

CouchDB attempts to make sure that the results of this request are never cached by giving several cache-inhibiting headers in the response.

CouchDB has three different UUID generation algorithms:

The UUID generation algorithm is specified in CouchDB configuration as uuids/algorithm.

Example

GET /_uuids HTTP/1.1

HTTP/1.1 200 OK
Pragma: no-cache
Expires: Fri, 01 Jan 1990 00:00:00 GMT
ETag: "EWNHGXU29MRN49ZE792Z9Q466"
Cache-Control: must-revalidate, no-cache

{"uuids":["0992c54b79c5f8c603947c67a00002d2"]}

HttpGetUuids (last edited 2012-04-16 12:04:32 by JasonSmith)