GET /api/webhook_templates
List webhook templates

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

search
optional

filter results

Validations:

  • Must be a String

order
optional

Sort and order by a searchable field, e.g. 'id DESC'

Validations:

  • Must be a String

page
optional

Page number, starting at 1

Validations:

  • Must be a number.

per_page
optional

Number of results per page to return, 'all' to return all results

Validations:

  • Must match regular expression /\A([1-9]\d*|all)\Z$/.

Search fields

Field name Type Possible values
default true, false
location
location_id
locked true, false
name
organization
organization_id
snippet true, false
template

GET /api/webhook_templates/:id
Show webhook template details

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


POST /api/webhook_templates
Create a webhook template

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

webhook_template
required

Validations:

  • Must be a Hash

webhook_template[name]
required

Validations:

  • Must be a String

webhook_template[description]
optional , nil allowed

Validations:

  • Must be a String

webhook_template[template]
required

Validations:

  • Must be a String

webhook_template[snippet]
optional , nil allowed

Validations:

  • Must be one of: true, false, 1, 0.

webhook_template[audit_comment]
optional , nil allowed

Validations:

  • Must be a String

webhook_template[locked]
optional , nil allowed

Whether or not the template is locked for editing

Validations:

  • Must be one of: true, false, 1, 0.

webhook_template[default]
optional , nil allowed

Whether or not the template is added automatically to new organizations and locations

Validations:

  • Must be one of: true, false, 1, 0.

webhook_template[location_ids]
optional , nil allowed

REPLACE locations with given ids

Validations:

  • Must be an array of any type

webhook_template[organization_ids]
optional , nil allowed

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type


POST /api/webhook_templates/import
Import a webhook template

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

webhook_template
required

Validations:

  • Must be a Hash

webhook_template[name]
optional

Template name

Validations:

  • Must be a String

webhook_template[template]
optional

Template contents including metadata

Validations:

  • Must be a String

webhook_template[location_ids]
optional , nil allowed

REPLACE locations with given ids

Validations:

  • Must be an array of any type

webhook_template[organization_ids]
optional , nil allowed

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type

options
optional

Validations:

  • Must be a Hash

options[force]
optional , nil allowed

use if you want update locked templates

Validations:

  • Must be one of: true, false, 1, 0.

options[associate]
optional , nil allowed

determines when the template should associate objects based on metadata, new means only when new template is being created, always means both for new and existing template which is only being updated, never ignores metadata

Validations:

  • Must be one of: new, always, never.

options[lock]
optional , nil allowed

lock imported templates (false by default)

Validations:

  • Must be one of: true, false, 1, 0.

options[default]
optional , nil allowed

makes the template default meaning it will be automatically associated with newly created organizations and locations (false by default)

Validations:

  • Must be one of: true, false, 1, 0.


PUT /api/webhook_templates/:id
Update a webhook template

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

webhook_template
required

Validations:

  • Must be a Hash

webhook_template[name]
optional

Validations:

  • Must be a String

webhook_template[description]
optional , nil allowed

Validations:

  • Must be a String

webhook_template[template]
optional

Validations:

  • Must be a String

webhook_template[snippet]
optional , nil allowed

Validations:

  • Must be one of: true, false, 1, 0.

webhook_template[audit_comment]
optional , nil allowed

Validations:

  • Must be a String

webhook_template[locked]
optional , nil allowed

Whether or not the template is locked for editing

Validations:

  • Must be one of: true, false, 1, 0.

webhook_template[default]
optional , nil allowed

Whether or not the template is added automatically to new organizations and locations

Validations:

  • Must be one of: true, false, 1, 0.

webhook_template[location_ids]
optional , nil allowed

REPLACE locations with given ids

Validations:

  • Must be an array of any type

webhook_template[organization_ids]
optional , nil allowed

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type


DELETE /api/webhook_templates/:id
Delete a webhook template

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


POST /api/webhook_templates/:id/clone
Clone a template

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

webhook_template
required

Validations:

  • Must be a Hash

webhook_template[name]
required

Template name

Validations:

  • Must be a String


GET /api/webhook_templates/:id/export
Export a webhook template to ERB

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.