Document toolboxDocument toolbox

HTTP-JSON delivery methods

[ 1 Details ] [ 2 Activation ]

Details

HTTP-JSON type delivery methods send alerts to any server configured to receive JSON objects. These JSON objects are sent using the POST request method over HTTP or HTTPS to the server where you intend to receive alerts.

Server configuration

For a successful validation and use, you must configure the destination server to accept petitions from the corresponding Devo domain and return a 200 to 300 status code. If it uses Digest access authentication, you can identify the user and password required for authentication.

There are two different types of requests made by Devo to send JSON objects:

  • One type contains the encapsulated alert and its extraData.

    • The extraData is included as a string with the fields encoded using urlEncoding. Even though the extraData compiles info only from certain fields (more info here), all of them are included, showing empty values for those not compiled (legacy feature).

    • A URL to the alert in the Devo platform is included for easy access to its details.

  • The other type is used for the validation process.

POST / HTTP/1.1 content-type: application/x-www-form-urlencoded Content-Length: 1713 Host: ---REDACTED--- User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_265) Accept-Encoding: gzip,deflate X-Forwarded-For: 52.86.47.45 json={"id":"12186158","domain":"dsteam","priority":"3.0","context":"my.alert.dsteam.URLTest","srcIp":"","dstIp":"","srcPort":"","dstPort":"","category":"my.context","protocol":"","username":"user@devo.com","application":"","status":"0","creation_date":"Fri Oct 09 14:03:42 UTC 2020","ack_status_date":null,"digest":"aa37132f054c4d8d9dec06f44c9deda31bae5c33","scaled":"false","srcHost":"","dstHost":"","extraData":"{\"referer\":\"null\",\"country\":\"US\",\"city\":\"Waltham\",\"responseLength\":\"null\",\"isp\":\"Verizon+Fios\",\"errorInfo\":\"error\",\"sessionid\":\"NzgzZS3hFdtk6feKZ5FzqpaoRPcI%2FDCembLHLyFDkfM%3D%24d6%2FX5pWDT6W%2BRBoU0nrMOzBBVrDRhYX5%2FNse9IpMV9s%3D\",\"srcPort\":\"37720\",\"serverPort\":\"8080\",\"type\":\"response\",\"locale\":\"en-US\",\"userid\":\"e3e314a1-84a2-4e4a-a2f8-a5db5c9ef975\",\"resourceInfo\":\"null\",\"result\":\"Not+Found\",\"correlationId\":\"15b64b62d0e2\",\"headers\":\"x-devo-cid\",\"method\":\"GET\",\"level\":\"INFO\",\"org\":\"Verizon+Fios\",\"srcHost\":\"108.26.173.220\",\"responseTime\":\"0\",\"userAgent\":\"Mozilla%2F5.0+%28Macintosh%3B+Intel+Mac+OS+X+10_14_0%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F85.0.4183.102+Safari%2F537.36\",\"params\":\"null\",\"eventdate\":\"2020-10-09+14%3A03%3A37.152\",\"serverHost\":\"us.devo.com\",\"url\":\"https%3A%2F%2Fus.devo.com%2Fwelcome%testingurl\",\"domain\":\"dsteam\",\"contentLength\":\"null\",\"region\":\"MA\",\"username\":\"jacob.bower%40devo.com\"}","engine":"pil01-pro-custom-us-aws","textMessage":"{"fired": https://us.devo.com/welcome/testingurl}","shortMessage":"Jacob Test Alert","alertname":"URLTest","categoryname":"My Alerts","subcategoryname":"JBTest Subcategory"}
{ "code": "<validationCode>", "domain": "<domain>" }

 

You can find below the information required on the New Delivery Method window for this delivery method (for the creation process visit Manage delivery methods).

Name

A unique name that identifies this specific delivery method. 

Timezone

This is the time zone that will be used to calculate when alerts can be sent. This will be applied to the schedule defined in any sending policy that uses this delivery method.

URL

The URL of the server to which the alerts should be sent.

Language

The language in which to send the alert content.

Content-Type

Content-Type is an HTTP header that is used to indicate the media type of the resource. Choose the required header:

  • application/JSON - This is the default option.

  • application/x-www-form-urlencoded (legacy) - This is the old header used for requests.

Choose the desired authentication method

Choose one of the available authentication options:

  • None - Choose this option if you don't need any authentication method. This is the default option.

  • Authenticate with the server - Simple user-password authentication. 

  • Bearer token authentication - Use a bearer token to authenticate your user. Enter it in the field that appears when selecting this option.

Add headers

You may add specific headers to the JSON objects using this delivery method.

To do it, check the Add headers box at the bottom of the window. Enter the required header names and values and click the Add button to include them in the delivery method. The list will all the headers added will appear below.

Note that Content-Type, Content-Length, Accept, Authorization and Host are reserved headers and cannot be used as names.

Activation

The new delivery method is saved in Pending status.

To activate it, you will need to introduce in Devo the HTTP validation code that you will receive through the URL specified. This activation code must be validated on the server side before the delivery method can be used.

Server configuration

The server where you intend to receive the alerts must have been properly configured to accept petitions from the corresponding Devo domain and return a 200 to 300 status code. Otherwise, the activation process will fail and the delivery method will not be validated.

Copy the code and then return to the newly created delivery method in Devo. Click pending activation under the status column, paste the validation code into the Activation Code window and click Apply.

You can now associate this new delivery method with sending policies to start receiving alerts through this method.

 

Related articles: