EDB Postgres Enterprise Manager REST APIs v6.0: Webhook v10.2

get__webhook_

Code samples

GET /webhook/

Retrieval of the webhook list

Parameters

NameInTypeRequiredDescription
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

200 Response
[
  {
    "id": 0,
    "name": "string",
    "url": "string",
    "enabled": true,
    "method": "string",
    "http_headers": [
      {
        "http_header_id": 0,
        "http_header_key": "string",
        "http_header_value": "string"
      }
    ],
    "payload_template": "string",
    "low_alert": true,
    "med_alert": true,
    "high_alert": true,
    "cleared_alert": true
  }
]

Responses

StatusMeaningDescriptionSchema
200OKStatus 200Inline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
anonymous[Webhook]falsenonenone
» idintegerfalsenoneWebhook id
» namestringfalsenoneWebhook name
» urlstringfalsenoneWebhook url
» enabledbooleanfalsenoneDefines whether the webhook is enabled, or not.
» methodstringfalsenoneRequest method
» http_headers[WebhookGetHTTPHeaders]falsenoneList of the http header key/value pair to be used by the webhook.
»» http_header_idintegerfalsenoneID of the http header
»» http_header_keystringfalsenoneName of the http header key
»» http_header_valuestringfalsenoneName of the http header key
» payload_templatestringfalsenonePayload template
» low_alertbooleanfalsenoneDefines whether the low alert is enabled, or not.
» med_alertbooleanfalsenoneDefines whether the medium alert is enabled, or not.
» high_alertbooleanfalsenoneDefines whether the high alert is enabled, or not.
» cleared_alertbooleanfalsenoneDefines whether the cleared alert is enabled, or not.
Info

This operation does not require authentication

post__webhook_

Code samples

POST /webhook/

Add a new webhook.

Body parameter

{
  "name": "string",
  "url": "string",
  "enabled": true,
  "method": "string",
  "http_headers": [
    {
      "http_header_key": "string",
      "http_header_value": "string"
    }
  ],
  "payload_template": "string",
  "low_alert": true,
  "med_alert": true,
  "high_alert": true,
  "cleared_alert": true
}

Parameters

NameInTypeRequiredDescription
X-Auth-TokenheaderstringtrueToken of authorization
bodybodyWebhookPostDatatruenone

Example responses

Responses

StatusMeaningDescriptionSchema
200OKWebhook created successfully.None

Response Schema

Info

This operation does not require authentication

get__webhook_{webhook_id}

Code samples

GET /webhook/{webhook_id}

Retrieve the information for the webhook, identified by the webhook_id.

Parameters

NameInTypeRequiredDescription
webhook_idpathstringtruenone
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

200 Response
{
  "id": 0,
  "name": "string",
  "url": "string",
  "enabled": true,
  "method": "string",
  "http_headers": [
    {
      "http_header_id": 0,
      "http_header_key": "string",
      "http_header_value": "string"
    }
  ],
  "payload_template": "string",
  "low_alert": true,
  "med_alert": true,
  "high_alert": true,
  "cleared_alert": true
}

Responses

StatusMeaningDescriptionSchema
200OKStatus 200Webhook
Info

This operation does not require authentication

put__webhook_{webhook_id}

Code samples

PUT /webhook/{webhook_id}

Update the webhook information

Body parameter

{
  "id": 0,
  "name": "string",
  "url": "string",
  "enabled": true,
  "method": "string",
  "http_headers": {
    "added": [
      {
        "http_header_key": "string",
        "http_header_value": "string"
      }
    ],
    "changed": [
      {
        "http_header_id": 0,
        "http_header_key": "string",
        "http_header_value": "string"
      }
    ],
    "deleted": [
      {
        "http_header_id": 0
      }
    ]
  },
  "payload_template": "string",
  "low_alert": true,
  "med_alert": true,
  "high_alert": true,
  "cleared_alert": true
}

Parameters

NameInTypeRequiredDescription
webhook_idpathstringtruenone
X-Auth-TokenheaderstringtrueToken of authorization
bodybodyWebhookPutDatatruenone

Example responses

Responses

StatusMeaningDescriptionSchema
200OKWebhook updated successfully.None

Response Schema

Info

This operation does not require authentication

delete__webhook_{webhook_id}

Code samples

DELETE /webhook/{webhook_id}

Delete the webhook.

Parameters

NameInTypeRequiredDescription
webhook_idpathstringtruenone
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

Responses

StatusMeaningDescriptionSchema
200OKWebhook deleted successfully.None

Response Schema

Info

This operation does not require authentication