Incidents (REST)

The AppMon Server offers several RESTful interfaces to manage incidents. See Incidents Overview dashlet for more information about incidents.

You must have at least the permission Analyze Incident for each of these RESTful interfaces. To modify an incident, you must have the permission Manage Incident. See User Permissions and Authentication.

For security reasons, the calls for RESTful interfaces to create and update incidents are limited. By default, 60 calls per minute are allowed. To modify the limit, use the flag com.dynatrace.diagnostics.rest.incidentCreationLimit.

XML data description

Describes the XML representation of an incident and lists XML elements with multiple values.

Incident example
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<incident id="7825229f-039d-4761-95e1-01cb79d98a81">
  <message>Test Message</message>
  <description>Test Description</description>
  <severity>warning</severity>
  <state>Created</state>
  <start>2013-12-18T04:31:12.772+01:00</start>
  <end>2013-12-19T04:30:00.000+01:00</end>
</incident>
Element Values Description
severity informational | warning | severe The severity of the incident.
state Created | InProgress | Confirmed The state of the incident.
start, end ISO 8601 compatible date/time of format "yyyy-MM-dd'T'HH:mm:ss.SSSXXX" Start and end of the incident.

Get Incident

Get the XML representation of an incident.

GET https://<server>:8021/rest/management/profiles/<profilename>/incidentrules/<incidentruleid>/incidents/<id> produces application/xml

Get all incidents

Get a list of all incidents for the specified System Profile and incident rule.

GET https://<server>:8021/rest/management/profiles/<profilename>/incidentrules/<incidentruleid>/incidents/<id> Produces application/xml

Create incident

Create an incident for a System Profile and incident rule. The request must contain the incident as XML representation. If the request does not contain a start and end date, the creation date is used. The default severity is informational and the default state is created. See XML Data Description) for more information.

Note

Incidents with a severity of informational are automatically set to state Confirmed. You can update such incidents to other states with a followup Update Incident REST call if necessary.

The response contains a reference to the created incident in the HTTP Location Header unless the operation was not successful. See Get Incident for more information.

POST https://<server>:8021/rest/management/profiles/<profilename>/incidentrules/<incidentruleid>/incidents/ consumes application/xml

Update incident

Several attributes of an incident can be modified by updating it. For instance, to confirm an incident, you can request the incident using the GET interface, change the state to Confirmed, and send the XML representation back to this interface. See XML Data Description for details about the XML representation.

PUT https://<server>:8021/rest/management/profiles/<profilename>/incidentrules/<incidentruleid>/incidents/<id> consumes application/xml
POST https://<server>:8021/rest/management/profiles/<profilename>/incidentrules/<incidentruleid>/incidents/?httpMethod=PUT Consumes application/xml

Delete incident permanently

DELETE https://<server>:8021/rest/management/profiles/<profilename>/incidentrules/<incidentruleid>/incidents/<id>
POST https://<server>:8021/rest/management/profiles/<profilename>/incidentrules/<incidentruleid>/incidents/<id>?httpMethod=DELETE