Summary:
Modify the state, annotation and attributes of an incident.
URL:
http(s)://{server hostname}/api/incidents/{incidentId}
Methods summary
- PUT Method - modify incident state, annotation, attributes.
PUT Method detail
Modify incident state, annotation and attributes.
Request:
All the fields in an incident request are optional so each can be updated independently.
Name | Description |
---|---|
state |
change state. Valid states are “open”, “closed” and “expired”. Note: It is not possible to change the state of an incident if it has already expired. |
annotation | change the annotation for an incident. |
attribute |
update an attribute for an incident. A key and value must be provided (see examples below). Note: The attribute must have already been defined in the active event project. |
Response:
Name | Description |
---|---|
message |
confirmation message. |
Examples:
INPUT
curl -X PUT -u admin:admin https://localhost/api/incidents/69?media=json -H "content-type:application/json" -d \
'{ "state" : "open",
"annotation" : "New annotation",
"attribute" : {"key" : "attribKey", "value": "New value" }
}'
OUTPUT
{
"message" : "Incident opened, Attribute 'attribKey' updated"
}
INPUT
curl -X PUT -u admin:admin https://localhost/api/incidents/69?media=xml -H "content-type:application/xml" -d \
'<incidentInfo>
<state>open</state>
<annotation>New annotation</annotation>
<attribute key="attrib1" value="New value”></attribute>
</incidentInfo>'
OUTPUT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<statusInfo>
<message>Incident opened, Attribute 'attribKey' updated</message>
</statusInfo>
Comments
0 comments
Please sign in to leave a comment.