REST interface for BPD-related resources - Alert Definitions Status Resource - GET Method

Use this method to retrieve a list of alert definition status.

Sample method invocation

GET /rest/bpm/wle/v1/system/alertDefinitions/status[?ids={string}]

Parameters

Optional parameters
NameValue TypeDescription
ids string
A comma-separated list of alert definition identifiers for which to retrieve the status.

Request content

None

Response content

A response about the alert definition status (AlertDefinitionStatusResponse complexType), which contains the status of the checked alert definitions (AlertDefinitionStatus complexType) and potentially failed operations (FailedOperation complexType).

The default content type is application/json.

MIME type: application/json


+ View schema
{
   "description":"Alert Definition Status Response",
   "type":"object",
   "properties":{
      "alertDefinitionStatus":{
         "type":"array",
         "properties":{
            "definition":{
               "type":"object",
               "properties":{
                  "id":{
                     "type":"string",
                     "description":"The ID of the alert definition. This field is optional. When not set, a new alert definition is created upon save.",
                     "required":false
                  },
                  "displayName":{
                     "type":"string",
                     "description":"The display name of the alert definition. This field is mandatory.",
                     "required":true
                  },
                  "category":{
                     "type":"string",
                     "description":"The category of the alert definition. Valid values are: INSTANCE and TASK. This field is mandatory.",
                     "enum":[
                        "INSTANCE",
                        "TASK"
                     ],
                     "required":true
                  },
                  "projectId":{
                     "type":"string",
                     "description":"The selected process application ID in the alert definition in external string format (for example 2066.9ab0d0c6-d92c-4355-9ed5-d8a05acdc4b0). This field is optional. It will be set automatically when the properties 'snapshotId' or 'bpdId' are set. If a project is not specified, all projects are included in the alert definition by default.",
                     "required":false
                  },
                  "snapshotId":{
                     "type":"string",
                     "description":"The selected snapshot ID in the alert definition in external string format (for example 2064.aaa569e9-a57a-4684-b357-34237e4e49ea). This field is optional. The snapshot specified with this property must be related to the project optionally specified with property 'projectId'. If a snapshot is not specified, all snapshots are included by default.",
                     "required":false
                  },
                  "bpdId":{
                     "type":"string",
                     "description":"The selected business process definition ID in the alert definition in external string format (for example 25.c904b3b1-afc1-4698-bf5a-a20892c20275). This field is optional unless the property 'bpdDisplayName' is set. The business process definition specified with this property must be related to the project optionally specified in the 'projectId' property and the snapshot optionally specified with the 'snapshotId' property. If a business process definition is not specified, all business process definitions are included by default.",
                     "required":false
                  },
                  "bpdDisplayName":{
                     "type":"string",
                     "description":"The display name of the selected business process definition in the alert definition. This field is optional and has no impact on the alert definition evaluation. This property and the 'bpdId' property must be from the same business process definition. It is set automatically when the 'bpdId' property is set.",
                     "required":false
                  },
                  "instanceStatus":{
                     "type":"string",
                     "description":"The selected instance execution status in the alert definition. Valid values are ACTIVE, COMPLETED, FAILED, TERMINATED, and SUSPENDED. This field is optional. If not set, the alert definition targets all instance execution states.",
                     "enum":[
                        "ACTIVE",
                        "COMPLETED",
                        "FAILED",
                        "TERMINATED",
                        "SUSPENDED"
                     ],
                     "required":false
                  },
                  "taskStatus":{
                     "type":"string",
                     "description":"The selected task execution status in the alert definition. Valid values are NEW, RECEIVED, and CLOSED. This field is optional. If not set, the alert definition targets all three task execution states. This field is only applicable for alert definitions of type TASK.",
                     "enum":[
                        "NEW",
                        "RECEIVED",
                        "CLOSED"
                     ],
                     "required":false
                  },
                  "thresholdOperator":{
                     "type":"string",
                     "description":"The threshold operator in the alert definition. Valid values are GREATER, EQUAL, and LESS. This field is mandatory. ",
                     "enum":[
                        "GREATER",
                        "EQUAL",
                        "LESS"
                     ],
                     "required":true
                  },
                  "thresholdValue":{
                     "type":"string",
                     "description":"The threshold value in the alert definition. Valid values must be numeric and greater or equal to zero. This field is mandatory.",
                     "required":true
                  }
               }
            },
            "actualValue":{
               "type":"string",
               "description":"The actual value at run time for the threshold value set in the alert definition.",
               "required":true
            },
            "conditionMet":{
               "type":"boolean",
               "description":"Whether the condition of the alert definition has been met.",
               "required":true
            }
         }
      },
      "failedOperations":{
         "type":"array",
         "properties":{
            "objectId":{
               "type":"string",
               "description":"The ID of the object for which the operation failed."
            },
            "errorNumber":{
               "type":"string",
               "description":"The message ID of the exception."
            },
            "errorMessage":{
               "type":"string",
               "description":"The message text of the exception."
            }
         }
      }
   }
}
+ View example content
{
   "status": "200",
   "data":
   {
       "failedOperations":
       [
           {
               "objectId": "2040.1005",
               "errorNumber": "CWTBG0012E",
               "errorMessage": "CWTBG0012E: The parameter 'ids' is invalid. Alert definition with ID '2040.1005' could not be found."
           }
       ],
       "alertDefinitionStatus":
       [
           {
               "definition":
               {
                   "id": "2040.1006",
                   "displayName": "Active Instances",
                   "category": "INSTANCE",
                   "instanceStatus": "ACTIVE",
                   "thresholdOperator": "GREATER",
                   "thresholdValue": "100"
               },
               "actualValue": "10",
               "conditionMet": false
           },
           {
               "definition":
               {
                   "id": "2040.1007",
                   "displayName": "Completed instances in project",
                   "category": "INSTANCE",
                   "projectId": "2066.9ab0d0c6-d92c-4355-9ed5-d8a05acdc4b0",
                   "instanceStatus": "COMPLETED",
                   "thresholdOperator": "LESS",
                   "thresholdValue": "100"
               },
               "actualValue": "5",
               "conditionMet": true
           },
           {
               "definition":
               {
                   "id": "2040.1008",
                   "displayName": "Overall Tasks",
                   "category": "TASK",
                   "thresholdOperator": "EQUAL",
                   "thresholdValue": "10"
               },
               "actualValue": "10",
               "conditionMet": true
           },
           {
               "definition":
               {
                   "id": "2040.1009",
                   "displayName": "Closed tasks in active instances of bpd in snapshot and project",
                   "category": "TASK",
                   "projectId": "2066.9ab0d0c6-d92c-4355-9ed5-d8a05acdc4b0",
                   "snapshotId": "2064.d841529d-5d60-4905-9b8e-1361901380bd",
                   "bpdId": "25.c904b3b1-afc1-4698-bf5a-a20892c20275",
                   "bpdDisplayName": "Standard HR Open New Position",
                   "instanceStatus": "ACTIVE",
                   "taskStatus": "CLOSED",
                   "thresholdOperator": "GREATER",
                   "thresholdValue": "100"
               },
               "actualValue": "3",
               "conditionMet": false
           }
       ]
   }
}

MIME type: application/xml


+ View schema
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://rest.bpm.ibm.com/v1/data/alertDefinition"
        elementFormDefault="unqualified" xmlns="http://www.w3.org/2001/XMLSchema"
        xmlns:tns="http://rest.bpm.ibm.com/v1/data/alertDefinition"
        xmlns:pref="http://rest.bpm.ibm.com/v1/data/root"
        xmlns:common="http://rest.bpm.ibm.com/v1/data/common">

    <import schemaLocation="BPMRestData.xsd" namespace="http://rest.bpm.ibm.com/v1/data/root" />
    <import schemaLocation="Common.xsd" namespace="http://rest.bpm.ibm.com/v1/data/common"/>


    <!-- 
     This type represents an alert definition that has been defined to the IBM BPM installation.
    -->
    <complexType name="AlertDefinition">
        <complexContent>
            <extension base="pref:Data"> 
                <sequence>
                    <!-- 
                    The ID of the alert definition.
                    This field is optional.
                    When not set, a new alert definition is created upon save.
                    -->
                    <element name="id" type="string" />
                    <!-- 
                    The display name of the alert definition. 
                    This field is mandatory. 
                    -->
                    <element name="displayName" type="string" />
                    <!-- 
                    The category of the alert definition. 
                    Valid values are INSTANCE and TASK. 
                    This field is mandatory. 
                    -->
                    <element name="category" type="string" />
                    <!-- 
                    The selected process application ID in the alert definition in external string format 
                    (for example 2066.9ab0d0c6-d92c-4355-9ed5-d8a05acdc4b0). This field is optional. 
                    It will be set automatically when the properties 'snapshotId' or 'bpdId' are set. 
                    If a project is not specified, all projects are included in the alert definition by default.
                    -->
                    <element name="projectId" type="string" />
                    <!-- 
                    The selected snapshot ID in the alert definition in external string format 
                    (for example 2064.aaa569e9-a57a-4684-b357-34237e4e49ea). This field is optional. 
                    The snapshot specified with this property must be related to the project optionally specified with property 'projectId'. 
                    If a snapshot is not specified, all snapshots are included by default.
                    -->
                    <element name="snapshotId" type="string" />
                    <!-- 
                    The selected business process definition ID in the alert definition in external string format 
                    (for example 25.c904b3b1-afc1-4698-bf5a-a20892c20275). This field is optional unless the property 'bpdDisplayName' is set. 
                    The business process definition specified with this property must be related to the project optionally specified 
                    in the 'projectId' property and the snapshot optionally specified with the 'snapshotId' property. 
                    If a business process definition is not specified, all business process definitions are included by default.
                    -->
                    <element name="bpdId" type="string" />
                    <!-- 
                    The display name of the selected business process definition in the alert definition. 
                    This field is optional and has no impact on the alert definition evaluation. 
                    This property and the 'bpdId' property must be from the same business process definition. 
                    It is set automatically when the 'bpdId' property is set.
                    -->
                    <element name="bpdDisplayName" type="string" />
                    <!-- 
                    The selected instance execution status in the alert definition. 
                    Valid values are ACTIVE, COMPLETED, FAILED, TERMINATED, and SUSPENDED.
                    This field is optional.
                    If not set, all instance execution states are included in the alert definition by default.
                    -->
                    <element name="instanceStatus" type="string" />
                    <!-- 
                    The selected task execution status in the alert definition. 
                    Valid values are NEW, RECEIVED, and CLOSED.
                    This field is optional.
                    If not set, all three task execution states are included in the alert definition by default.
                    This field is only applicable for alert definitions of type TASK.
                    -->
                    <element name="taskStatus" type="string" />
                    <!-- 
                    The threshold operator in the alert definition.
                    Valid values are GREATER, EQUAL, and LESS.
                    This field is mandatory. 
                    -->
                    <element name="thresholdOperator" type="string" />
                    <!-- 
                    The threshold value in the alert definition.
                    Valid values must be numeric and greater or equal to zero.
                    This field is mandatory.
                    -->
                    <element name="thresholdValue" type="string" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    
    <!-- 
        A list of alert definitions. 
    -->
    <complexType name="AlertDefinitions">
        <complexContent>
            <extension base="pref:Data">
                <sequence>
                    <element name="definitions" type="tns:AlertDefinition" minOccurs="0" maxOccurs="unbounded"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    
    <!-- 
     This type represents an alert definition status that contains information about the runtime status of an alert definition.
    -->
    <complexType name="AlertDefinitionStatus">
        <complexContent>
            <extension base="pref:Data"> 
                <sequence>
                    <!-- The alert definition -->
                    <element name="definition" type="tns:AlertDefinition" />
                    <!-- The actual value at run time for the threshold value set in the alert definition -->
                    <element name="actualValue" type="string" />
                    <!-- Whether the condition of the alert definition has been met -->
                    <element name="conditionMet" type="boolean" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>


    <!--
        This type describes a failed operation during a bulk alert definition-related operation.
    -->
    <complexType name="FailedOperation">
        <sequence>
            <!-- The object ID on which the operation has failed -->
            <element name="objectId" type="string" />

            <!-- The error message prefix associated with the error -->
            <element name="errorNumber" type="string" />

            <!-- The error message associated with the error -->
            <element name="errorMessage" type="string" />
        </sequence>
    </complexType>
    
    
    <!-- 
        A list of failed operations. 
    -->
    <complexType name="FailedOperations">
        <complexContent>
            <extension base="pref:Data">
                <sequence>
                    <element name="failedOperations" type="tns:FailedOperation" minOccurs="0" maxOccurs="unbounded"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    
    
    <!--
         This type is used to return the results from performing a bulk operation on multiple alert definitions.
    -->
    <complexType name="AlertDefinitionStatusResponse">
        <complexContent>
            <extension base="pref:Data">
                <sequence>
                    <!-- A list of zero or more failed operations -->
                    <element name="failedOperations" type="tns:FailedOperation"  minOccurs="0" maxOccurs="unbounded" />

                    <!-- A list of zero or more objects which contain the alert definition status. -->
                    <element name="alertDefinitionStatus" type="tns:AlertDefinitionStatus"  minOccurs="0" maxOccurs="unbounded" />
                </sequence>
            </extension>
        </complexContent>
    </complexType>
    
</schema>
+ View example content
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<bpm:ResponseData xmlns:bpm="http://rest.bpm.ibm.com/v1/data" xmlns:ex="http://rest.bpm.ibm.com/v1/data/exception" xmlns:soc="http://rest.bpm.ibm.com/v1/data/social" xmlns:sys="http://rest.bpm.ibm.com/v1/data/system" xmlns:ug="http://rest.bpm.ibm.com/v1/data/usergroup">
    <status>200</status>
    <data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns8="http://rest.bpm.ibm.com/v1/data/alertDefinition" xsi:type="ns8:AlertDefinitionStatusResponse">
        <failedOperations>
            <objectId>2040.1005</objectId>
            <errorNumber>CWTBG0012E</errorNumber>
            <errorMessage>CWTBG0012E: The parameter 'ids' is invalid. Alert definition with ID '2040.1005' could not be found.</errorMessage>
        </failedOperations>
        <alertDefinitionStatus>
            <definition>
                <id>2040.1006</id>
                <displayName>Active Instances</displayName>
                <category>INSTANCE</category>
                <instanceStatus>ACTIVE</instanceStatus>
                <thresholdOperator>GREATER</thresholdOperator>
                <thresholdValue>100</thresholdValue>
            </definition>
            <actualValue>10</actualValue>
            <conditionMet>false</conditionMet>
        </alertDefinitionStatus>
        <alertDefinitionStatus>
            <definition>
                <id>2040.1007</id>
                <displayName>Completed instances in project</displayName>
                <category>INSTANCE</category>
                <projectId>2066.9ab0d0c6-d92c-4355-9ed5-d8a05acdc4b0</projectId>
                <instanceStatus>COMPLETED</instanceStatus>
                <thresholdOperator>LESS</thresholdOperator>
                <thresholdValue>100</thresholdValue>
            </definition>
            <actualValue>5</actualValue>
            <conditionMet>true</conditionMet>
        </alertDefinitionStatus>
        <alertDefinitionStatus>
            <definition>
                <id>2040.1008</id>
                <displayName>Overall Tasks</displayName>
                <category>TASK</category>
                <thresholdOperator>EQUAL</thresholdOperator>
                <thresholdValue>10</thresholdValue>
            </definition>
            <actualValue>10</actualValue>
            <conditionMet>true</conditionMet>
        </alertDefinitionStatus>
        <alertDefinitionStatus>
            <definition>
                <id>2040.1009</id>
                <displayName>Closed tasks in active instances of bpd in snapshot and project</displayName>
                <category>TASK</category>
                <projectId>2066.9ab0d0c6-d92c-4355-9ed5-d8a05acdc4b0</projectId>
                <snapshotId>2064.d841529d-5d60-4905-9b8e-1361901380bd</snapshotId>
                <bpdId>25.c904b3b1-afc1-4698-bf5a-a20892c20275</bpdId>
                <bpdDisplayName>Standard HR Open New Position</bpdDisplayName>
                <instanceStatus>ACTIVE</instanceStatus>
                <taskStatus>CLOSED</taskStatus>
                <thresholdOperator>GREATER</thresholdOperator>
                <thresholdValue>100</thresholdValue>
            </definition>
            <actualValue>3</actualValue>
            <conditionMet>false</conditionMet>
        </alertDefinitionStatus>
    </data>
</bpm:ResponseData>

MIME type: application/x-javascript

Error Response content

Detailed error information.

The default content type is application/json.

MIME type: application/json


+ View schema
{  "description": "WLE Error Response", 
   "type": "object",
   "properties":
   {  "status": {"type": "string",
         "description": "The status of the previous API call."
      },
      "exceptionType": {"type": "string",
         "description": "The classname associated with the exception."
      },
      "errorNumber": {"type": "string",
         "description": "Message ID of the exception."
      },
      "errorMessage": {"type": "string",
         "description": "Message text of the exception."
      },
      "errorMessageParameters": {"type": ["string"], "optional": true,
         "description":"Message text parameters of the exception."
      },
      "programmersDetails": {"type": "object", "optional": true,
         "description":"Additional exception details, for example, a stack trace."
      }
   }
} 

MIME type: application/xml


+ View schema
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://rest.bpm.ibm.com/v1/data/exception"
	elementFormDefault="unqualified" xmlns="http://www.w3.org/2001/XMLSchema"
	xmlns:tns="http://rest.bpm.ibm.com/v1/data/exception"
	xmlns:dat="http://rest.bpm.ibm.com/v1/data/root">

    <import schemaLocation="BPMRestData.xsd" namespace="http://rest.bpm.ibm.com/v1/data/root" />
    
    <!--
	This type represents an error response.
    -->    
    <element name="RestRuntimeException">
	<complexType>
	    <sequence>
		<element name="status" type="string"/>
		<element name="Data" type="tns:ExceptionData">
    		</element>
	    </sequence>
	</complexType>
    </element>

    <!-- 
	 This type contains detailed error information associated with an exception.
    -->
    <complexType name="ExceptionData">
	<sequence>
	    <element name="status" type="string"/>

	    <!-- This specifies the java class name of the exception -->
	    <element name="exceptionType" type="string"/>

	    <!-- The message ID of the error message -->
	    <element name="errorNumber" type="string" minOccurs="0"/>

	    <!-- The complete error message -->
	    <element name="errorMessage" type="string"/>

	    <!-- The list of strings inserted into the error message -->
	    <element name="errorMessageParameters" type="string" minOccurs="0" maxOccurs="unbounded"/>

	    <!-- 
		 The stacktrace associated with the exception.
		 Note that this will be omitted unless the "server-stacktrace-enabled" property
		 is enabled in the server's 100Custom.xml file.
	    -->     
	    <element name="programmersDetails" type="string"></element>
	    
	    <!-- Prior responses.  Set if a bulk command was used -->
	    <element name="responses" type="dat:BulkCommandResponses" minOccurs="0"></element>

            <element name="errorData" type="tns:ErrorData" minOccurs="0" />
	</sequence>
    </complexType>

    <complexType name="ErrorData">
        <sequence>
            <element name="code" type="string" />
            <element name="data" type="string" minOccurs="0" />
        </sequence>
    </complexType>
    
</schema>

MIME type: application/x-javascript

Status codes

The method returns one of the following status codes:
CodeDescription
200 OK
Successful completion. Note: The list might be empty and failures might be listed in the response (FailedOperations complexType).
400 Bad Request
Bad Request
403 Forbidden
The caller is not authorized to perform this operation.
406 Not AcceptableThe requested content type or content encoding is not supported.
500 Internal Server Error
Internal Server Error. See the details provided.

Available since

8.5.6.0

Parent Topic: Alert Definitions Status Resource