Hi,
I’m new to PagerDuty.
I’m trying to send (trigger) an event via Events API V2 using JavaScript layer from another application (Ivanti).
I keep getting status code 400 error
(Bad request) with {“errors”:r"‘payload’ is missing or blank"],“message”:“Event object is invalid”,“status”:“invalid event”}
I don’t know what is wrong. I tried changing the payload in several ways to no avail.
Details of the call:
(…)
var JSONimport = {Payload: {summary: “Test event”, source: “Ivanti”, severity: “critical”}, routing_key: “routing_key_here”, event_action: “trigger”};
var data = JSON.stringify(JSONimport);
var request = ExecuteWebRequest(‘POST’, ‘https://events.eu.pagerduty.com/v2/enqueue’, data, {Headers: {“Content-Type”:“application/json”, “Authorization”:“Token token=<api_token_here>”}, SkipServerCertificateValidation: false});
_Note: ExecuteWebRequest is just a ready javascript method in Ivanti Web Services layer.]
Thanks for any suggestion.
Cheers,
Rinaldo