The KPI OData service, a new service in MII 15.0 is similar to query template service and is used to fetch data for the KPI objects. You can access the service using http://<server>:<port>>/XMII/IlluminatorOData/KPI.
Modes | Description | Sample URL |
---|---|---|
GetData | Returns aggregated live data for a given KPI that was previously stored in SAP MII database. The aggregation is obtained based on the KPI configuration such as SUM, AVG, and so on. | http://<server>:<port>>/XMII/IlluminatorOData/KPI?Mode=GetData&KpiName=<fullpath to KPI>&Dim#1#=<filter value of dimension 1>&Dim#n#=<filter value of dimension n>&Granularity=<value for granularity>&Duration=<value for duration>&StartDate=YYYY-MM-DDThh:mm:ss.sTZD&EndDate=YYYY-MM-DDThh:mm:ss.sTZD&SelectedDim=<Value1>,<Value2> |
GetMetaData | Returns the definition of a given KPI that was created and configured in SAP MII Workbench. | http://<server>:<port>/XMII/IlluminatorOData/KPI?Mode= GetMetaData=&KpiName=<fullpath to KPI> |
GetTileData | Provides all the data of a KPI that is relevant to be visualized in a tile view. Also, the mode provides an orchestration of the KPI definition along with the aggregated KPI live value matching a given duration. Additionally, the KPI status is provided considering the configured thresholds along with the KPI trend. | http://<server>:<port>>/XMII/IlluminatorOData/KPI?Mode=GetDimensionValues&KpiName=<fullpath to KPI>&Duration=<value for duration>&StartDate=YYYY-MM-DDThh:mm:ss.sTZD&EndDate=YYYY-MM-DDThh:mm:ss.sTZD&Dim#1#=<filter value of dimension 1>&Dim#n#=<filter value of dimension n> |
Get Dimensions | Returns the dimension names along with the types of a given KPI that was created and configured in SAP MII Workbench. | http://<server>:<port>/XMII/IlluminatorOData/KPI?Mode= GetDimensions&KpiName=<fullpath to KPI> |
GetDimension Values | Returns the existing values for the given dimension of a given KPI that was created and configured in SAP MII Workbench. | http://<server>:<port>>/XMII/IlluminatorOData/KPI?Mode=GetDimensionValues&KpiName=<fullpath to KPI>&Dimension=<selected dimension to get values for>&Dim#1#=<filter value of dimension 1>&Dim#n#=<filter value of dimension n> |
Get Dependencies | Returns all children KPI names and their types for a given KPI. The configuration of the parent child relationship must be performed using the SAP MII Workbench. | http://<server>:<port>/XMII/IlluminatorOData/KPI?Mode= GetDependencies&KpiName=<fullpath to KPI> |
The request parameters are shown in following table:
Parameter | Description | Supported Values | Mandatory? |
---|---|---|---|
Mode | Mode for this OData service | GetData | Yes |
KpiName | Provides the full path to a specific KPI without its internal extension. | Default/MIIOBJ/KpiName1 | Yes |
Duration | The duration limits (or the time period) for which the KPI values are aggregated and extracted. The start and end time is calculated automatically for some specific inbuilt time intervals such as CurrentShift, PreviousMonth, and so on. The start and end date in the Custom property must be in any ISO8601 compliant format (YYYY-MM-DDThh:mm:ss.sTZD). |
| Yes |
StartDate | Defines the start date of the duration to calculate the KPI aggregated value. | Any ISO8601 compliant format For example, 2013-07-18T11:00:00Z | No Note This field is mandatory when you set Duration to Custom. End of the note. |
EndDate | Defines the end date of the duration to calculate the KPI aggregated value. | Any ISO8601 compliant format. For example, 2013-07-18T11:00:00Z | No Note This field is mandatory when you set Duration to Custom. End of the note. |
Dim_# | Contains the dimension and a value to filter the result set. The hash symbol must be replaced by dimension name. For example, Dim_Plant. The parameter values can range from 0 to multiple values.
| Only configured custom dimension names are allowed. | No |
SelectedDim | Contains a comma separated list specifying the dimensions to be selected. Following conditions must be considered:
| Only configured custom dimension names are allowed. | No |
Granularity | Groups the result data based on a certain granularity level. Some of the modes and the results are as follows:
|
| No |
The response parameter of the mode is listed in the following table:
Parameter | Description | Data Type | Examples |
---|---|---|---|
VALUE | Represents the value of the KPI for the configured aggregation and the requested duration and granularity. | Double | "74.25076532959889 |
DIM_# | Returns the value of a dimenstion, where the name of the selected dimension is defined as part of the response parameter name. The hash sign is replaced by dimension name. The value of this property can range from 0 to n. | String | “Line1” |
TIMESTAMP | Returns the timestamp matching the granularity values. | String ISO8601 | "2013-07-18T11:00:00+0200" |
The request parameters for the GetMetaData mode are shown in following table:
Parameter | Description | Supported Values |
---|---|---|
Mode | Returns the mode for this OData service. | GetMetaData |
KpiName | Returns the full path to a specific KPI without its internal extension. | Default/MIIOBJ/KpiName1 |
Note
Both the above mentioned parameters are mandatory.
The response parameter of the mode is listed in the following table:
Parameter | Description | Data Type | Examples |
---|---|---|---|
Name | Returns the full path to a specific KPI without its internal extension. | String | "KPIs/MIIOBJ/OEE" |
Type | Specifies the KPI type (Base/Composite/Undefined). | String | "Base" |
UoM | Specifies the unit of measurement of a KPI. | String | "%” |
TargetValue | Specifies the target value of a KPI. | String | "30" |
ThresholdType | Specifies the KPI threshold type of a KPI (Positive, Negative, Bi-directional). | String | "Bi-directional" |
FromRedLow | Defines the minimum threshold of the lower red band. Note This parameter is available only for ‘Negative’ or ‘Bi-directional’ threshold type. End of the note. | String | "-70.0" |
ToRedLow | Defines the maximum threshold of the lower red band. Note This parameter is available only for ‘Negative’ or ‘Bi-directional’ threshold type. End of the note. | String | "-50.0" |
FromYellowLow | Defines the minimum threshold of the lower yellow band. Note This parameter is available only for ‘Negative’ or ‘Bi-directional’ threshold type. End of the note. | String | "-50.0" |
ToYellowLow | Maximum Threshold of the lower yellow band. Note This parameter is available only for ‘Negative’ or ‘Bi-directional’ threshold type. End of the note. | String | "0.0" |
FromGreenLow | Defines the minimum threshold of the green band. Note This parameter is available for all the KPI types. End of the note. | String | "0.0" |
ToGreenLow | Defines the minimum threshold of the green band. Note This parameter is available for all the KPI types. End of the note. | String | "50.0" |
FromYellowHigh | Defines the minimum threshold of the upper yellow band. Note This parameter is available only for ‘Negative’ or ‘Bi-directional’ threshold type. End of the note. | String | 50.0" |
ToYellowHigh | Defines the maximum threshold of the upper yellow band. Note This parameter is available only for ‘Negative’ or ‘Bi-directional’ threshold type. End of the note. | String | "70.0" |
FromRedHigh | Defines the minimum threshold of the upper yellow band. Note This parameter is available only for ‘Negative’ or ‘Bi-directional’ threshold type. End of the note. | String | "70.0" |
ToRedHigh | Defines the maximum threshold of the upper yellow band. Note This parameter is available only for ‘Negative’ or ‘Bi-directional’ threshold type. End of the note. | String | "100.0" |
The request parameters for the GetTileData mode are shown in following table:
Parameter | Description | Supported Values | Mandatory? |
---|---|---|---|
Mode | Returns the mode for this OData service | GetTileData | Yes |
KpiName | Returns the full path to a specific KPI without its internal extension. | KPI/MIIOBJ/KpiName1 | Yes |
Duration | The duration limits (or the time period) for which the KPI values are aggregated and extracted. The start and end time is calculated automatically for some specific inbuilt time intervals such as CurrentShift, PreviousMonth, and so on. The start and end date in the Custom property must be in any ISO8601 compliant format (YYYY-MM-DDThh:mm:ss.sTZD) |
| Yes |
StartDate | Defines the start date of the duration to calculate the KPI aggregated value. | Any ISO8601 compliant format For example, 2013-07-18T11:00:00Z | No Note This field is mandatory when you set Duration to Custom. End of the note. |
EndDate | Defines the end date of the duration to calculate the KPI aggregated value. | Any ISO8601 compliant format. For example, 2013-07-18T11:00:00Z | No Note This field is mandatory when you set Duration to Custom. End of the note. |
Dim_# | Contains the dimension and a value to filter the result set. The hash symbol must be replaced by dimension name. For example, Dim_Plant. The parameter values can range from 0 to multiple values.
| Only configured custom dimension names are allowed. | No |
The response parameter of the mode is listed in the following table:
Parameter | Description | Supported Values | Mandatory |
---|---|---|---|
DIM_# | Contains a value for the specific dimension. The dimension name is returned as upper case | String | "1000" |
NAME | Provides the full path of the KPI | String | "KPIs/MIIOBJ/BaseKPI" |
VALUE | Defines the current aggregated value of the KPI matching the given duration | Double | "66.79662453737092" |
UOM | Provides the unit of measurement, as configured | String | "%" |
TREND | Following trends are available:
| String | "NEGATIVE" |
STATUS | Following statuses are available:
| String | "YELLOW" |
DURATION | Returns the given duration for convenient consumption | String | "CurrentYear" |
DURATION_STARTDATE | Returns the start date matching the given duration value. For in-built durations such as PreviousYear, the returned value is 1st January, previous year | String ISO8601 | 2013-01-01T00:00:00+0000" |
DURATION_ENDDATE | Returns the end date matching the given duration value. For in-built durations such as PreviousYear, the returned value is 31st December, previous year | String ISO8601 | "2013-12-31T23:59:59+0000" |
The request parameters for the GetDimensions mode are shown in following table:
Parameter | Description | Supported Values |
---|---|---|
Mode | Returns the mode for this OData service | GetDimensions |
KpiName | Returns the full path to a specific KPI without its internal extension. | Default/MIIOBJ/KpiName1 |
Note
Both the above mentioned parameters are mandatory.
The response parameter of the mode is listed in the following table:
Parameter | Description | Data Type | Examples |
---|---|---|---|
DIMENSION_NAME | Provides the names of the dimensions defined for a KPI | String | “Plant” |
DIMENSION_TYPE | Provides the data type of the dimension | String | “Double” |
The request parameters for the GetDimensionValues mode are shown in following table:
Parameter | Description | Supported Values | Mandatory |
---|---|---|---|
Mode | Returns the mode for this OData service | GetDimensionValues | Yes |
KpiName | Returns the full path to a specific KPI without its internal extension. | Default/MIIOBJ/KpiName1 | Yes |
Dimension | Contains the dimension name to get the existing values for ?????. | A custom dimension name Note Default dimensions such as Timestamp and Value are prohibited. End of the note. | Yes |
Dim_# | Contains the dimension and a value to filter the result set. The hash symbol must be replaced by dimension name. For example, Dim_Plant. The parameter values can range from 0 to multiple values.
| Only configured custom dimension names are allowed. | No |
The response parameter of the mode is listed in the following table:
Parameter | Description | Data Type | Examples |
---|---|---|---|
DIM_# | Each row contains a value for the specific dimension. The name of the selected dimension is defined as part of the response parameter name, where the hash sign is replaced by the dimension name. Note
End of the note. | String | "1000" |
The request parameters for GetDimensions mode are shown in following table:
Parameter | Description | Supported Values |
---|---|---|
Mode | Returns the mode for this OData service | GetDimensions |
KpiName | Returns the full path to a specific KPI without its internal extension. | Default/MIIOBJ/KpiName1 |
Note
Both the above mentioned parameters are mandatory.
The response parameter of the mode is listed in the following table:
Column Name | Description | Data Types | Examples |
---|---|---|---|
NAME | Returns the full path of the child KPI without internal file extension | String | "KPIs/MIIOBJ/OEE" |
TYPE | Returns the KPI type (0= Base and 1= Composite) | String | "Base" |