Managing alarms by using REST API
Before you begin
To create and update alarms, you must have the required roles and permissions. For more information, see Roles-and-permissions.
To create a primary alarm by using REST API
To create a primary alarm
cURL example
Before you begin
Make sure that you have a valid authentication token. For more information, see Access-and-authentication-for-REST-API.
To create a primary alarm by using the REST API in the Postman client
- Open the Postman REST client.
- Set the request URL as:
https://<Innovation Suite server URL>/api/rx/application/record/recordinstance - Select POST as the operation.
- Select raw.
- From the list, select JSON.
Enter the JSON input for creating a primary alarm.
For example:{
"resourceType": "com.bmc.arsys.rx.services.record.domain.RecordInstance",
"recordDefinitionName": "com.bmc.dsm.netops-extensions:AM-Alarm",
"fieldInstances": {
"880004125": {
"resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004125,
"value":"1LLZ6BS" // Alarmed object
},
"880004101": {
"resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004101,
"value": "new Alarm" // Alarm Details
},
"880004106": {
"resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004106,
"value": 10 // Alarm Type
},
"880004114": {
"resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004114,
"value": "failure" // Probable Cause
},
"880004111": {
"resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004111,
"value": 20 // Perceived Severity
},
"880004118":{
"resourceType":"com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004118,
"value":"Netcool" // Source System ID
},
"880004120" : {
"resourceType":"com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004120,
"value":"Ack" // State
},
"880004132" : {
"resourceType":"com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004132,
"value":"2023-07-04T09:48:48Z" // Alarm Raised Time
}
}
}- Click Send.
When an incident or a primary alarm is created by using REST API, the payload provides the time when the alarm is first triggered as Alarm First Occurrence. If the payload does not provide this value, the system uses the current timestamp as the alarm time. This timestamp captures the event start time more accurately than the payload.
To create a secondary alarm by using REST API
To create a secondary alarm
cURL example
Before you begin
Make sure that you have a valid authentication token. For more information, see Access-and-authentication-for-REST-API.
To create a secondary alarm by using the REST API in the Postman client
- Open the Postman REST client.
- Set the request URL as:
https://<Innovation Suite server URL>/api/rx/application/record/recordinstance - Select POST as the operation.
- Select raw.
- From the list, select JSON.
Enter the JSON input for creating an alarm.
For example:{
"resourceType": "com.bmc.arsys.rx.services.record.domain.RecordInstance",
"recordDefinitionName": "com.bmc.dsm.netops-extensions:AM-Alarm",
"fieldInstances": {
"880004125": {
"resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004125,
"value": "254294101057672" // Alarmed Object
},
"880004101": {
"resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004101,
"value": "These are the alarm details" // Alarm Details
},
"880004106": {
"resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004106,
"value": 10 // Alarm Type
},
"880004114": {
"resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004114,
"value": "Cause" // Probable Cause
},
"880004111": {
"resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004111,
"value": 20 // Perceived Severity
},
"880004118":{
"resourceType":"com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004118,
"value":"Netcool" // Source System ID
},
"880004120" : {
"resourceType":"com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004120,
"value":"Ack" // State
},
"880004104": {
"resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004104,
"value": 1688464128 // Alarm Raised Time
},
"880004126" : {
"resourceType":"com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004126,
"value":"AGGG1P27J624TASIRBUNSIRBUNWOBN" // Linked Request ID
},
"880004132" : {
"resourceType":"com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004132,
"value":"2023-07-04T09:48:48Z" // Alarm Raised Time
}
}
}- Click Send.
When an incident or a secondary alarm is created by using REST API, the payload provides the time when the alarm is first triggered as Alarm First Occurrence. If the payload does not provide this value, the system uses the current timestamp as the alarm time. This timestamp captures the event start time more accurately than the payload.
To update an alarm by using REST API
To update an alarm
cURL example
Before you begin
Make sure that you have a valid authentication token. For more information, see Access-and-authentication-for-REST-API.
To update an alarm by using the REST API in the Postman client
- Open the Postman REST client.
- Set the request URL as:
https://<Innovation Suite server URL>/api/rx/application/record/recordinstance/com.bmc.dsm.netops-extensions%3AAM-Alarm/<Alarm ID> - Select PUT as the operation.
- Select raw.
- From the list, select JSON.
Enter the JSON input for creating an alarm.
For example:{
"id": "AGGG1P27J624TASIRBUNSIRBUNWOA9", //Alarm ID
"resourceType": "com.bmc.arsys.rx.services.record.domain.RecordInstance",
"recordDefinitionName": "com.bmc.dsm.netops-extensions:AM-Alarm",
"fieldInstances": {
"880004125": {
"resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004125,
"value": "1LLZ6BS", // Alarmed Object
},
"880004111": {
"resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004111,
"value": 60 // Perceived Severity
},
"880004131": {
"resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004131,
"value": "2024-01-04T09:49:48Z" // Alarm Cleared Time
},
"880004108": {
"resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004108,
"value": "Test" // System ID
},
"880004109": {
"resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004109,
"value": "Test" // User ID
}
}
}- Click Send.
When an incident or a secondary alarm is created by using REST API, the payload provides the time when the alarm is first triggered as Alarm First Occurrence. If the payload does not provide this value, the system uses the current timestamp as the alarm time. This timestamp captures the event start time more accurately than the payload.
To clear alarms by changing the severity by using REST API
Incident Management defines the default alarm severity for each alarm, which is aligned with the TMF642 standard and the Alarm Resource specification.
After an alarm is triggered, it is defined within six severity levels. These severity levels represent service-affecting conditions ordered from the most severe to the least:
Severity | Description |
---|---|
Critical | Indicates that a service outage has occurred and that immediate corrective action is required. |
Major | Indicates that a service affecting a condition has developed and an urgent corrective action is required. |
Minor | Indicates the existence of a non service affecting fault condition and that a corrective action should be taken in order to prevent a more serious fault. |
Warning | Indicates the detection of a potential or impending service affecting fault condition before any significant effects have occurred. |
Intermediate | Indicates that the severity level cannot be determined. |
Cleared | Indicates that alarms are resolved and the device has returned to normal operation. |
To update the alarm severity by using REST API
You can add a new alarm to an existing incident, or a current alarm can be updated.
Before you begin
Make sure that you have a valid authentication token. For more information, see Access-and-authentication-for-REST-API.
To update the alarm severity in the Postman client
- Open the Postman REST client.
- Set the request URL as:
https://<Innovation Suite server URL>/api/rx/application/record/recordinstance/com.bmc.dsm.netops-extensions%3AAM-Alarm/<Alarm ID> - Select as PUT in the operation.
- Select raw.
- From the list, select JSON.
Enter the JSON input.
For example, update the following details in the payload to change the severity from Minor to Major:Fields
Values needed to change the severity
Description
Referredtype
alarm
Denotes the targeted entity.
Id
xyz
Indicates the incident ID that is being updated.
Severity
major
Indicates the Severity value that is being updated.
Request body to update the severity{
"id": "AGGG1P27J624TASIRBUNSIRBUNWOA9", //Alarm ID
"resourceType": "com.bmc.arsys.rx.services.record.domain.RecordInstance",
"recordDefinitionName": "com.bmc.dsm.netops-extensions:AM-Alarm",
"fieldInstances": {
"880004125": {
"resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004125,
"value": "1LLZ6BS", // Alarmed Object
},
"880004111": {
"resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004111,
"value": 60 // Perceived Severity
},
"880004131": {
"resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004131,
"value": "2024-01-04T09:49:48Z" // Alarm Cleared Time
},
"880004108": {
"resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004108,
"value": "Test" // System ID
},
"880004109": {
"resourceType": "com.bmc.arsys.rx.services.record.domain.FieldInstance",
"id": 880004109,
"value": "Test" // User ID
}
}
}Click Send.
After the alarm is added to the incident, the severity value can be updated manually or by using the API. For more information about changing the alarm severity by using UI, see Managing-incident-requests.When you change the alarm severity value in the response body to Cleared and if the work orders and impact records associated with the incident are resolved, the status of the incident automatically changes to Resolved.
If the alarm severity is updated to any other value by using REST API, the status of the incident automatically changes to In Progress, unless the incident is in Resolved status.