Methods
listConditionAttributes
List the supported conditions attributes and operations.
GET /spec/incidentPolicies/v1/conditionAttributes
Response
A supported attribute.
Possible values: length ≥ 1
A supported attribute. Same value as attribute, but UI server keys on this property name.
Possible values: length ≥ 1
The operations supported against this attribute
Possible values: length ≥ 1
No value indicates a simple evaluation expression. Value 'conditions' indicates a combiner operation for an array of conditions.
Status Code
Successful request
Invalid request
Unauthorized
Not authorized
No Sample Response
listPolicies
List the summary information for all policies within a subscription
GET /incidentPolicies/v1
Request
Custom Headers
Allowable values: [
application/json
,text/plain
]
Query Parameters
Includes detail information with each policy
Possible values: allows empty value
Default:
false
Response
Name of the incident policy. Must be unique.
Possible values: length ≥ 1
True if this incident policy is enabled and thus eligible to be matched to incidents
Name of the user who created the policy
Possible values: length ≥ 1
The time when this policy was created in a RFC 3339 format timestamp
The time when this policy was created in a RFC 3339 format timestamp. Set to created time if this policy has never been updated
The name of the user who last modified this policy. Set to creator if this policy has never been updated
Possible values: length ≥ 1
Unique reference for this policy
Possible values: length ≥ 1
Description of the incident policy
Possible values: length ≥ 0
actions associated with the policy
The time when this policy was last run in a RFC 3339 format timestamp. This parameter is omitted if the policy has never been run
Status Code
Successful request
Invalid request
Unauthorized
Not authorized
[ { "enabled": false, "name": "Assign", "id": "51b9b8547de137073f5d3276b484de89", "author": "johndoe@xx.ibm.com", "created": "2017-05-24T20:08:37.068Z", "lastUpdated": "2017-06-07T15:05:25.843Z", "lastUpdatedBy": "johndoe@xx.ibm.com", "executionOrder": 0, "description": "Assign only", "actions": { "assignNotify": { "enabled": true, "assign": { "enabled": true }, "notify": { "enabled": false } }, "prioritize": { "enabled": false } }, "lastRun": "2017-05-30T19:53:06.246Z" }, { "enabled": true, "name": "AssignAndNotify", "id": "328d6adbf7e0b706de6a794ccb4375fe", "author": "johndoe@xx.ibm.com", "created": "2017-06-07T18:03:07.429Z", "lastUpdated": "2017-06-07T18:03:07.429Z", "lastUpdatedBy": "johndoe@xx.ibm.com", "executionOrder": 2, "description": "Assign the incident and notify assignee", "actions": { "assignNotify": { "enabled": true, "assign": { "enabled": true }, "notify": { "enabled": false } }, "prioritize": { "enabled": false } } } ]
Request
Custom Headers
Allowable values: [
application/json
,text/plain
]
Incident policy payload
Unique name of the incident policy. Note this is required when creating a policy (POST) but not on an update (PUT).
Possible values: length ≥ 1
True if this incident policy is enabled and will be considered when processing incidents
Default:
false
If this is set to true, the policy applies to all incidents and any custom conditions are ignored. Either applyAll or conditions must be specified
Default:
false
Description of the incident policy
Possible values: length ≥ 0
Default:
Sample policy description
The condition tree to apply to the incidents and/or incident events. Either condition or applyAll must be specified
Action taken when the policy is triggered
Name of the user who created the policy. Stores a value based off API key if not specified.
Possible values: length ≥ 0
Default:
Response
True if this incident policy is enabled and will be considered when processing incidents
If this is set to true, the policy applies to all incidents and any custom conditions are ignored. Either applyAll or conditions must be specified
Name of the incident policy
Possible values: length ≥ 1
Description of the incident policy
Possible values: length ≥ 0
Action taken when the policy is triggered
Name of the user who created the policy
Possible values: length ≥ 1
The time when this policy was created in a RFC 3339 format timestamp
The time when this policy was created in a RFC 3339 format timestamp. Set to created time if this policy has never been updated
The name of the user who last modified this policy. Set to creator if this policy has never been updated
Possible values: length ≥ 1
ID that uniquely references the policy
Possible values: length ≥ 1
The condition tree used by the policy to match the incidents and/or incident events.
The time when this policy was last run in a RFC 3339 format timestamp. This parameter is omitted if the policy has never been run
The execution order assigned to this policy
Status Code
Policy successfully created
Invalid request
Unauthorized
Not authorized
Already exists
Internal error
No Sample Response
updatePolicy
Replace the policy with the policy payload provided. Note the condition tree is replaced by the received condition tree. Conditions are not merged.
PUT /incidentPolicies/v1/{id}
Request
Custom Headers
Allowable values: [
application/json
,text/plain
]
Path Parameters
Policy reference ID. This is returned by the list policies GET and uniquely identifies the policy.
Incident policy payload
True if this incident policy is enabled and will be considered when processing incidents
If this is set to true, the policy applies to all incidents and any custom conditions are ignored. Either applyAll or condition must be specified
Unique name of the incident policy. Note this is required when creating a policy (POST) but not on an update (PUT).
Possible values: length ≥ 1
Description of the incident policy
Possible values: length ≥ 0
The condition tree to apply to the incidents and/or incident events. Either condition or applyAll must be specified
Action taken when the policy is triggered
Name of the user who created the policy. Stores a value based off API key if not specified.
Possible values: length ≥ 0
Response
True if this incident policy is enabled and will be considered when processing incidents
If this is set to true, the policy applies to all incidents and any custom conditions are ignored. Either applyAll or conditions must be specified
Name of the incident policy
Possible values: length ≥ 1
Description of the incident policy
Possible values: length ≥ 0
Action taken when the policy is triggered
Name of the user who created the policy
Possible values: length ≥ 1
The time when this policy was created in a RFC 3339 format timestamp
The time when this policy was created in a RFC 3339 format timestamp. Set to created time if this policy has never been updated
The name of the user who last modified this policy. Set to creator if this policy has never been updated
Possible values: length ≥ 1
ID that uniquely references the policy
Possible values: length ≥ 1
The condition tree used by the policy to match the incidents and/or incident events.
The time when this policy was last run in a RFC 3339 format timestamp. This parameter is omitted if the policy has never been run
The execution order assigned to this policy
Status Code
Successful request
Policy was not updated
Unauthorized
Not authorized
Unable to locate policy
Cannot rename to the name of a policy that already exists
Internal error
No Sample Response
Request
Custom Headers
Allowable values: [
application/json
,text/plain
]
Path Parameters
Policy reference ID. This is returned by the list policies GET and uniquely identifies the policy.
Response
True if this incident policy is enabled and will be considered when processing incidents
If this is set to true, the policy applies to all incidents and any custom conditions are ignored. Either applyAll or conditions must be specified
Name of the incident policy
Possible values: length ≥ 1
Description of the incident policy
Possible values: length ≥ 0
Action taken when the policy is triggered
Name of the user who created the policy
Possible values: length ≥ 1
The time when this policy was created in a RFC 3339 format timestamp
The time when this policy was created in a RFC 3339 format timestamp. Set to created time if this policy has never been updated
The name of the user who last modified this policy. Set to creator if this policy has never been updated
Possible values: length ≥ 1
ID that uniquely references the policy
Possible values: length ≥ 1
The condition tree used by the policy to match the incidents and/or incident events.
The time when this policy was last run in a RFC 3339 format timestamp. This parameter is omitted if the policy has never been run
The execution order assigned to this policy
Status Code
Successful request
Unauthorized
Not authorized
Unable to locate policy
Internal error
{ "enabled": true, "applyAll": false, "description": "Assign the incident and notify assignee", "name": "AssignAndNotify", "id": "328d6adbf7e0b706de6a794ccb4375fe", "author": "johndoe@xx.ibm.com", "created": "2017-06-07T18:03:07.429Z", "lastUpdated": "2017-06-07T18:03:07.429Z", "lastUpdatedBy": "johndoe@xx.ibm.com", "executionOrder": 2, "condition": { "id": "5e63c3fb352bbd9c47bf96c84f30d6a9", "attribute": "_policy", "operator": "and", "value": [ { "id": "d3c3e2566c4d1251c0db1bf37062e4ec", "attribute": "_incidents", "operator": "and", "value": [ { "id": "672c674cc707f62a9ce937c2bc65f094", "attribute": "incident.priority", "operator": ">=", "value": "1" } ] }, { "id": "a12019a06c70d40630c5c0e8623ba2d5", "attribute": "_events", "operator": "and", "value": [ { "attribute": "_singleevent", "operator": "and", "value": [ { "attribute": "event.summary", "operator": "contains", "value": "database", "id": "98ede832fda2d829d10ebfff7a0a3543" } ], "id": "3d3d9171d06d241af2ef443fd9d03171" }, { "attribute": "_singleevent", "operator": "and", "value": [ { "attribute": "event.severity", "operator": ">", "value": "minor", "id": "b484d6a02efbae8a60c55ce14ea868f1" } ], "id": "eb06db30575f9a14799786cd91c28e30" } ] } ] }, "actions": { "assignNotify": { "enabled": true, "assign": { "team": "devops", "owner": "johndoe@xx.ibm.com" }, "notify": { "users": [ "johndoe@xx.ibm.com" ], "groups": [], "integrations": [], "escalations": [ { "waitFor": 20, "timeUnits": "minutes", "users": [], "groups": [ "postops" ], "integrations": [] } ] } }, "prioritize": { "enabled": false, "priority": 5 } } }
UpdatePolicyOrder
Sets the new order on a list of incident policies in a subscription
PUT /incidentPolicies/v1/executionOrder
bulkUpdatePolicyOrder
Sets the new order on a list of incident policies in a subscription
PUT /incidentPolicyBulk/v1/bulkupdateorder