Skip to content
This repository has been archived by the owner on Jul 6, 2022. It is now read-only.

campsi/campsi-service-webhooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Campsi Webhooks Service

Greenkeeper badge Build Status Coverage Status Known Vulnerabilities

Webhooks are configurable callbacks over HTTP that are sent when an event with a matching name is triggered.

Service config options

  • channel String prefix of the event that may trigger webhooks, defaults to webhooks
  • requireAuth Bool wether the webhooks have to be attached to a user, defaults to true

API

Create a new Webhook

GET /:service/ Returns all the webhooks configured.

POST /:service/ Expecting a JSON body containing the following properties

  • uri the URI the request will be sent
  • event the name of the event that should trigger the webhook
  • method (optional) the HTTP verb used.
  • headers (optional) an object containing the headers that should be sent with the request

DELETE /:service/:webhook_id Removes a webhook based on its id.

TODO

  • isAdmin
  • paginateCursor
  • event authorization (check if the owner of the webhook is authorized to listen to such event)