Skip to content
This repository has been archived by the owner on Mar 10, 2023. It is now read-only.

Webhooks (beta)

Davide Santangelo edited this page May 6, 2020 · 4 revisions

Webhooks allow you to build or set up integrations which subscribe to certain events on api.feedirss.com. When one of those events is triggered, we'll send an HTTP POST payload to the webhook's configured URL. Webhooks can be used to update an external issue tracker, monitoring, etc... You're only limited by your imagination.

Webhooks can be created only with a PERMANENT TOKEN

Events

When configuring a webhook, you can choose which events you would like to receive payloads for. You can even opt-in to all current and future events. Only subscribing to the specific events you plan on handling is useful for limiting the number of HTTP requests to your server. You can change the list of subscribed events through the API anytime.

Each event corresponds to a certain set of actions that can happen. For example, if you subscribe to the entry_created event you'll receive detailed payloads every time an entry is created.

Example

https://webhook.site/#!/b383a473-6f93-4ab1-8e72-80826ae42aa1/703007cf-3adf-40f1-8e9c-9da6cbd81ea3/1

CREATE WEBHOOK

# POST /:feed_id/webhooks
payload = { "url":"https://webhook.site/", "events": ["entry_created"] }.to_json

headers = { Authorization: "Token #{TOKEN}", content_type: :json, accept: :json }

RestClient.post("https://api.feedirss.com/:feed_id/webhooks", payload, headers)

SHOW WEBHOOK

# GET /:feed_id/webhooks/:id
headers = { Authorization: "Token #{TOKEN}", content_type: :json, accept: :json }

RestClient.get "https://api.feedirss.com/{feed_id}/webhooks/{id}", { Authorization: "Token #{TOKEN}" }

DELETE WEBHOOK

# DELETE /:feed_id/webhooks/:id
headers = { Authorization: "Token #{TOKEN}", content_type: :json, accept: :json }

RestClient.delete "https://api.feedirss.com/{feed_id}/webhooks/{id}", { Authorization: "Token #{TOKEN}" }
Clone this wiki locally