Skip to content

Latest commit

 

History

History
95 lines (68 loc) · 1.8 KB

webhooks.md

File metadata and controls

95 lines (68 loc) · 1.8 KB

Webhooks

Overview

The resources responsible for managing Webhooks

Available Resources

  1. netField.webhooks.getAll(organisationId, [page, limit, sortBy, sortOrder, callback])

  2. netField.webhooks.get(webhookId, [callback])

  3. netField.webhooks.create(params, [options], [callback])

  4. netField.webhooks.update(webhookId, params, [options], [callback])

  5. netField.webhooks.delete(webhookId, [callback])

  6. netField.webhooks.test(params, [callback])

Resource Usage

getAll

Get list of webhooks
/**
 * @param {number} organisationId
 * @param {any} options optional
 * @param {function} callback optional
*/
netField.webhooks.getAll(organisationId, [options], [callback])

get

Get a webhook
/**
 * @param {string} webhookId
 * @param {any} options optional
 * @param {function} callback optional
*/
netField.webhooks.get(webhookId, [options], [callback])

create

Adds a new webhook
/**
 * @param {any} params
 * @param {function} callback optional
*/
netField.webhooks.create(params, [options], [callback])

update

Updates a webhook
/**
 * @param {string} webhookId
 * @param {any} params
 * @param {function} callback optional
*/
netField.webhooks.update(webhookId, params, [callback])

delete

Delete a webhook
/**
 * @param {string} webhookId
 * @param {function} callback optional
*/
netField.webhooks.delete(webhookId, [callback])

test

Trigger a single webhook for testing purposes 
/**
 * @param {any} params
 * @param {function} callback optional
*/
netField.webhooks.test(params, [callback])