Create a webhook

post/compute-ops-mgmt/v1beta1/webhooks

Creates a webhook.

SecurityBearer
Request
Request Body schema: application/json
required
name
required
string

The name associated with the webhook.

destination
required
string <uri>

User configurable https endpoint that is able to receive HTTP GET and POST requests.

state
required
string (webhookState)

The state is managed by both Compute Ops Management and the user. If the handshake fails or deliveries are consistently failing this will be set to DISABLED by the system.

  • DISABLED - Set by the user to disable the endpoint without losing configuration. Additionally can be set by the System when the handshake fails or multiple 4xx/5xx responses are received. Events are not sent while in this state.
  • ENABLED - Shows that the user has enabled the endpoint. Can only be set to ENABLED by the user which will cause the webhook to re-initiate the verification handshake, even if it has succeeded in the past.
Enum: "DISABLED" "ENABLED"
eventFilter
required
string

The OData configuration of events to receive. For more information, expand the Event Webhook section and refer to the Filtering page.

headers
required
object

The set of HTTP request headers that will be included in the GET and POST requests sent to the destination.

Compute Ops Management reserves any headers that begin with x-compute-ops-mgmt and will deny requests that attempt to use that value.

Responses
201

Successful Response

400

Bad request

401

Unauthorized

403

Forbidden

404

Not found

406

Not acceptable

415

Unsupported media type

500

Internal server error

Request samples
application/json
{
  • "name": "Server Webhook",
  • "state": "DISABLED",
  • "eventFilter": "type eq 'compute-ops/server'",
  • "headers": {
    }
}
Response samples
application/json
{
  • "name": "Server Webhook",
  • "id": "36e00ac2-16fb-4dd5-8495-7e6df82fc15e",
  • "type": "compute-ops-mgmt/webhooks",
  • "generation": 1,
  • "createdAt": "2022-02-11T01:04:20.799937+00:00",
  • "updatedAt": "2022-03-11T01:06:30.799489+00:00",
  • "eventFilter": "type eq 'compute-ops/server'",
  • "state": "DISABLED",
  • "status": "DISABLED",
  • "statusReason": "Created",
  • "resourceUri": "/compute-ops-mgmt/v1beta1/webhooks/b870f080-6448-48c5-b23a-d04f2d489174",
  • "deliveriesUri": "/compute-ops-mgmt/v1beta1/webhooks/b870f080-6448-48c5-b23a-d04f2d489174/deliveries"
}