Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Unable to create a document with auto-generated _id #52

@durera

Description

@durera

doc = cloudantDb.document("someIdIMadeUp")
future = doc.put(params={'type': foo, 'name': bar})
future.add_done_callback(callback)

I really just want to submit a record and allow Cloudant to generate the UUID. I can see that I can make a seperate request to Cloudant to get a list of UUIDs and then pass this in, but that seems like a redundant use of a HTTP call when I should just be able to submit a doc without an ID and allow couch to assign it. I can't seem to find a way to do this using this library implementation .. am I missing something obvious perhaps?

e.g. something like

doc = cloudantDb.document()
future = doc.put(params={'type': foo, 'name': bar})
future.add_done_callback(myCallback)

or

future = cloudantDb.putDoc({'type': foo, 'name': bar})
future.add_done_callback(myCallback)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions