Sounds like auto incrementing IDs is something that NoSQL databases users are needing. Aravinda has posted a solution for getting auto incementing IDs in CouchDB:
As of now, PHP function involves two http calls for adding single document. Let me know if you find any ways to reduce it to one http call.
But as pointed out by a commenter, unfortunately the proposed solution is not re-entrant. As far as I can tell there’s a way to get UUIDs from CouchDB, but the values will not be incremental, not sure if even ordered:
curl -X GET <a href='#' rel='external nofollow'>http://127.0.0.1:5984/_uuids?count=10</a>
Original title and link: CouchDB: Auto Increment IDs with PHP (NoSQL databases © myNoSQL)