Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ BI Gateway On-Premises

AddMeasureDateRangeEvent() Method

  • Last UpdatedMar 07, 2022
  • 3 minute read

The AddMeasureDateRangeEvent() method adds events for a Measure object having particular given calculation or a set of calculations and a given dimension or a set of dimensions for a specific date time range. The date time range consists of a start date time and an end date time.

For dimension, any dimension field could contribute as a processing criteria to the measure execution.

URL: http://<BI Gateway server name>:<Port Number>/BIGateway/Event/AddMeasureDateRangeEvent

Note: You must explicitly state the computer name when calling the REST API. Make sure that localhost is not used.

Refresh measure objects for a date range

Request

Parameter Type

Parameter Name

Description

Data Type

Input Request

ObjectName

The Data Transfer Object which holds three attributes: ObjectName, Calculation list, Dimensions list, StartDate, and EndDate.

DTO (valid JSON format)

Return Value:

A GUID (e.g.: 00000000-0000-0000-0000-000000000000) is returned corresponding to the event created in the database. If the AddMeasureDateRangeEvent() method fails, an error is logged in the Application Insight and the API returns a value of zero.

Postman Example

The following Postman code snippet shows the example for the query.

Note:
- Replace the values for ObjectName, Measure, StartDate, and EndDate according to your requirement.
- In the Admin Lite mode, ensure that the interval between StartDate and EndDate is not more than 14 days.

{"ObjectName":"Measure_001","StartDate":"2021-01-02 08:00:00Z","EndDate":"2021-01-03 23:59:59Z"}

If the query is successful, the relevant GUID is displayed as a response.

For more information about Postman installation and configuration, see Configuring Postman Settings.

Refresh measure objects for specific calculations and dimensions for a date range

Request

Parameter Type

Parameter Name

Description

Data Type

Input Request

jsonstring

The Data Transfer Object which holds three attributes: Object name, StartDate, EndDate.

DTO (valid JSON format)

Important: Make sure that the Start DateTime and End DateTime parameter is in UTC date and time format.

Return Value:

A GUID is returned corresponding to the event created in the database. If the AddMeasureDateRangeEvent() method fails, an error is logged in the Application Insight and a value of zero is returned.

Postman Examples

The following Postman code snippets show the examples for the query.

Note: Replace the values for ObjectName, Calculation list, Dimensions list, StartDate, and EndDate according to your requirement.

Processing a single calculation for a single dimension field

{

"ObjectName": "Measure_001",

"Calculations": [

"Count"

],

"Dimensions": [

{

"Dimension_001": [

{

"ShiftName": "Morning"

}

]

}

],

"StartDate": "2021-03-13 06:30:00.00Z",

"EndDate": "2021-03-13 07:30:00.00Z"

}

If the query is successful, the relevant GUID is displayed as a response.

Processing a single calculation for multiple fields of a single dimension

{

"ObjectName": "Measure_001",

"Calculations": [

"Count"

],

"Dimensions": [

{

"Dimension_001": [

{

"ShiftName": "Morning"

},

{

"ShiftName": "Night"

}

]

}

],

"StartDate": "2021-03-13 06:00:00.00Z",

"EndDate": "2021-03-14 06:00:00.00Z"

}

If the query is successful, the relevant GUID is displayed as a response.

Processing a set of calculations for a set of fields of dimensions

{

"ObjectName": "Measure_001",

"Calculations": [

"Count",

"Sum"

],

"Dimensions": [

{

"Dimension_001": [

{

"ShiftId": "2249"

}

],

"Dimension_002": [

{

"WorkOrderId": "PO_20210313_7701"

}

]

}

],

"StartDate": "2021-03-13 06:30:00.00Z",

"EndDate": "2021-03-13 07:30:00.00Z"

}

If the query is successful, the relevant GUID is displayed as a response.

Processing an Expression calculation for a set of dimension fields

Mention all the primary calculations used in the expression calculation.

{

"ObjectName": "Measure",

"Calculations": [

"TotalEnergy",

"QuantityProduced",

"QuantityRejected",

"AverageSpeed"

],

"Dimensions": [

{

"Asset": [

{

"AssetName": "Filler01"

},

{

"AssetName": "Filler02"

}

],

"Shift": [

{

"ShiftId": "Night"

}

]

}

],

"StartDate": "2021-03-09 22:00:00.00Z",

"EndDate": "2021-03-15 06:00:00.00Z"

}

If the query is successful, the relevant GUID is displayed as a response.

For more information about Postman installation and configuration, see Configuring Postman Settings.

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in