GET /api/webhooks
List Webhooks

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
enabled true, false
name
target_url

GET /api/webhooks/:id
Show Webhook 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/webhooks
Create a Webhook

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
required

Validations:

  • Must be a Hash

webhook[name]
required

Validations:

  • Must be a String

webhook[target_url]
required

Validations:

  • Must be a String

webhook[http_method]
optional , nil allowed

Validations:

  • Must be one of: POST, GET, PUT, DELETE, PATCH.

webhook[http_content_type]
optional , nil allowed

Validations:

  • Must be a String

webhook[event]
required

Validations:

  • Must be one of: build_entered, build_exited, create_rss_notifications_performed, domain_created, domain_destroyed, domain_updated, host_created, host_destroyed, host_updated, hostgroup_created, hostgroup_destroyed, hostgroup_updated, model_created, model_destroyed, model_updated, status_changed, stored_values_cleanup_performed, subnet_created, subnet_destroyed, subnet_updated, template_render_performed, user_created, user_destroyed, user_updated.

webhook[webhook_template_id]
optional , nil allowed

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[enabled]
optional , nil allowed

Validations:

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

webhook[verify_ssl]
optional , nil allowed

Validations:

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

webhook[ssl_ca_certs]
optional , nil allowed

X509 Certification Authorities concatenated in PEM format

Validations:

  • Must be a String

webhook[user]
optional , nil allowed

Validations:

  • Must be a String

webhook[password]
optional , nil allowed

Validations:

  • Must be a String

webhook[http_headers]
optional , nil allowed

Validations:

  • Must be a String

webhook[proxy_authorization]
optional , nil allowed

Authorize with Foreman client certificate and validate smart-proxy CA from Settings

Validations:

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


PUT /api/webhooks/:id
Update a Webhook

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
required

Validations:

  • Must be a Hash

webhook[name]
optional

Validations:

  • Must be a String

webhook[target_url]
optional

Validations:

  • Must be a String

webhook[http_method]
optional , nil allowed

Validations:

  • Must be one of: POST, GET, PUT, DELETE, PATCH.

webhook[http_content_type]
optional , nil allowed

Validations:

  • Must be a String

webhook[event]
optional

Validations:

  • Must be one of: build_entered, build_exited, create_rss_notifications_performed, domain_created, domain_destroyed, domain_updated, host_created, host_destroyed, host_updated, hostgroup_created, hostgroup_destroyed, hostgroup_updated, model_created, model_destroyed, model_updated, status_changed, stored_values_cleanup_performed, subnet_created, subnet_destroyed, subnet_updated, template_render_performed, user_created, user_destroyed, user_updated.

webhook[webhook_template_id]
optional , nil allowed

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[enabled]
optional , nil allowed

Validations:

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

webhook[verify_ssl]
optional , nil allowed

Validations:

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

webhook[ssl_ca_certs]
optional , nil allowed

X509 Certification Authorities concatenated in PEM format

Validations:

  • Must be a String

webhook[user]
optional , nil allowed

Validations:

  • Must be a String

webhook[password]
optional , nil allowed

Validations:

  • Must be a String

webhook[http_headers]
optional , nil allowed

Validations:

  • Must be a String

webhook[proxy_authorization]
optional , nil allowed

Authorize with Foreman client certificate and validate smart-proxy CA from Settings

Validations:

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


DELETE /api/webhooks/:id
Delete a Webhook

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.


GET /api/webhooks/events
List available events for subscription

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