Connect your Webhooks to Weblatch
- Sign-up for a Cloudant account
- Create a
weblatch
database in your new account. git clone
this repocd
into that directorycouchapp push . http://{user}:{pass}@{your}.cloudant.com/weblatch
- you can also do
erica push . {url}
if you'd prefer.
- Verify that Weblatch is installed by visiting your Cloudant Dashboard.
Set your Webhook to POST
to...
http://{your}.cloudant.com/weblatch/_design/weblatch/_update/latch
If the body of your POST request is JSON and includes and _id
field, the new
document will use that _id
field for its value. If it does not include an
_id
field, then Cloudant will generate a UUID.
Alternatively, you can use PUT
like so...
http://{your}.cloudant.com/weblatch/_design/weblatch/_update/latch/{doc_id}
Where doc_id
is your preferred document ID (aka, doc._id
). Depending on the
system you're using, PUT may be easier to setup than POST as the sender does
not need to include an _id
key--the latch
update handler will do that.