See the list of vendors
by eurica
HTML
<script src="http://eurica.github.io/pdjs/js/pdjs.js"></script>
<div id="output">Loading...</div>
JavaScript
// As always configure PDJS with your subdomain and api-key
PDJS = new PDJSobj({
subdomain: "webdemo",
token: "ajHxLYmpRDCNzFZjstDS",
})
PDJS.api({
res: "reports/metrics",
type: "POST",
data: {
"since": "2015-08-02T07:00:01.000Z",
"until": "2015-08-17T07:00:00.000Z",
"metrics":
["incident:count",
"incident.seconds_to_first_ack:avg",
"incident.seconds_to_first_ack:median",
"incident.seconds_to_first_ack:90percentile",
"incident.seconds_to_resolve:avg",
"incident.seconds_to_resolve:median",
"incident.seconds_to_resolve:90percentile"
],
"group_by": ["escalation_policy", "weekly"],
"filters": {
"escalation_policy_ids": ["PEEJXL1", "P7CUYED", "PND71Y2", "P1NPVTA", "P0ANEDE"]
}
},
success: function (json) {
$("#output").html("<pre>" + JSON.stringify(json, null, 2) + "</pre>")
console.log(json)
},
})