IBM Business Process Manager, Version 8.5.5

REST interface for BPD-related resources - Service Level Agreement Resource - GET Method

Use this method to retrieve the detailed information related to a service level agreement.

Sample method invocation

GET /rest/bpm/wle/v1/sla/{slaId}[?snapshotId={string}][&branchId={string}]

Parameters

Note: In order to identify the correct snapshot to be used, you must specify one of the snapshotId or branchId parameters.
The snapshot is obtained using the following precedence rules:
1) If the snapshotId parameter is specified, then that specific snapshot will be used, and the branchId parameter is ignored.
2) If the branchId parameter is specified, then the tip (current) snapshot of the specified branch (track) will be used.
Optional parameters
NameValue TypeDescription
snapshotId string
The ID of the snapshot associated with the service level agreement. Either 'snapshotId' or 'branchId' must be specified.
branchId string
The ID of the branch associated with the service level agreement. Either 'snapshotId' or 'branchId' must be specified.

Request content

None

Response content

The detailed information related to the service level agreement (ServiceLevelAgreement complexType). Note that the ID returned for a participant can be used as a teamId in team related calls.

The default content type is application/json.

MIME type: application/json


+ View schema
{
    "status":"200",
    "data":{
        "slaId":{"type": "string", "description": "The ID of the service level agreement."},
        "name":{"type": "string", "description": "The name of the service level agreement."},
        "desc":{"type": "string", "description": "The description of the service level agreement."},
        "trigger":{
            "countA":{"type": "double", "description": "Count A. It only applies when occurrenceType is 'VIOLATED_A_OF_LAST_B_TIMES'."},
            "countB":{"type": "double", "description": "Count B. It only applies when occurrenceType is 'VIOLATED_A_OF_LAST_B_TIMES'."),
            "countN":{"type": "double", "description": "Count N. It only applies when occurrenceType is 'VIOLATED_N_TIMES_OVER_PERIOD'."},
            "timeUnit":{"type": "object", "description": "It does not apply when occurrenceType is 'WHENEVER_VIOLATED' or 'VIOLATED_A_OF_LAST_B_TIMES'.",
            	{
            	    "unitType": {"type": "string", "description": "The occurrence type.", 
		       	"enum":
			   [
				"MONTHS",
				"WEEKS",
				"DAYS",
				"HOURS"
			   ]
		     },
		    "timeCount":{"type": "integer", "description": "The time count is based on unitType specified above."},
		    "rollingTime":{"type": "boolean", "description": 
				"When rollingTime is false, timeCount will be ignored. It has the following meaning based on unitType:
					- This hour
					- Today
					- This week
					- This month				           											 
				When rollingTime is true, timeCount should be used. It has the following meaning based on unitType, as shown in the following example where timeCount is 100:
					- Over the last 100 hours
					- Over the last 100 days
					- Over the last 100 weeks
					- Over the last 100 months"			           											 

         	     }
		}
            },
            "percent":{"type": "double", "description": "It only applies when occurrenceType is 'VIOLATED_PERCENT_OF_TIME_OVER_PERIOD', 
            			'VIOLATED_PERCENT_MORE_OF_TIME_OVER_PERIOD' or 'VIOLATED_PERCENT_LESS_OF_TIME_OVER_PERIOD'."},
            "occurrenceType":{"type": "string", "description": "The occurrence type.", 
            	"enum":
            	   [
			"WHENEVER_VIOLATED",
			"VIOLATED_A_OF_LAST_B_TIMES",
			"VIOLATED_N_TIMES_OVER_PERIOD",
			"VIOLATED_PERCENT_OF_TIME_OVER_PERIOD",
			"VIOLATED_PERCENT_MORE_OF_TIME_OVER_PERIOD",
			"VIOLATED_PERCENT_LESS_OF_TIME_OVER_PERIOD"
	           ]
            },
        },
        "conditions":[{
        	"scope":{"type": "string", "description": "The scope of the condition.", 
			"enum":
		           [
				"SingleValue",
				"SumOfValuesOverTime",
				"AverageValueOverTime"
			   ]
		},			                
                "kpi":{
                    "kpiId":{"type": "string", "description": "The ID of the KPI."},
                    "kpiName":{"type": "string", "description": "The name of the KPI."},
                    "snapshotId":{"type": "string", "description": "The ID of the snapshot associated with the KPI. 
                		Either 'snapshotId' or 'branchId' must be specified."},
                    "branchId":{"type": "string", "description": "The ID of the branch associated with the KPI.
                	        Either 'snapshotId' or 'branchId' must be specified."},
                },
                "kpiUnit":{"type": "string", "description": "The KPI unit. When kpiUnit is BOOLEAN, only two attributes (trueOrfalse and activities) apply.", 
		        "enum":
		           [
				"CURRENCY",
				"TIME",
				"COUNT",
				"BOOLEAN"
			   ]
	         },			
                "trueOrfalse":{"type": "boolean", "description": "It only applies when kpiUnit is 'BOOLEAN'."},
                "activities":[{
                    "activityName":{"type": "string", "description": "The name of the activity."},
                    "activityId":{"type": "string", "description": "The ID of the activity."},
                    "bpdId":{"type": "string", "description": "The ID of the business process definition."},
                    "bpdName":{"type": "string", "description": "The name of the business process definition."},
		    "snapshotId":{"type": "string", "description": "The ID of the snapshot associated with the business process definition. 
				Either 'snapshotId' or 'branchId' must be specified."},
		    "branchId":{"type": "string", "description": "The ID of the branch associated with the business process definition. 
				Either 'snapshotId' or 'branchId' must be specified."},
                    }
                ],
		"startTime":{"type": "object", "description": "It does not apply when the scope is 'SingleValue'.",
		    {
		    	"unitType": {"type": "string", "description": "The occurrence type.", 
			    "enum":
			       [
					"MONTHS",
					"WEEKS",
					"DAYS",
					"HOURS"
	           	       ]
		          },
	                "timeCount":{"type": "integer", "description": "The time count is based on unitType specified above."},
		    	"rollingTime":{"type": "boolean", "description": 
				"When rollingTime is false, timeCount will be ignored. It has the following meaning based on unitType:
					- This hour
					- Today
					- This week
					- This month				           											 
				When rollingTime is true, timeCount should be used. It has the following meaning based on unitType, as shown in the following example where timeCount is 100:
					- Over the last 100 hours
					- Over the last 100 days
					- Over the last 100 weeks
					- Over the last 100 months"			           											 

         	     	}
       		    }
		},
                "relation":{"type": "string", 
		       enum":
		         [
				"GreaterThan",
				"LessThan",
				"EqualTo"
   		         ]
		},			
                "compareTarget":{
                    "value":{"type": "long", "description": "It only applies when the type is 'Value', 'ValueAboveThreshold' or 'ValueAboveThreshold'. 
                	When the type is 'ValueAboveThreshold' or 'ValueBelowThreshold', 
                	it holds the time value above and below the threshold, and the unit is seconds."},
                    "type":{"type": "string", 
		       	"enum":
			   [
				"EqualsThreshold",
				"PercentAboveThreshold",
				"PercentBelowThreshold",
				"ValueAboveThreshold",
				"ValueBelowThreshold",
				"Value"
			   ]
	            },
                   "thresholdType":{"type": "string", 
		      	"enum":
			   [
				"MinimumThresholdValue",
				"ExpectedThresholdValue",
				"MaximumThresholdValue"
			   ]
		    },			
		  "percent":{"type": "double", "description": "It only applies when the type is 'PercentAboveThreshold' or 'PercentBelowThreshold'."}			            
                }
            }
        ],
        "consequence":{
            "fireBPD":{"type": "boolean", "description": "Indicates whether to initiate the business process definition."},
            "bpdRefInfo":{
                "bpdId":{"type": "string", "description": "The ID of the business process definition."},
                "bpdName":{"type": "string", "description": "The name of the business process definition."},
          	"snapshotId":{"type": "string", "description": "The ID of the snapshot associated with the business process definition. 
          			Either 'snapshotId' or 'branchId' must be specified."},
            	"branchId":{"type": "string", "description": "The ID of the branch associated with the business process definition.
            			Either 'snapshotId' or 'branchId' must be specified."}                
            },
            "sendEmail":{"type": "boolean", "description": "Indicates whether to send email."},
            "emailAddress":{"type": "boolean", "description": "The email address."}
        },
        "exposedTo":{
            "participantGroupId":{"type": "string", "description": "The ID of the participant group."},
            "participantGroupName":{"type": "string", "description": "The name of the participant group."},
            "snapshotId":{"type": "string", "description": "The ID of the snapshot associated with the participant group. 
        			Either 'snapshotId' or 'branchId' must be specified."},
            "branchId":{"type": "string", "description": "The ID of the branch associated with the participant group. 
        			Either 'snapshotId' or 'branchId' must be specified."}    
        }
    }
}
+ View example content
{
    "status":"200",
    "data":{
        "slaId":"47.557b57e7-d7b3-41be-bd4b-c707d93467c3",
        "name":"SLA1",
        "desc":"",
        "trigger":{
            "percent":10,
            "timeUnit":{
                "unitType":"MONTHS",
                "rollingTime":true,
                "timeCount":4
            },
            "occurrenceType":"VIOLATED_PERCENT_OF_TIME_OVER_PERIOD"
        },
        "conditions":[{
                "scope":"SumOfValuesOverTime",
                "kpi":{
                    "kpiId":"49.67cbb213-0032-4f14-be44-7e9c7a1a146f",
                    "kpiName":"Total Time (Clock)",
                    "snapshotId":"2064.74f9ea10-a351-4c42-ada5-b3dce7145330",
                    "branchId":null
                },
                "kpiUnit":"TIME",
                "trueOrfalse":true,
                "activities":[],
                "startTime":{
                    "unitType":"DAYS",
                    "rollingTime":true,
                    "timeCount":1
                },
                "relation":"EqualTo",
                "compareTarget":{
                    "percent":102,
                    "type":"PercentAboveThreshold",
                    "thresholdType":"MaximumThresholdValue"
                }
            }
        ],
        "consequence":{
            "fireBPD":false,
            "sendEmail":false,
            "emailAddress":""
        }
    }
}

MIME type: application/xml


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

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

	
	<simpleType name="OccurrenceType">
		<restriction base="string">
			<enumeration value="WHENEVER_VIOLATED" />
			<enumeration value="VIOLATED_A_OF_LAST_B_TIMES" />
			<enumeration value="VIOLATED_N_TIMES_OVER_PERIOD" />
			<enumeration value="VIOLATED_PERCENT_OF_TIME_OVER_PERIOD" />
			<enumeration value="VIOLATED_PERCENT_MORE_OF_TIME_OVER_PERIOD" />
			<enumeration value="VIOLATED_PERCENT_LESS_OF_TIME_OVER_PERIOD" />
		</restriction>
	</simpleType>	
		
	<simpleType name="UnitType">
		<restriction base="string">
			<enumeration value="YEARS" />
			<enumeration value="MONTHS" />
			<enumeration value="WEEKS" />
			<enumeration value="DAYS" />
			<enumeration value="HOURS" />
		</restriction>
	</simpleType>		
	
	<simpleType name="KPIUnitType">
		<restriction base="string">
			<enumeration value="CURRENCY" />
			<enumeration value="TIME" />
			<enumeration value="COUNT" />
			<enumeration value="BOOLEAN" />
		</restriction>
	</simpleType>		
	
	<complexType name="TimeUnit">
		<sequence>
			<element name="unitType" type="tns:UnitType" />
			<element name="rollingTime" type="boolean" >
					<annotation>
						<documentation>when rollingTime is false, timeCount will be ignored. and it means following based on the unitType:
	- This hour
	- Today
	- This week
	- This month

when rollingTime is true, timeCount should be used, and it means following based on the unitType (sample):
	- Over the last 100 hours
	- Over the last 100 days
	- Over the last 100 weeks
	- Over the last 100 months</documentation>
						</annotation>
			</element>
			<element name="timeCount" type="int" />
		</sequence>
	</complexType>
		
	<complexType name="AbstractTrigger" abstract="true">
		<sequence>
			<element name="occurrenceType" type="tns:OccurrenceType"/>
		</sequence>
	</complexType>

	<complexType name="WheneverViolatedTrigger">
		<complexContent>
			<extension base="tns:AbstractTrigger" >
			</extension>
		</complexContent>
	</complexType>

	<complexType name="ViolatedAOfLastBTrigger">
		<complexContent>
			<extension base="tns:AbstractTrigger">
				<sequence>
					<element name="countA" type="double" />
					<element name="countB" type="double" />
				</sequence>
			</extension>
		</complexContent>
	</complexType>

	<complexType name="ViolatedNTimesOverPeriodTrigger">
		<complexContent>
			<extension base="tns:AbstractTrigger">
				<sequence>				
					<element name="countN" type="double" />
					<element name="timeUnit" type="tns:TimeUnit" />
				</sequence>
			</extension>
		</complexContent>
	</complexType>
	
	<complexType name="ViolatedPercentOfTimeOverPeriodTrigger">
		<complexContent>
			<extension base="tns:AbstractTrigger">
				<sequence>
					<element name="percent" type="decimal" />
					<element name="timeUnit" type="tns:TimeUnit" />
				</sequence>
			</extension>
		</complexContent>
	</complexType>	
	
	<complexType name="ViolatedPercentOfMoreTimeOverPeriodTrigger">
		<complexContent>
			<extension base="tns:ViolatedPercentOfTimeOverPeriodTrigger">
			</extension>
		</complexContent>
	</complexType>		

	<complexType name="ViolatedPercentOfLessTimeOverPeriodTrigger">
		<complexContent>
			<extension base="tns:ViolatedPercentOfTimeOverPeriodTrigger">
			</extension>
		</complexContent>
	</complexType>			
	
	<simpleType name="ConditionScopeType">
		<restriction base="string">
			<enumeration value="SingleValue" />
			<enumeration value="SumOfValuesOverTime" />
			<enumeration value="AverageValueOverTime" />
		</restriction>
	</simpleType>		

	<simpleType name="RelationType">
		<restriction base="string">
			<enumeration value="GreaterThan" />
			<enumeration value="LessThan" />
			<enumeration value="EqualTo" />
		</restriction>
	</simpleType>	
		
	<complexType name="KPIRefInfo">
		<sequence>
			<element name="kpiId" type="string" />
			<element name="kpiName" type="string" />
			<choice>
				<element name="snapshotId" type="string" />
				<element name="branchId" type="string"/>
			</choice>				
		</sequence>
	</complexType>	
	
	<complexType name="ActivityRefInfo">
		<sequence>
			<element name="activityName" type="string" />
			<element name="activityId" type="string" />
			<element name="bpdId" type="string" />
			<element name="bpdName" type="string" />
			<choice>
				<element name="snapshotId" type="string" />
				<element name="branchId" type="string"/>
			</choice>				
		</sequence>
	</complexType>		
	
	<complexType name="BPDRefInfo">
		<sequence>
			<element name="bpdId" type="string" />
			<element name="bpdName" type="string" />
			<choice>
				<element name="snapshotId" type="string" />
				<element name="branchId" type="string"/>
			</choice>				
		</sequence>
	</complexType>			
	
	<simpleType name="ConditionTargetType">
		<restriction base="string">
			<enumeration value="EqualsThreshold" />
			<enumeration value="PercentAboveThreshold" />
			<enumeration value="PercentBelowThreshold" />
			<enumeration value="ValueAboveThreshold" />
			<enumeration value="ValueBelowThreshold" />
			<enumeration value="Value" />
		</restriction>
	</simpleType>	
	
	<simpleType name="ThresholdType">
		<restriction base="string">
			<enumeration value="MinimumThresholdValue" />
			<enumeration value="ExpectedThresholdValue" />
			<enumeration value="MaximumThresholdValue" />
		</restriction>
	</simpleType>		
		
	<complexType name="AbstractThresholdTarget" abstract="true">
		<sequence>
			<element name="type" type="tns:ConditionTargetType" />
		</sequence>
	</complexType>			
		    	
	<complexType name="ValueTarget">
		<complexContent>
			<extension base="tns:AbstractThresholdTarget">
				<sequence>
					<element name="value" type="long" />
				</sequence>			
			</extension>
		</complexContent>
	</complexType>	
			    	
	<complexType name="EqualsThresholdTarget">
		<complexContent>
			<extension base="tns:AbstractThresholdTarget">
				<sequence>
					<element name="thresholdType" type="tns:ThresholdType" />
				</sequence>			
			</extension>
		</complexContent>
	</complexType>	
	
	<complexType name="PercentThresholdTarget">
		<complexContent>
			<extension base="tns:EqualsThresholdTarget">
				<sequence>
					<element name="percent" type="decimal" />
				</sequence>			
			</extension>
		</complexContent>
	</complexType>		

	<complexType name="ValueThresholdTarget">
		<complexContent>
			<extension base="tns:EqualsThresholdTarget">
				<sequence>
					<element name="value" type="long" >
						<annotation>
							<documentation>it holds the time value above and below the threshold, and the unit is second</documentation>
						</annotation></element>
				</sequence>			
			</extension>
		</complexContent>
	</complexType>		
			    	
	<complexType name="Condition">
		<sequence>
			<element name="scope" type="tns:ConditionScopeType" />
			<element name="kpi" type="tns:KPIRefInfo" />
			<element name="kpiUnit" type="tns:KPIUnitType" />
			<element name="trueOrfalse" type="boolean" >
				<annotation>
					<documentation>This trueOrfalse element will only be used if kpiUnit is BOOLEAN</documentation>
				</annotation></element>			
			<element name="activities" type="tns:ActivityRefInfo" maxOccurs="unbounded"/>
			<element name="startTime" type="tns:TimeUnit" >
				<annotation>
					<documentation>startTime is only available when scope is SumOfValuesOverTime or AverageValueOverTime</documentation>
				</annotation></element>
			<element name="relation" type="tns:RelationType" />
			<element name="compareTarget" type="tns:AbstractThresholdTarget" />
			
		</sequence>
	</complexType>		
	
	<complexType name="Consequence">
		<sequence>
			<element name="fireBPD" type="boolean" />
			<element name="bpdRefInfo" type="tns:BPDRefInfo" />
			<element name="sendEmail" type="boolean"/>
			<element name="emailAddress" type="string" />			
		</sequence>
	</complexType>		
	
	<complexType name="ExposedTo">
		<sequence>
			<element name="participantGroupId" type="string" />
			<element name="participantGroupName" type="string" />
			<choice>
				<element name="snapshotId" type="string" />
				<element name="branchId" type="string"/>
			</choice>		
		</sequence>
	</complexType>			
	
	<complexType name="ServiceLevelAgreement">
		<complexContent>
			<extension base="pref:Data">
				<sequence>
					<element name="slaId" type="string" />
					<element name="name" type="string" />
					<element name="desc" type="string" />
					<element name="richDesc" type="string" />
					<element name="trigger" type="tns:AbstractTrigger" />
					<element name="conditions" type="tns:Condition" maxOccurs="unbounded"/>
					<element name="consequence" type="tns:Consequence"/>
					<element name="exposedTo" type="tns:ExposedTo"/>
				</sequence>
			</extension>
		</complexContent>
	</complexType>

</schema>

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."
      }
   }
} 

Status codes

The method returns one of the following status codes:
CodeDescription
200 OK
Successful completion - detailed report returned.
400 Bad RequestThe parameters are not valid or they are missing.
404 Not FoundThe resource does not exist.
406 Not AcceptableThe requested content type or content encoding is not supported.
500 Internal Server ErrorA severe problem has occurred, programmer's details are provided.

Available since

7.5.1

Parent Topic: Service Level Agreement Resource