Configuration of SAP Predictive Maintenance and … 1 Document History 4 2 Configuring SAP...

188
Configuration Information PUBLIC SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02 Document Version: 1.19 – 2017-07-08 Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Transcript of Configuration of SAP Predictive Maintenance and … 1 Document History 4 2 Configuring SAP...

Configuration Information PUBLIC

SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Document Version: 1.19 – 2017-07-08

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Content

1 Document History. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0. . . . . . . . . . . . . . . .102.1 Configuring Thing Model Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Configuration Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Create a Package. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Read a Package. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21Update a Package. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26Delete a Package. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Value Data Types for Property Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Naming Conventions for IoT Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30HTTP Status Codes for Configuration Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Thing Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Create a Thing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Read a Thing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34Read All Things. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35Update a Thing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Delete a Thing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37ISO Language Codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38

2.2 Configuring Data Science Services Using Configuration UIs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40Extensibility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Entries to Create a Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41

2.3 Configuring Data Science Services Using REST APIs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48Create a Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49Train a Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59Score a Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60Check the Status of a Training Job or Scoring Job. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61Delete a Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64Read Information About All Data Science Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65

2.4 Scheduling Regular Scoring of a Model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 662.5 Configuring the Insight Provider Catalog Using REST APIs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

Create Insight Provider Entries in the Catalog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69Read an Insight Provider Entry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76Read All Insight Provider Entries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77Read an Insight Provider Type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77Read All Insight Provider Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78Delete an Insight Provider Entry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

2 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Content

Delete an Insight Provider Type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 792.6 Configuring Insight Providers Using Configuration UIs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

Creating Key Figures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81Creating Key Figure Sets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85Entries to Configure the Asset Explorer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86Entries to Configure Components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .91Entries to Configure Work Activities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93Entries to Configure Derived Signals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95Entries to Configure the Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96Entries to Configure the 2D Chart. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103Entries to Configure the 3D Chart. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

2.7 Configuring Insight Provider Using REST APIs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109Create a Key Figure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110Create a Key Figure Set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119Compute Key Figures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130Retrieve a CSRF Token. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .131Create Configurations of an Insight Provider. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132Update a Configuration of an Insight Provider. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .171Delete a Configuration of an Insight Provider. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179Insight Provider Values for Base URI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

2.8 Checking Configurations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .185

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Content P U B L I C 3

1 Document History

CautionBefore you start the configuration, make sure you have the latest version of this document. You can find the latest version at the following location: https://uacp2.hana.ondemand.com/doc/2095deecae174f819dbe28c97b4e9353/1.0%20FP02/en-US/Configuration_of_SAP_Predictive_Maintenance_and_Service_on_premise_edition_1.0_FP02.pdf

TipYou might need to refresh your browser to see the latest version of this document.

The following table provides an overview of the most important document changes:

Table 1:

Version Date Description

1.19 2017-07-06 Updated:

● Configuring Data Science Services Using Configuration UIs [page 40]

● Delete a Model [page 64]

1.18 2017-02-23 Updated:

● Entries to Configure the Map [page 96]

● Configuration Parameters per In­sight Provider [page 135]

1.17 2017-01-11 Updated:

● Entries to Configure the 2D Chart [page 103]

1.16 2017-01-04 Updated:

● Entries to Create a Model [page 41]

● Create a Model [page 49]

4 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Document History

Version Date Description

1.15 2016-12-16 Updated:

● Create Insight Provider Entries in the Catalog [page 69]

● Read an Insight Provider Entry [page 76]

● Read All Insight Provider Entries [page 77]

● Read an Insight Provider Type [page 77]

● Read All Insight Provider Types [page 78]

● Delete an Insight Provider Entry [page 79]

● Delete an Insight Provider Type [page 79]

1.14 2016-12-08 Updated:

● Configuring Thing Model Services [page 10]

● Configuring Data Science Services Using Configuration UIs [page 40]

● Configuring Data Science Services Using REST APIs [page 48]

● Configuring the Insight Provider Catalog Using REST APIs [page 69]

● Configuring Insight Providers Using Configuration UIs [page 80]

● Configuring Insight Provider Using REST APIs [page 109]

● Checking Configurations [page 185]

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Document History P U B L I C 5

Version Date Description

1.13 2016-12-07 Updated:

● Configuring Thing Model Services [page 10]

● Configuring Data Science Services Using Configuration UIs [page 40]

● Configuring Data Science Services Using REST APIs [page 48]

● Read Information About All Data Science Services [page 65]

● Configuring the Insight Provider Catalog Using REST APIs [page 69]

● Configuring Insight Providers Using Configuration UIs [page 80]

● Configuring Insight Provider Using REST APIs [page 109]

● Read an Attribute Section of a Key Figure [page 115]

● Checking Configurations [page 185]

1.12 2016-12-06 Updated:

● Configuration Parameters per In­sight Provider [page 135]

1.11 2016-12-05 Updated:

● Entries to Configure the 2D Chart [page 103]

● Create a Package [page 13]● Read a Package [page 21]

Added:

● Configuration Parameters per In­sight Provider [page 135]

1.10 2016-12-02 Updated:

● Prerequisites in Configuring Data Science Services Using Configura­tion UIs [page 40]

1.09 2016-11-25 Updated:

● Update a Package [page 26]

6 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Document History

Version Date Description

1.08 2016-11-21 Updated:

● Entries to Create a Model [page 41]

● Create a Model [page 49]

1.07 2016-11-04 Updated:

● Scheduling Regular Scoring of a Model [page 66]

1.06 2016-10-17 Updated:

● Scheduling Regular Scoring of a Model [page 66]

1.05 2016-10-12 Added:

● Insight Provider Values for Base URI [page 185] and subchapters

Updated:

● Configuring Insight Provider Using REST APIs [page 109]: Added base URIs used for REST APIs

● Entries to Configure the Map [page 96]: Added supported tile provid­ers

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Document History P U B L I C 7

Version Date Description

1.04 2016-10-11 Removed:

● Configure the 2D Chart● Reading 2D Chart Configurations

Added:

● Create Configurations of an Insight Provider [page 132] and subchap­ters

● Update a Configuration of an Insight Provider [page 171] and subchap­ters

● Delete a Configuration of an Insight Provider [page 179] and subchap­ters

Updated:

● Entries to Create a Model [page 41]

● Create a Model [page 49]● Delete a Configuration of an Insight

Provider [page 179] and subchap­ters

1.03 2016-10-10 Added:

● Scheduling Regular Scoring of a Model [page 66]

Updated:

● Chapters in Configuring Data Sci­ence Services Using REST APIs [page 48]

● Chapters in Configuring Data Sci­ence Services Using Configuration UIs [page 40]

1.02 2016-09-30 Updated:

● Prerequisites in Configuring Data Science Services Using Configura­tion UIs [page 40]

● Parameter descriptions in Create Insight Provider Entries in the Cata­log [page 69]

● Parameter descriptions in Entries to Create a Model [page 41]and

1.01 2016-09-29 Updated:

● Link to this document

8 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Document History

Version Date Description

1.0 2016-09-28 Initial Version

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Document History P U B L I C 9

2 Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Context

To configure SAP Predictive Maintenance and Service, on-premise edition 1.0, it is recommended to following the configuration order described in this chapter.

Procedure

1. Create packages as described in the chapter Create a Package [page 13].2. Configure data science services either using the UI configuration tools or the configuration REST APIs.

○ Configuration using UI configuration tools [page 40]○ Configuration using REST APIs [page 48]

3. Configure the Insight Provider Catalog using configuration REST APIs as described in the chapter Configuring the Insight Provider Catalog Using REST APIs [page 69].

4. Configure insight providers either using the UI configuration tools or the configuration REST APIs.

○ Configuration using UI configuration tools [page 80]○

5. Check the effects of your configurations on a business users as described in the chapter Checking Configurations [page 185].

6. Create things which can be assets or components as described in the chapter Create a Thing [page 32].

2.1 Configuring Thing Model Services

Before you can start configuring all other software components of SAP Predictive Maintenance and Service, on-premise edition, you need to configure IoT application services first.

Prerequisites

The following role collection is assigned to your user:

10 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

● <pdms-tech>

For more information about role collections, see the chapters Maintaining Roles and Users in SAP HANA and Role Templates for SAP Predictive Maintenance and Service, on-premise edition in the guide Installation of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02.

Context

You configure the thing model services using REST APIs. To work with SAP Predictive Maintenance and Service, on-premise edition, you need to configure the Configuration services and the Thing services.

For more information about the services, see:

● Configuration Services [page 12]● Thing Services [page 32]

Procedure

1. Configure the Configuration services. The following steps provide you with instructions on certain actions.a. Create a Package [page 13]b. Read a Package [page 21]c. Update a Package [page 26]d. Delete a Package [page 27]

More information:○ Value Data Types for Property Types [page 28]○ Naming Conventions for IoT Objects [page 30]○ HTTP Status Codes for Configuration Services [page 32]

2. Configure the Thing services. The following steps provide you with instructions on certain actions.a. Create a Thing [page 32]b. Read a Thing [page 34]c. Read All Things [page 35]d. Update a Thing [page 37]e. Delete a Thing [page 37]

More information:○ ISO Language Codes [page 38]○

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 11

2.1.1 Configuration Services

The configuration services are used to manage the configuration of the Thing model in the form of packages. A package is a logical group of meta-data objects like thingTypes, propertySetTypes, properties and so on.

ExampleIndustrial Robot

Consider an example of an industrial robot as a thing. Industrial robots can be used in a production line of a car manufacturing plant. It can have different components such as a motor drive, hydraulic piston, and so on. These components carry sensors that provide relevant data about the robot at specific time intervals.

The configuration service is used to model things. These are the types of data that can be stored and read using the Thing service. Consider the motor drive component of the robot. The motor drive can have different signals from the sensors such as temperature, power consumption, motor status or rotations per minute. The data that comes from these sensory devices can have different properties (such as temperature, power consumption) and units of measure (K, KWHr). This forms the basic atom of a thing known as propertySetType.

There can be many types of such industrial robots. A thing type contains an array of property set types. A robot of Type A can contain both property set types (example, motor drive and piston) while another robot of Type B may contain only one of the property set types (example, motor drive).

Car Manufacturer

Consider an example of a car manufacturer where the task is to monitor the performance of all manufactured cars out of the assigned production line. Cars of different models (example, ABC2Series, ABCXSeries) produced by this manufacturer can have some attributes that are similar. In such case, each car model can be modelled as a thingType containing many propertySetTypes that in turn contain properties.

Few of the properties such as body style, class, wheel base can be master data that corresponds to non-timeseries data. Few of the properties such as pressure and temperature of a wheel can correspond to timeseries data (data that changes with time very frequently while the car is in operation).

The graphic below shows a model of a package that contains two thingTypes. One for each model - ABC2Series and ABCXSeries. Both the models re-use propertySetTypes defined once called "Car" and "Engine" that contain master data Properties. Both models re-use propertySetTypes defined once called "Wheel" and "DriveUnit" that contain timeseries Properties like Rotation Speed, Power Consumption, Pressure and Temperature. Having defined the model in a package, one can create instances of a thingType. An instance of a thingType in the example can be a car with a registration number: RA KL 8136, color: Black

Packages

The following diagram illustrates a package as an example. This package contains two thingTypes; one for each car model. Both these car models reuse propertySetTypes Car and Engine that contain master data properties. They also reuse propertySetTypes Wheel and DriveUnit that contain timeseries properties such as rotation speed, power consumption, pressure and temperature. Since all these objects are defined in one package, you can create instance of a thingType. An instance of a thingType in the example can be a car with a registration number <abc> and color as black.

12 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

2.1.2 Create a Package

This configuration service is used to create a package. It is used to call the Thing services to create the thing types, property set types and so on. The default scope for a package is always set to private.

The scope is used to determine if the package is public or private.

NoteThe Thing model allows to reuse property set types across different packages. This means, a package can contain the definition of a property set type. This package is the base package. Other packages can now declare a dependency on this base package and reuse its property set type in their own thing types.

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 13

Note● A package can depend on another package. This is possible only if the scope of the latter package defines it

as public.● If you create a package that depends on another package, this service verifies that the property set types

referred to are defined in the package on which your package depends.● When you create a package that depends on another package, you can use only the latest version of the

latter package.

Request

URI:http://<hostname>:<port>/platform/thing-model/api/v1/config/Configuration

HTTP Method:POST

Request Example

{ "schema": { "type": "ConfigurationPackage" }, "version": "1.0.0", "id": "core.automobiles", "dependencies": [], "description": { "en": "Automobiles package" }, "scope": "public", "services": { "dataService": { "thingTypes": [{ "name": "core.automobiles:ABC2Series", "description": { "en": "ABC 2 Series car" }, "propertyTypes": [{ "id": "engine", "description": { "en": "Engine Usage", "de": "Motornutzung" }, "propertySetType": "core.automobiles:Engine" }, { "id": "drive_fr", "description": { "en": "Drive Unit Front Right" }, "propertySetType": "core.automobiles:DriveUnit" }, { "id": "drive_fl", "description": { "en": "Drive Unit Front Left" }, "propertySetType": "core.automobiles:DriveUnit" }, { "id": "car", "description": { "en": "Car Usage" },

14 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

"propertySetType": "core.automobiles:Car" }, { "id": "wheel_fr", "description": { "en": "Wheel front right", "de": "vorderes rechtes Rad" }, "propertySetType": "core.automobiles:Wheel" }, { "id": "wheel_fl", "description": { "en": "Wheel front left", "de": "vorderes linkes Rad", "ru": " переднее левое колесо" }, "propertySetType": "core.automobiles:Wheel" }, { "id": "wheel_rr", "description": { "en": "Wheel rear right" }, "propertySetType": "core.automobiles:Wheel" }, { "id": "wheel_rl", "description": { "en": "Wheel rear left" }, "propertySetType": "core.automobiles:Wheel" }] }, { "name": "core.automobiles:ABCXSeries", "description": { "en": "ABC X Series Car" }, "propertyTypes": [{ "id": "engine", "description": { "en": "Engine Usage" }, "propertySetType": "core.automobiles:Engine" }, { "id": "drive_fr", "description": { "en": "Drive Unit Front Right" }, "propertySetType": "core.automobiles:DriveUnit" }, { "id": "drive_fl", "description": { "en": "Drive Unit Front Left" }, "propertySetType": "core.automobiles:DriveUnit" }, { "id": "car", "description": { "en": "Car Usage" }, "propertySetType": "core.automobiles:Car" }, { "id": "wheel_fr", "description": { "en": "Wheel front right" }, "propertySetType": "core.automobiles:Wheel" }, { "id": "wheel_fl", "description": { "en": "Wheel front left"

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 15

}, "propertySetType": "core.automobiles:Wheel" }, { "id": "wheel_rr", "description": { "en": "Wheel rear right" }, "propertySetType": "core.automobiles:Wheel" }, { "id": "wheel_rl", "description": { "en": "Wheel rear left" }, "propertySetType": "core.automobiles:Wheel" }] }], "propertySetTypes": [{ "name": "core.automobiles:Car", "description": { "en": "Sensory parameters for car" }, "dataCategory": "MasterData", "propertyTypes": [{ "value": { "id": "BodyStyle", "description": { "en": "Car body style" }, "type": "String", "length": "127", } }, { "value": { "id": "Class", "description": { "en": "Car Class" }, "type": "String", "length": "127", } }, { "value": { "id": "WheelBase", "description": { "en": "Car Wheel Base" }, "type": "Numeric", "length": "2", } }, { "value": { "id": "RegistrationNumber", "description": { "en": "Car Registration number", "de": "Registriernummer", "zh": "注册号码" }, "type": "String", "length": "127", } }, { "value": { "id": "Colour", "description": { "en": "Car Colour" }, "type": "String", "length": "127",

16 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

} }] }, { "name": "core.automobiles:Wheel", "description": { "en": "Sensory parameters for wheel" }, "dataCategory": "TimeSeriesData", "propertyTypes": [{ "value": { "id": "Pressure", "description": { "en": "Wheel pressure", "zh": "轮压", "de": "Raddruckes" }, "type": "Numeric", "length": "2", "unitOfMeasure": "PA" } }, { "value": { "id": "Temperature", "description": { "en": "Wheel temperature" }, "type": "Numeric", "length": "2" } }] }, { "name": "core.automobiles:DriveUnit", "description": { "en": "Sensory parameters for drive unit" }, "dataCategory": "TimeSeriesData", "propertyTypes": [{ "value": { "id": "RotationSpeed", "description": { "en": "Drive unit rotation speed" }, "type": "Numeric", "length": "2" } }, { "value": { "id": "PowerConsumption", "description": { "en": "Drive unit power consumption" }, "type": "Numeric", "length": "2" } }] }, { "name": "core.automobiles:Engine", "description": { "en": "Sensory parameters for engine" }, "dataCategory": "MasterData", "propertyTypes": [{ "value": { "id": "Type", "description": { "en": "Engine type" }, "type": "String",

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 17

"length": "127" } }, { "value": { "id": "Capacity", "description": { "en": "Engine capacity" }, "type": "Numeric", "length": "2", "unitOfMeasure": "MM" } }, { "value": { "id": "Torque", "description": { "en": "Engine torque" }, "type": "Numeric", "length": "2", "unitOfMeasure": "NM" } }, { "value": { "id": "Transmission", "description": { "en": "Engine transmission" }, "type": "String", "length": "254", "unitOfMeasure": "" } }] }] } } }

Request Properties

Package Object Properties

Table 2:

Property Type Mandatory Maximum Length Description

id string Yes 50 Configuration package identifier

dependencies Array of package name and version

No - List of dependent pack­ages relevant to this configuration package

description string No 60 Description of the con­figuration package for each language with the corresponding ISO lan­guage code

18 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Property Type Mandatory Maximum Length Description

scope string No Fixed Indicates the scope of the configuration pack­age. Permissible values are public, tenant, or private

version string Yes 9999.9999.9999 Indicates the version of the configuration pack­age. For example, 1.0.0, 1.0, or 1

Property Set Type Object Properties

Table 3:

Property Type Mandatory Maximum Length Description

name string Yes 81 Name of the property set type

description string No 60 Description of the property set type for each language with the corresponding ISO language code

dataCategory enum Yes - Data category of the property set type

propertyTypes Array of property types

No - Array of property types

Data Category Enumeration Values

Table 4:

Value Description

MasterData Indicates the property set type for storing master data

TimeSeriesData Indicates the property set type for storing time series data

Property Type Object Properties

Table 5:

Property Type Mandatory Maximum Length Description

id string Yes 30 Name of the property

type enum Yes 30 Type used by the property

length string Yes (For more in­formation on sup­ported data types, refer to Value Data Types for Property Types [page 28])

30 Storage length for the property specified as an integer value

description string No 60 Description of the property for each lan­guage with the corresponding ISO lan­guage code

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 19

Property Type Mandatory Maximum Length Description

unitOfMeasure string No 5 Indicates the unit of measure in which the property is measured

Thing Type Object Properties

Table 6:

Property Type Mandatory Maximum Length Description

name string Yes 81 Name of the thing type

description string No 60

propertyTypes Array of named property set type objects

No - Array of named property set types that belong to the thing type

Named Property Set Type Object Properties

Table 7:

Property Type Mandatory Maximum Length Description

id string Yes 30 Name of the property set

propertySetType string Yes 81 Name of the property set type referred

description string No 60 Description of the property for each lan­guage with the corresponding ISO lan­guage codeDescription of the thing type for each language with the correspond­ing ISO language code

Note● Description of the thing type for each language with the corresponding ISO languageIf the descriptions are

maintained in the requested language they are shown on the UIs of insight providers in the Asset Health Control Center or Asset Health Fact Sheet, and on the configuration UIs of insight providers.

Response

Format: JSON

Response Status and Error Codes

Table 8:

Code Description

201 Package created successfully

20 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

2.1.3 Read a Package

This configuration service is used to read the details contained within the specified package. The response returns the latest version of the package.

Request

URI:http://<hostname>:<port>/platform/thing-model/api/v1/config/Configuration('<id>')

HTTP Method:GET

Request Example

GET http://<hostname>:<port>/platform/thing-model/api/v1/config/Configuration('core.automobiles')

Response

Format: JSON

Response Status and Error Codes

Table 9:

Code Description

200 Package retrieved successfully

Response Example

{ "schema": { "type": "ConfigurationPackage" }, "version": "1.0.0", "id": "core.automobiles", "dependencies": [], "description": { "en": "Automobiles package" }, "scope": "public", "services": { "dataService": { "thingTypes": [{ "name": "core.automobiles:ABC2Series", "description": { "en": "ABC 2 Series car" }, "propertyTypes": [{ "id": "engine", "description": { "en": "Engine Usage", "de": "Motornutzung" },

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 21

"propertySetType": "core.automobiles:Engine" }, { "id": "drive_fr", "description": { "en": "Drive Unit Front Right" }, "propertySetType": "core.automobiles:DriveUnit" }, { "id": "drive_fl", "description": { "en": "Drive Unit Front Left" }, "propertySetType": "core.automobiles:DriveUnit" }, { "id": "car", "description": { "en": "Car Usage" }, "propertySetType": "core.automobiles:Car" }, { "id": "wheel_fr", "description": { "en": "Wheel front right", "de": "vorderes rechtes Rad" }, "propertySetType": "core.automobiles:Wheel" }, { "id": "wheel_fl", "description": { "en": "Wheel front left", "de": "vorderes linkes Rad", "ru": " переднее левое колесо" }, "propertySetType": "core.automobiles:Wheel" }, { "id": "wheel_rr", "description": { "en": "Wheel rear right" }, "propertySetType": "core.automobiles:Wheel" }, { "id": "wheel_rl", "description": { "en": "Wheel rear left" }, "propertySetType": "core.automobiles:Wheel" }] }, { "name": "core.automobiles:ABCXSeries", "description": { "en": "ABC X Series Car" }, "propertyTypes": [{ "id": "engine", "description": { "en": "Engine Usage" }, "propertySetType": "core.automobiles:Engine" }, { "id": "drive_fr", "description": { "en": "Drive Unit Front Right" }, "propertySetType": "core.automobiles:DriveUnit" }, { "id": "drive_fl", "description": { "en": "Drive Unit Front Left"

22 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

}, "propertySetType": "core.automobiles:DriveUnit" }, { "id": "car", "description": { "en": "Car Usage" }, "propertySetType": "core.automobiles:Car" }, { "id": "wheel_fr", "description": { "en": "Wheel front right" }, "propertySetType": "core.automobiles:Wheel" }, { "id": "wheel_fl", "description": { "en": "Wheel front left" }, "propertySetType": "core.automobiles:Wheel" }, { "id": "wheel_rr", "description": { "en": "Wheel rear right" }, "propertySetType": "core.automobiles:Wheel" }, { "id": "wheel_rl", "description": { "en": "Wheel rear left" }, "propertySetType": "core.automobiles:Wheel" }] }], "propertySetTypes": [{ "name": "core.automobiles:Car", "description": { "en": "Sensory parameters for car" }, "dataCategory": "MasterData", "propertyTypes": [{ "value": { "id": "BodyStyle", "description": { "en": "Car body style" }, "type": "String", "length": "127" } }, { "value": { "id": "Class", "description": { "en": "Car Class" }, "type": "String", "length": "127" } }, { "value": { "id": "WheelBase", "description": { "en": "Car Wheel Base" }, "type": "Numeric", "length": "2" } }, {

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 23

"value": { "id": "RegistrationNumber", "description": { "en": "Car Registration number", "de": "Registrationsnummer", "zh": "注册号码" }, "type": "String", "length": "127" } }, { "value": { "id": "Colour", "description": { "en": "Car Colour" }, "type": "String", "length": "127" } }] }, { "name": "core.automobiles:Wheel", "description": { "en": "Sensory parameters for wheel" }, "dataCategory": "TimeSeriesData", "propertyTypes": [{ "value": { "id": "Pressure", "description": { "en": "Wheel pressure", "zh": "轮压", "de": "Raddruck" }, "type": "Numeric", "length": "2", "unitOfMeasure": "PA" } }, { "value": { "id": "Temperature", "description": { "en": "Wheel temperature" }, "type": "Numeric", "length": "2" } }] }, { "name": "core.automobiles:DriveUnit", "description": { "en": "Sensory parameters for drive unit" }, "dataCategory": "TimeSeriesData", "propertyTypes": [{ "value": { "id": "RotationSpeed", "description": { "en": "Drive unit rotation speed" }, "type": "Numeric", "length": "2" } }, { "value": { "id": "PowerConsumption", "description": { "en": "Drive unit power consumption"

24 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

}, "type": "Numeric", "length": "2" } }] }, { "name": "core.automobiles:Engine", "description": { "en": "Sensory parameters for engine" }, "dataCategory": "MasterData", "propertyTypes": [{ "value": { "id": "Type", "description": { "en": "Engine type" }, "type": "String", "length": "127" } }, { "value": { "id": "Capacity", "description": { "en": "Engine capacity" }, "type": "Numeric", "length": "2", "unitOfMeasure": "MM" } }, { "value": { "id": "Torque", "description": { "en": "Engine torque" }, "type": "Numeric", "length": "2", "unitOfMeasure": "NM" } }, { "value": { "id": "Transmission", "description": { "en": "Engine transmission" }, "type": "String", "length": "254", "unitOfMeasure": "" } }] }] } } }

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 25

2.1.4 Update a Package

This configuration service is used to update an existing package. When you update a package, you must incrementally change the version number.

NoteYou must provide the complete payload even if you do not have any changes to the existing thing type or property set type definitions.

You can update a package in the following scenarios:

Table 10:

Object Thing Type Property Set Type

Scenario

Add Yes Yes

Update Yes

NoteYou can update a thing type by:

● Adding new property sets.● Deleting property sets● Modifying property sets

You can update a thing type only if it is not used by any thing.

Yes

NoteYou can update a property set type by:

● Adding new proper­ties.

● Deleting properties● Modifying properties

You can update a prop­erty set type only if it is not used by any thing.

Delete Yes

NoteYou can delete a thing type only if it is not used by any thing.

Yes

NoteYou can delete a property set type only if it is not used by any thing.

You can update a package by changing the scope of the package as follows:

Table 11:

Old Scope New Scope Restrictions

Public Private Possible only if there are no dependent packages

Private Public No restrictions

26 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Request

URI:http://<hostname>:<port>/platform/thing-model/api/v1/config/Configuration('<id>')

HTTP Method:POST

Response

Format: JSON

Response Status and Error Codes

Table 12:

Code Description

201 Package updated successfully

2.1.5 Delete a Package

This configuration service is used to delete a package.

NoteYou cannot delete a package under the following conditions:

● Other packages depend on this package.● Existing things that reference thing types belonging to the package being deleted.

Request

URI:http://<hostname>:<port>/platform/thing-model/api/v1/config/Configuration('<id>')

HTTP Method:DELETE

Request Example

DELETE http://<hostname>:<port>/platform/thing-model/api/v1/config/Configuration(‘core.automobiles’)

Response

Format: JSON

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 27

Response Status and Error Codes

Table 13:

Code Description

204 Package deleted successfully

2.1.6 Value Data Types for Property Types

The following tabulation shows the value data types available for the property types.

Table 14:

Value Data Type Data Type Length Mandatory Value

(Valid for data stored in DATA.MASTERDATA)

String

String

NoteMaximum permissible length is 254 charac­ters.

You can increase the length for a property type even if the data already exists for this property. However, you cannot decrease the length for a property regardless of whether the data exists or not.

No Default length is 127 characters.

(Valid for data stored in DATA.READINGS)

Numeric, NumericFlexi­ble

Double

NoteThis is used to store 64-bit floating point val­ues.

No Value range is -1.7976931348623157E308 to 1.7976931348623157E308

(Valid for data stored in DATA.READINGS)

Boolean

Double No Values supported are 1 and 0.

NoteYou cannot change a Boolean data type to another data type and vice versa.

(Valid for data stored in DATA.LOCATIONS)

GeoLocation

hana.ST_GEOMETRY(4326) No For more information, see SAP HANA Spatial Reference.

28 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Examples for Property Definition

Table 15:

Value Data Type Payload Type Example

NumericFlexible Configuration "value": { "id": "MachineReading","type": "NumericFlexible" }

Boolean Configuration "value": { "id": "MachineRunningStatus","type": "Boolean" }

String (without a specified length)

Configuration "value": { "id": "Name","type": "String" }

String (with a speci­fied length)

Configuration "value": { "id": "Name","type": "String","length": "60" }

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 29

2.1.7 Naming Conventions for IoT Objects

You must adhere to the following naming conventions and conditions while creating objects for the SAP IoT Application Services.

Table 16:

Object Maximum Length Naming Conditions

Package Char 50 ● Must be a combination of alphanu­meric characters and dots (dots to be used only to separate seg­ments).

● Dots have to be followed by an al­phanumeric character.

● Prefix the package name with the tenant name separated by a dot.

● Do not start the name with a dot or digit.

● Any segment length has to be at least 2 characters.Second segment length has to be at least 3 characters.The name must contain a minimum of two segments.

● The name should be in lowercase.

30 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Object Maximum Length Naming Conditions

Thing Type

Property Set Type

Property Set Type Name

Char 30 ● Can be a combination of alphanu­meric characters and underscore.

● Do not start the name with a digit or an underscore.

● Length should be at least 3 charac­ters.

● Camel case is generally allowed, however there is a uniqueness check carried out against textual case conflicts:Two names with same characters of different textual case is not allowed. For example: A value "AbcDef" is not accepted when there is another value "abcDEF" that exists.Check on uniqueness ignoring case like SELECT toLower( name) WHERE NAME = toL­ower(new_name)

● Names have to be unique for a given set of property set types, thing types.

● The property set type and thing type names names must be fully qualified.

● Verify that a colon is used to sepa­rate a namespace and name. The syntax is: <namespace>:<name>. For example: com.sap.iotas:Fly­Wheel

● Each fully qualified name needs a namespace, colon as a separator and name.

Property Char 30 ● Property names must be unique within a thing type and property set type.

● No spaces can be used in the prop­erty name.

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 31

2.1.8 HTTP Status Codes for Configuration Services

List of status codes for configuration services

In the following table, you find the list of HTTP status codes that are used by the configuration services:

Table 17:

POST GET (Single value) GET (Collection) DELETE Description

201 200 200 204 Success

400 400 400 400 Bad request (for exam­ple: header field miss­ing, wrong filter, valida­tion failed)

403 403 403 403 Forbidden (scope(s) not assigned for the user)

n/a 404 n/a 404 Not found

500 500 500 500 Internal server error

2.1.9 Thing Services

The thing services allow you to create, update, and delete things that are instances of the thing types modeled using the configuration services.

A thing constitutes a single tangible object.

2.1.10 Create a Thing

This thing service is used to create a thing that is an instance of a thing type.

Note● A thing has exactly one thing type.● The thing type has to be a fully qualified name that is prefixed with the package name. For example,

core.automobiles:ABCXSeries001.

Request

URI:http://<hostname>:<port>/platform/thing-model/api/v1/thing/Things

32 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

HTTP Method:POST

Request Example

POST http://<hostname>:<port>/platform/thing-model/api/v1/thing/Things

{ "_externalId": "ABCXSeries001", "_name": "ABCXSeries001", "_description": { "en": "English" }, "_thingType": [ "core.automobiles:ABCXSeries" ] }

Request Properties

Thing Object Properties

Table 18:

Property Type Mandatory Description

_id string No Internal identifier for a Thing.

_externalId string Yes Thing identifier from an external system. This is a unique iden­tifier within a tenant.

_name string Yes Name of the thing.

_description string Yes Description of a Thing in the specified language as defined in ISO Language Codes [page 38]. The ISO code for the lan­guage is used here.

_thingType Array of thing types

Yes Array of thing types for a thing. It must correspond to one of the thing types found in a package. Currently, only one ele­ment is supported

Response

Format: JSON

Response Status and Error Codes

Table 19:

Code Description

201 Thing created successfully

NoteThe URL of the thing created is returned in the Location Header of the response.

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 33

2.1.11 Read a Thing

This Thing service is used to read the generic fields and the thing type associated with the specified Thing.

Request

URI:http://<hostname>:<port>/platform/thing-model/api/v1/thing/Things('<id>')

HTTP Method:GET

Request Header Parameters

Table 20:

Parameter Required Description

Accept-Language No Language of the Thing description. The default language is en.

Request Example

GET http://<hostname>:<port>/platform/thing-model/api/v1/thing/Things('<id>')

Response

Format: JSON

Response Properties

Table 21:

Property Type Description

_id string Internal identifier for a thing.

_externalId string Thing identifier from an external system.

_name string Name of the thing.

_description string Description of a thing in a specified language.

_thingType Array of thing types Array of thing types for the thing.

Response Status and Error Codes

Table 22:

Code Description

200 Thing retrieved successfully

Response Example

{ "_id": "<thingID>",

34 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

"_externalId": "ABCXSeries001", "_name": "ABCXSeries001", "_description": { "en": "English" }, "_thingType": [ "core.automobiles:ABCXSeries" ] }

2.1.12 Read All Things

This Thing service is used to read all the available things.

Request

URI:http://<hostname>:<port>/platform/thing-model/api/v1/thing/Things

HTTP Method:GET

Request Header Parameters

Table 23:

Parameter Required Description

Accept-Language No Language of the Thing description. The default language is en.

Query String Request Parameters

Table 24:

Parameter Required Type Description

$top No Integer Corresponds to the number of records to include in the result set.

$skip No Integer Corresponds to the number of records to exclude from the result set.

$count No Boolean Corresponds to the total number of thing objects available based on the current user's authorizations; permissible values are true and false.

The following results apply, if this parameter is used in conjunction with the other query parameters:

● If you use this with the $top and $skip pa­rameters, the result contains the total count of thing objects available.

● If you use this with $filter parameter, the result contains the total count of thing objects based on the defined filter condition.

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 35

Parameter Required Type Description

$orderby No String Corresponds to the field name to be used for sorting the result set in ascending order; valid fields are _id, _name and _externalId.

To sort the result set, use asc for the ascending or­der and desc for the descending order.

$filter No String Corresponds to the filter condition to be applied; valid fields are _id, _name, _externalId, _thingType. The filter operators supported are eq and ne.

Request Example

GET http://<hostname>:<port>/platform/thing-model/api/v1/thing/Things?$filter=_thingType eq 'core.automobiles:ABCXSeries'&$count=true

Retrieves all things where the thing type is "core.automobiles:ABCXSeries".

Response

Format: JSON

Response Properties

Table 25:

Property Type Description

value Array of thing objects Array of things returned upon application of the filter conditions.

Response Status and Error Codes

Table 26:

Code Description

200 Things retrieved successfully

Response Example

{ "count": 1, "value": [ { "_id": "<thingID>", "_externalId": "ABCXSeries001", "_name": "ABCXSeries001", "_description": { "en": "English" }, "_thingType": [ "core.automobiles:ABCXSeries" ] } ] }

36 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

2.1.13 Update a Thing

This Thing service is used to update the Thing with new attributes such as external ID or name.

Request

URI:http://<hostname>:<port>/platform/thing-model/api/v1/thing/Things('<id>')

HTTP Method:POST

Request Example

POST http://<hostname>:<port>/platform/thing-model/api/v1/thing/Things('<id>') { "_externalId": "ABCXSeries001", "_name": "ABCXSeries001", "_description": { "en": "English" }, "_thingType": [ "core.automobiles:ABCXSeries" ] }

Response

Format: JSON

Response Status and Error Codes

Table 27:

Code Description

201 Thing updated successfully

2.1.14 Delete a Thing

This Thing service is used to delete the specified thing.

Request

URI:http://<hostname>:<port>/platform/thing-model/api/v1/thing/Things('<id>')

HTTP Method:DELETE

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 37

Request Example

DELETE http://<hostname>:<port>/platform/thing-model/api/v1/thing/Things('<id>')

Response

Format: JSON

Response Status and Error Codes

Table 28:

Code Description

204 Thing deleted successfully

2.1.15 ISO Language Codes

List of supported language codes for IoT Application Services

In the following table, you find the list of supported languages for IoT Application Services and the corresponding ISO codes that you need to tell the system which language shall be used in a particular service request.

Table 29: ISO Language Codes

Description ISO Code

Afrikaans af

Arabic ar

Bulgarian bg

Catalan ca

Chinese zh

Croatian hr

Czech cs

Danish da

Dutch nl

English en

Estonian et

38 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Description ISO Code

Finnish fi

French fr

German de

Greek el

Hebrew he

Hindi hi

Hungarian hu

Icelandic is

Indonesian id

Italian it

Japanese ja

Korean ko

Latvian lv

Lithuanian lt

Malaysian ms

Norwegian no

Polish pl

Portuguese pt

Romanian ro

Russian ru

Serbian sr

Slovakian sk

Slovenian sl

Spanish es

Swedish sv

Thai th

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 39

Description ISO Code

Turkish tr

Ukrainian uk

Vietnamese vi

2.2 Configuring Data Science Services Using Configuration UIs

As an alternative to REST APIs, you can also decide to configure data science services using the configuration UIs.

Prerequisites

The following role collection is assigned to your user:

● <pdms-datascience-role>

For more information about role collections, see the chapters Maintaining Roles and Users in SAP HANA and Role Templates for SAP Predictive Maintenance and Service, on-premise edition in the guide Installation of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02.

● Maintaining Roles and Users in SAP HANA● Role Templates for SAP Predictive Maintenance and Service, on-premise edition

Context

NoteThe configuration UIs to configure data science services support the following languages:

● English

Procedure

1. Open the URL https://<hostname>:<port>/app/launchpad/index.html and log on with your user.

2. In the group Manage Data Science Services, open the app Model, Training, and Scoring.

3. To create a model, click Create Model.

40 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

4. Fill in all required fields in the Model section.

For more information see, Entries to Create a Model [page 41].5. Save your model

NoteYou can delete a model also after it has already been successfully trained and scored. To ensure the traceability of already created score,s models are not removed from the system but set to inactive, meaning they do not show up any more. You can inspect a deleted model by directly accessing the database.

6. After you have created a model, you can train it in the training section.a. Choose the model you want to train from the model search pane.b. Click Train to get to the training section.c. Define the time frame of the training.d. Click Train Model.

You can check the training log and see the training job ID in the Job Log URL column.7. After you have trained a model, you can score it in the scoring section.

NoteThe latest version of a model can be scored and scores must be numerical.

a. Choose the model you want to score from the model search pane.b. Click Score Model.

You can check the scoring status in the Scoring Data section of the scored model. To see the scoring job ID, click on the job log URL in the Job Log URL column.

Extensibility

You can also extend the predelivered data science services by creating your own algorithms. For more information about extending data science services, see the guide Extending SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02.

2.2.1 Entries to Create a Model

Table 30: Entries to Create a Model

Entry Field Mandatory Description

Name x Model name

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 41

Entry Field Mandatory Description

Description x Model description

Table for Training x Name of the data fusion view in SAP HANA used for training. This view is exe­cuted whenever a model is trained, and is additionally filtered by a time frame defined in the model training call. For more information about the time frame, see the chapters Configuring Data Sci­ence Services Using Configuration UIs [page 40] and Train a Model [page 59].

For more information about creating data fusion views, see the chapter Creat­ing Data Fusion Views for Data Science Services in the guide Installation of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02.

Table for Scoring x Name of the data fusion view in SAP HANA used for scoring. This view is exe­cuted whenever a model is scored ,and all rows returned are processed by the data science service.

For more information about creating data fusion views, see the chapter Creat­ing Data Fusion Views for Data Science Services in the guide Installation of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02.

Property Set Type x ID of the property set type for which you want to create the model.

To get the property set type ID, use the REST API described in the chapter Read a Package [page 21].

42 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Entry Field Mandatory Description

Data Science Service x The namespace in which the model is created, and the data science service on which the model is based

The namespace com.sap.pdms.datascience is pre­configured and cannot be changed.

You can choose among the following data science services:

● EMDDistance-based failure analysis us­ing Earth Mover’s Distance

● PCAAnomaly detection with Principal Component Analysis

● RULRemaining Useful Life prediction us­ing Weibull

For more information about the data sci­ence services, see the chapter Data Sci­ence Services in the guide Getting Started with SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02.

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 43

Entry Field Mandatory Description

Learner Type x Machine learning style that serves as metadata to give information for what the data service is used

Depending on the data science service you use, you are provided with the fol­lowing algorithms:

● CLASSIFICATIONChoose this learner type if data are being used to predict a category, for example to classify between good and defect.

● REGRESSIONChoose this learner to predict a value, for example a health score.

● SURVIVALChoose this learner type to the ex­pected duration of time until a cer­tain evet such as the breakdown of an asset will happen.

● RULESChoose this learner type to include rules in the machine learning proc­ess.

● UNSUPERVISEDChoose this learner type if data needs to be organized or if its struc­ture needs to be described.

NoteWhen you use this learner type, maintain independent variables in the Dependent Variables field. The variables will be handled like independent variables. Make sure that you do not enter the same variables as Independent Variables in the section Model-Generic Data.

● OTHER

44 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Entry Field Mandatory Description

Dependent Variable - The variable or attribute that you want to train and score on

NoteDependent variables must differ from independent variables.

Model-Generic Data x Independent variables

NoteIndependent variables must differ from dependent variables.

These variables are the names of the columns that you want to be used as in­put to the model.

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 45

Entry Field Mandatory Description

Hyperparameters - Model-specific parameters

NoteThese parameters differ according to the data science service you want to use for the model.

● RUL○ nameAgeColumn

Name of the column in the in­put data containing the age in­formation. This age information can either be the age at that an asset failed, or the current age of an asset that is still working. This parameter is mandatory.

NoteMake sure that the age statements use the same time unit such as years, hours, or days.

○ nameFailureColumnName of the column in the in­put data containing the failure information. This parameter is mandatory

○ predictionHorizonInteger value specifying the pe­riod for which the failure proba­bility should be calculated.

ExampleYou want to calculate the probability of failure for the next month starting from to­day.

NoteMake sure that the time units are the same as for the age statements of assets

46 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Entry Field Mandatory Description

unit such as years, hours, or days.

● PCA○ k

Integer specifying the width of the running median window.

NoteThis value must be an odd number.

Use k = 3 for minimal robust smoothing so that isolated out­liers are eliminated.

○ group.byName(s) of the column(s) used for grouping data rows. This parameter is mandatory

○ sort.byName(s) of the column(s) used for sorting data rows. This pa­rameter is mandatory

● EMD○ bins

Positive integer for discretiza­tion that is not zero. The de­fault value is 20.

○ group.byColumn name of data to be ex­cluded in contingency table computation. It contains the name(s) of the column(s) used for grouping data. This param­eter is mandatory

How to Deal With Property Set Type IDs

If two models that score the same Thing have the same PropertySetTypeId, this results in ambiguous entries in the READINGS table. The reason is that the READINGS table does not work with keys. Insight providers might thus not be able to resolve scores in the Asset Health Control Center.

For more information about the READINGS table, see the chapter Data Model in the guide Installation of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02.

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 47

Please make sure that you either use one property set type ID per model, or you use the same property set type ID for different models only if the models score different Things related to this ID or Things of different Thing types related to this ID.

ExampleThe following sample scenarios illustrate a correct usage of the same property set type ID (PST ID) used for different models:

Things of Different Thing Types

Model A PST ID temperature Thing Type Battery Possibly all Things having the given Thing Type

Model B PST ID temperature Thing Type AirCondition Possibly all Things having the given Thing Type

Different Things of the Same Thing Type

Model A PST ID temperature Thing Type Battery Things 1-5

Model B PST ID temperature Thing Type Battery Things 6-9

Related Information

Configuring Data Science Services Using Configuration UIs [page 40]

2.3 Configuring Data Science Services Using REST APIs

REST APIs for configuring, training, and scoring models according to the algorithms for principal component analysis (PCA), earth mover’s distance (EMD), or Weibull.

Permissions: The following role collection is assigned to your user:

● <pdms-datascience-role>

For more information about role collections, see the chapters Maintaining Roles and Users in SAP HANA and Role Templates for SAP Predictive Maintenance and Service, on-premise edition in the guide Installation of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02.

To configure data science services, proceed as follows:

1. Create models as described in the chapter Create a Model [page 49].You can also do the following:○ Read a Model [page 55]○ Read All Models [page 56]○ Update a Model [page 58]

2. Train models as described in the chapter Train a Model [page 59].3. Score a model as described in the chapter Score a Model [page 60].

48 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

NoteThe latest version of a model can be scored and scores must be numerical.

4. Check the training status or scoring status of a model as explained in the chapter Check the Status of a Training Job or Scoring Job [page 61].You can also do the following:○ Check the Status of All Jobs [page 63]○ Check a Job Log [page 62]

5. (If required) Delete a model as described in the chapter Delete a Model [page 64].6. (Optional) You can retrieve information about all data science services as described in the chapter Read

Information About All Data Science Services [page 65].

Extensibility

You can also extend the predelivered data science services by creating your own algorithms. For more information about extending data science services, see the guide Extending SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02.

2.3.1 Create a Model

Configure a model.

Request

FormatJSON

URI: https://<hostname>:<router port>/datascience/api/v1/models

HTTP Method: POST

Request Example

{ "namespace": "com.sap.pdms.datascience", "dataScienceService": "PCA", "name": "My_Super_Model", "description": "Some model description.", "scoreTable": "THING_ANALYSIS_10K", "trainTable": "THING_ANALYSIS_10K", "dependentVariable": "SENSOR5", "propertySetTypeId": "somePSTID", "independentVariables": [ "BATTERY_VOLTAGE", "Timestamp", "ThingType" ],

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 49

"hyperParameters": [ { "key": "k", "values": ["3"] }, { "key": "sort.by", "values": ["Timestamp"] }, { "key": "group.by", "values": ["ThingType"] } ] }

Request ParametersTable 31:

Parameter Required Description

namespace Yes Namespace of the data science service in which you want to cre­ate the model

NoteThe namespace com.sap.pdms.datascience is reserved for algorithms that are delivered by SAP. If custom algorithms are added to the predelivered algorithms, other namespaces are available.

dataScienceService Yes Data science service that contains the algorithms that you want to use for your model

You can choose among the following data science services:

● PCA● EMD● Weibull

name Yes Model name

description Yes Model description

scoreTable Yes Name of the data fusion view in SAP HANA used for scoring. This view is executed whenever a model is scored ,and all rows re­turned are processed by the data science service.

For more information about creating data fusion views, see the chapter Creating Data Fusion Views for Data Science Services in the guide Installation of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02.

50 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Parameter Required Description

trainTable Yes Name of the data fusion view in SAP HANA used for training. This view is executed whenever a model is trained, and is additionally filtered by a time frame defined in the model training call. For more information about the time frame, see the chapters Config­uring Data Science Services Using Configuration UIs [page 40] and Train a Model [page 59].

For more information about creating data fusion views, see the chapter Creating Data Fusion Views for Data Science Services in the guide Installation of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02.

dependentVariable No The variable or attribute that you want to train and score on

propertySetTypeId Yes ID of the property set type for which you want to create the model.

To get the property set type ID, use the REST API described in the chapter Read a Package [page 21].

independentVariables

Yes Names of the columns to be used as input to the model

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 51

Parameter Required Description

hyperParameters No Parameters specific to the model you configure

NoteThese parameters differ according to the data science service you want to use for the model.

● Weibull○ nameAgeColumn

Name of the column in the input data containing the age information. This age information can either be the age at that an asset failed, or the current age of an asset that is still working. This parameter is mandatory.

NoteMake sure that the age statements use the same time unit such as years, hours, or days.

○ nameFailureColumnName of the column in the input data containing the failure information. This parameter is mandatory

○ predictionHorizonInteger value specifying the period for which the failure probability should be calculated.

ExampleYou want to calculate the probability of failure for the next month starting from today.

NoteMake sure that the time units are the same as for the age statements of assets unit such as years, hours, or days.

● PCA○ k

Integer specifying the width of the running median win­dow.

NoteThis value must be an odd number.

Use k = 3 for minimal robust smoothing so that isolated outliers are eliminated.

○ group.by

52 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Parameter Required Description

Name(s) of the column(s) used for grouping data rows. This parameter is mandatory

○ sort.byName(s) of the column(s) used for sorting data rows. This parameter is mandatory

● EMD○ bins

Positive integer for discretization that is not zero. The default value is 20.

○ group.byColumn name of data to be excluded in contingency ta­ble computation. It contains the name(s) of the col­umn(s) used for grouping data. This parameter is man­datory

How to Deal With Property Set Type IDs

If two models that score the same Thing have the same PropertySetTypeId, this results in ambiguous entries in the READINGS: table. The reason is that the READINGS table does not work with keys. Insight providers might thus not be able to resolve scores in the Asset Health Control Center.

For more information about the READINGS table, see the chapter Data Model in the guide Installation of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02.

Please make sure that you either use one property set type ID per model, or you use the same property set type ID for different models only if the models score different Things related to this ID or Things of different Thing types related to this ID.

ExampleThe following sample scenarios illustrate a correct usage of the same property set type ID (PST ID) used for different models:

Things of Different Thing Types

Model A PST ID temperature Thing Type Battery Possibly all Things having the given Thing Type

Model B PST ID temperature Thing Type AirCondition Possibly all Things having the given Thing Type

Different Things of the Same Thing Type

Model A PST ID temperature Thing Type Battery Things 1-5

Model B PST ID temperature Thing Type Battery Things 6-9

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 53

Response

Format: JSON

Response Example

{ "modelId": "84A1B2570DC8A002E200E132EE5B38AA", "createdOn": "2016-08-16 08:37:43.3020000", "createdBy": "SomeUser", "modelConfiguration": { "namespace": "com.sap.pdms.datascience", "dataScienceService": "PCA", "name": "My_Super_Model", "description": "Some model description.", "trainTable": "THING_ANALYSIS_10K", "scoreTable": "THING_ANALYSIS_10K", "propertySetTypeId": "somePSTID", "independentVariables": [ "BATTERY_VOLTAGE", "Timestamp", "ThingType" ], "dependentVariable": "SENSOR5", "hyperParameters": [ { "key": "group.by", "values": [ "ThingType" ] }, { "key": "k", "values": [ 3 ] }, { "key": "sort.by", "values": [ "Timestamp" ] } ] }}

Response Status and Error Codes

Table 32:

Category Code Description

Conflict 409 A model with the same name exists.

Bad request 409 The data science service does not exist in the namespace.

400 Invalid values were entered.

Internal server error 500 An internal server error occurred.

54 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Related Information

Configuring Data Science Services Using REST APIs [page 48]Read a Model [page 55]Read All Models [page 56]Update a Model [page 58]Train a Model [page 59]Delete a Model [page 64]

2.3.1.1 Read a Model

Retrieve the configuration of a specific model.

Request

Format: JSON

URI: https://<hostname>:<router port>/datascience/api/v1/models/<modelId>

HTTP Method: GET

Response

Response Example

{ "modelId": "84A1B2570DC8A002E200E132EE5B38AA", "createdOn": "2016-08-16 08:37:43.3020000", "versions": [ { "modelId": "84A1B2570DC8A002E200E132EE5B38AA", "modelVersion": 1, "from": "2014-01-01 08:15:00.500", "to": "2018-01-01 08:15:00.500", "createdOn": "2016-08-16 07:23:12.761" } ], "modelConfiguration": { "namespace": "com.sap.pdms.datascience", "dataScienceService": "PCA", "name": "NewModelName", "description": "NewModelDescription", "trainTable": "THING_ANALYSIS_10K", "scoreTable": "THING_ANALYSIS_10K", "independentVariables": [ "BATTERY_VOLTAGE", "Timestamp", "ThingType"

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 55

], "dependentVariable": "SENSOR5", "hyperParameters": [ { "key": "group.by", "values": [ "ThingType" ] }, { "key": "k", "values": [ 3 ] }, { "key": "sort.by", "values": [ "Timestamp" ] } ], "createdBy": "SOMECREATOR", "propertySetTypeId": "somePSTID" } }

Response Status and Error Codes

Table 33:

Category Code Description

Not found 404 No model with the specified ID exists.

Internal server error 500 An internal server error occurred.

Related Information

Configuring Data Science Services Using REST APIs [page 48]Create a Model [page 49]

2.3.1.2 Read All Models

Retrieve the configuration of all models.

Request

Format: JSON

URI: https://<hostname>:<router port>/datascience/api/v1/models

56 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

HTTP Method: GET

Response

Response Example

[ { "modelId": "8466B2570DC8A002E200E132EE5B38AA", "createdOn": "2016-08-16 08:00:40.6880000", "modelConfiguration": { "namespace": "com.sap.pdms.datascience", "dataScienceService": "PCA", "name": "SOME_MODEL_NAME1471334439998", "description": "Some description.", "trainTable": "THING_ANALYSIS_10K", "scoreTable": "THING_ANALYSIS_10K", "independentVariables": [ "BATTERY_CURRENT", "BATTERY_VOLTAGE", "ThingType", "Timestamp" ], "dependentVariable": "SENSOR5", "hyperParameters": [ { "key": "group.by", "values": [ "ThingType" ] }, { "key": "sort.by", "values": [ "Timestamp" ] } ], "createdBy": "SOMECREATOR", "propertySetTypeId": "somePSTID" } }, ...]

Response Status and Error Codes

Table 34:

Category Code Description

Internal server error 500 An internal server error occurred.

Related Information

Configuring Data Science Services Using REST APIs [page 48]

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 57

Create a Model [page 49]

2.3.1.3 Update a Model

Update the name and description of a model.

NoteOnly the model name and the model description can be updated. All other properties, if provided, are ignored.

Request

Format: JSON

URI: https://<hostname>:<router port>/datascience/api/v1/models/<modelId>

HTTP Method: PUT

Request Example

{ "name": "<NewModelName>", "description": "<NewModelDescription>" }

Response

NoteWhen no content is displayed after you have sent the REST call, the model is updated.

Response Status and Error Codes

Table 35:

Category Code Description

Not found 404 No model with the specified ID exists.

Bad request 400 Invalid values were entered.

58 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Related Information

Configuring Data Science Services Using REST APIs [page 48]Train a Model [page 59]Delete a Model [page 64]

2.3.2 Train a Model

Train or retrain a specific model.

Request

Format: JSON

URI: https://<hostname>:<router port>/datascience/api/v1/models/train/<modelId>

HTTP Method: POST

Request Example

{ "from": "2014-01-01 08:15:00.500", "to": "2015-01-01 08:15:00.500" }

Request ParametersTable 36:

Parameter Required Description

from Yes Starting point of the training time interval

to Yes End point of the training time interval

Response

Response Example

{ "modelId": "someId" "currentVersion": 1, "jobId": "69ECB2570DC8A002E200E132EE5B38AA", "jobType": "TRAINING", "propertySetTypeId": "somePSTID", "createdOn": "2016-08-16 07:23:14.625", "taskName": "SAP_PDMS_DSS_FUSION_SCHEMA.TASK_TRAINING_69ECB2570DC8A002E200E132EE5B38AA"}

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 59

Response Status and Error Codes

Table 37:

Category Code Description

Validation error or bad request 400 Invalid values were entered.

Not found 404 No model with the specified ID exists.

Internal server error 500 An internal server error occurred.

Related Information

Configuring Data Science Services Using REST APIs [page 48]Check the Status of a Training Job or Scoring Job [page 61]Score a Model [page 60]

2.3.3 Score a Model

Score a specific model.

Request

NoteThe latest version of a model can be scored and scores must be numerical.

Format: JSON

URI: https://<hostname>:<router port>/datascience/api/v1/models/score/<modelId>

HTTP Method: POST

Response

Response Example

{ "modelId": "AC43CE57085D4F01E200B7C915682242", "currentVersion": 3, "jobId": "FADACE57C9874F01E200B7C915682242",

60 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

"jobType": "SCORING", "propertySetTypeId": "somePSTID", "createdOn": "2016-09-06 07:21:33.827", "taskName": "SAP_PDMS_DSS_FUSION_SCHEMA.TASK_SCORING_FADACE57C9874F01E200B7C915682242"}

Response Status and Error Codes

Table 38:

Category Code Description

Bad request 400 A model that is to be scored was not trained beforehand.

Not found 404 No model with the specified ID exists.

Internal server error 500 An internal server error occurred.

Related Information

Configuring Data Science Services Using REST APIs [page 48]Check the Status of a Training Job or Scoring Job [page 61]

2.3.4 Check the Status of a Training Job or Scoring Job

Retrieve status of a specific job.

Request

Format: JSON

URI: https://<hostname>:<router port>/datascience/api/v1/jobs/<jobId>

HTTP Method: GET

Response

Response Example

{ "modelId": "A566B2570DC8A002E200E132EE5B38AA", "versionId": 1, "id": "C166B2570DC8A002E200E132EE5B38AA",

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 61

"type": "TRAINING", "propertySetTypeId": "somePSTID", "status": "COMPLETED", "createdOn": "2016-08-16 06:00:44.974", "lastUpdatedOn": "2016-08-16 06:00:46.273", "jobLogUrl": "http(s)://<host>:<port>/datascience-so/api/v1/jobs/C166B2570DC8A002E200E132EE5B38AA/C166B2570DC8A002E200E132EE5B38AA/job-log" }

Response Status and Error Codes

Table 39:

Category Code Description

Internal server error 500 An internal server error occurred.

Related Information

Configuring Data Science Services Using REST APIs [page 48]Check a Job Log [page 62]Check the Status of All Jobs [page 63]

2.3.4.1 Check a Job Log

Request

Format: JSON

URI: https://<hostname>:<router port>/datascience/api/v1/jobs/<jobId>/job-log

HTTP Method: GET

Response

Response Example

Response Status and Error Codes

62 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Table 40:

Category Code Description

Not found 404 No job log for the specified job ID exists.

Internal server error 500 An internal server error occurred.

2.3.4.2 Check the Status of All Jobs

Retrieve status of all jobs.

Request

Format: JSON

URI: https://<hostname>:<router port>/datascience/api/v1/jobs

HTTP Method: GET

Response

Response Example

[ { "modelId": "A566B2570DC8A002E200E132EE5B38AA", "versionId": 1, "id": "C166B2570DC8A002E200E132EE5B38AA", "type": "TRAINING", "propertySetTypeId": "somePSTID", "status": "COMPLETED", "createdOn": "2016-08-16 06:00:44.974", "lastUpdatedOn": "2016-08-16 06:00:46.273", "jobLogUrl": "http(s)://<host>:<port>/datascience-so/api/v1/jobs/C166B2570DC8A002E200E132EE5B38AA/job-log" }, { "modelId": "84A1B2570DC8A002E200E132EE5B38AA", "versionId": 1, "id": "69ECB2570DC8A002E200E132EE5B38AA", "type": "TRAINING", "propertySetTypeId": "somePSTID", "status": "COMPLETED", "createdOn": "2016-08-16 07:23:14.625", "lastUpdatedOn": "2016-08-16 07:23:16.540", "jobLogUrl": "http(s)://<host>:<port>/datascience-so/api/v1/jobs/69ECB2570DC8A002E200E132EE5B38AA/job-log" }, ...]

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 63

Response Status and Error Codes

Table 41:

Category Code Description

Internal server error 500 An internal server error occurred.

Related Information

Configuring Data Science Services Using REST APIs [page 48]

2.3.5 Delete a Model

Delete a model that is not needed any longer.

Request

Format: JSON

URI: https://<hostname>:<router port>/datascience/api/v1/models/<modelId>

HTTP Method: DELETE

NoteYou can delete a model also after it has already been successfully trained and scored. To ensure the traceability of already created score,s models are not removed from the system but set to inactive, meaning they do not show up any more. You can inspect a deleted model by directly accessing the database.

Response

NoteWhen no content is displayed after you have sent the REST call, the model is deleted.

Response Status and Error Codes

64 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Table 42:

Category Code Description

Internal server error 500 An internal server error occurred.

Related Information

Configuring Data Science Services Using REST APIs [page 48]

2.3.6 Read Information About All Data Science Services

Get information about data science services.

Request

Format: JSON

URI: https://<hostname>:<router port>/datascience/api/v1/info

HTTP Method: GET

Response

Response Example

{ rServerPlatform: "x86_64-pc-linux-gnu", rVersion: "R version 3.3.0 beta (2016-03-30 r70404)", rNickname: "Supposedly Educational", pdmsRVersion: "1.2.0", packageStatuses: [ { namespace: "com.sap.pdms.datascience", dataScienceService: "PCA", rPackageVersion: "datasci.pca 1.2.0", rTrainFunction: "FOUND PCAtrain", rScoreFunction: "FOUND PCAscore" }, { namespace: "com.sap.pdms.datascience", dataScienceService: "RUL", rPackageVersion: "datasci.rul.weibull 1.2.0", rTrainFunction: "FOUND Weibulltrain", rScoreFunction: "FOUND Weibullscore" }, {

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 65

namespace: "com.sap.pdms.datascience", dataScienceService: "EMD", rPackageVersion: "datasci.dbfa.emd 1.2.0", rTrainFunction: "FOUND EMDtrain", rScoreFunction: "FOUND EMDscore" } ] }

2.4 Scheduling Regular Scoring of a Model

Prerequisites

● You have downloaded the latest SP of XS SERVICES 1 which contains the XSA Job Scheduler service, and installed the Job Scheduler service.For more information about how to install the XSA Job Scheduler service, see the SAP HANA Server Installation and Update Guide.

● The Space Developer role is assigned to the user who does the following tasks:○ Creating the service broker for the Job Scheduler service (Step 1)○ Creating the Job Scheduler service instance (Step 2)○ Binding an application to the Job Scheduler service (Step 3)

For more information about the Space Developer role and scheduling jobs, see the chapter Scheduling Jobs in XS Advanced.

Context

For more information about scheduling jobs in XS advanced, see the chapter Scheduling Jobs in XS Advanced in the SAP HANA Administration Guide.

Procedure

1. (If you have not registered a service broker)Configure the service broker for the Job Scheduler service as described in the chapter Configure the Service Broker for Job Scheduler.

NoteYou need to register a service broker once.

2. Create a Job Scheduler service instance in the XSA space you use for SAP Predictive Maintenance and Service, on-premise edition as described in the chapter Create a Job Scheduler Service Instance.

66 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

3. Bind the Job Scheduler service instance to an app of your choice as described in the chapter Bind an Application to the Job Scheduler Service.

This step is required to access the environment variables of the app datascience-service.

Fill in the variables as follows:

Table 43: Variables for Binding an App

Variable Value

<application name> datascience-service

<service instance name> Name of the Job Scheduler service instance that you cre­ated in Step 2

4. Extract the user name and password from the environment of the app datascience-service that you have bound the Job Scheduler service instance by executing the command xs env datascience-service.

After executing this command, the details of the Job Scheduler service instance are displayed as well.

Sample Code

"jobscheduler" : [ { "name" : "<Name of Job Scheduler service instance>", "label" : "jobscheduler", "tags" : [ "jobscheduler" ], "plan" : "default", "credentials" : { "password" : "<App environment password>", "user" : "<App environment user name>", "url" : "https://<Host of the Job Scheduler service>:<Port of the Job Scheduler service>" } }

The URL is used to access the Job Scheduler service, the user name and password are used to create a job using the Job Scheduler service.

5. Maintain jobs and job schedules as described in the chapter Maintain Jobs and Job Schedules in XS Advanced.

Sample Code

{ "name":"<Name of the job>", "description": "<Description of the job>", "action":"https://<PDMS_DS_ADMIN>:<Password of PDMS_DS_ADMIN><Host of pdms router>:<Port of pdms router>/datascience/api/v1/models/score/<model ID>", "active": true, "httpMethod":"POST", "schedules": [ { "cron":"* * * * * * 0,10,20,30,40,50", "description": "This schedule runs every 10 seconds", "active": true, "startTime": {"date": "2016-01-01 00:00 +0000", "format": "YYYY-MM-DD HH:mm Z"} } ]

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 67

}

NoteThe basic authorization is part of the URL. The handling of the X-CSRF token is taken care of by the Job Scheduler service. You can verify in the view SYS.M_TASKS that a new job task is created every 10 seconds.

For more information about the <PDMS_DS_ADMIN>, see the guide Installation of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02.

For more information about how to work with the Job Scheduler service using REST APIs, see the chapter Job Scheduler REST API for XS Advanced.

6. Check and manage your jobs and job schedules in the Job Scheduler dashboard as described in the chapter The Job Scheduler Dashboard.

7. (If required) Stop a job schedule by updating the job configuration.a. Retrieve the job ID.

REST API call:

Sample Code

GET https://<Host of the Job Scheduler service>:<Port of the Job Scheduler service>/scheduler/jobs

This returns a list of jobs configured in the Job Scheduler service.b. Stop the job schedule.

REST API call:

Sample Code

PUT https://<Host of the Job Scheduler service>:<Port of the Job Scheduler service>/scheduler/jobs/<job _id>

with the following body

{ "active": false }

This deactivates the job schedule.

Alternatively, you can use the Manage screen of the Job Scheduler dashboard to deactivate running jobs. For more information, see the chapter The Job Scheduler Dashboard.

68 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

2.5 Configuring the Insight Provider Catalog Using REST APIs

The Insight Provider Catalog is configured using REST APIs.

Permissions: The following role collection is assigned to your user:

● <pdms-tech>

Having this role collection assigned, you can configure the Insight Provider Catalog and check the effect of your configurations in the Asset Health Control Center.

For more information about role collections, see the chapters Maintaining Roles and Users in SAP HANA and Role Templates for SAP Predictive Maintenance and Service, on-premise edition in the guide Installation of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02.

To configure the Insight Provider Catalog, proceed as follows:

1. Create insight provider entries and insight provider types as described in the chapter Create Insight Provider Entries in the Catalog [page 69].You can also do the following:○ Read an Insight Provider Entry [page 76]○ Read All Insight Provider Entries [page 77]○ Read an Insight Provider Type [page 77]○ Read All Insight Provider Types [page 78]

2. (If required) delete an insight provide entry as described in the chapter Delete an Insight Provider Entry [page 79].

3. (If required) delete an insight provide type as described in the chapter Delete an Insight Provider Type [page 79].

Related Information

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 [page 10]

2.5.1 Create Insight Provider Entries in the Catalog

Create insight provider entries that business user can then add from the Insight Provider Catalog to the Asset Health Control Center or the Asset Health Fact Sheet.

NoteNo insight provider entry can be created for key figures because key figures are added to the Insight Provider Catalog by creating key figure sets.

For more information, see the chapter Creating Key Figures [page 81].

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 69

Request

Format: JSON

URI: http://<hostname>:<router port>/platform/service-catalog/api/v1/service-entries

HTTP Method: PUT

Request Example

{ "description": "<Description of insight provider>", "id": "<insight provider ID>", "imageUrl": "<image URL of insight provider>", "interactive": <true or false>, "name": "<insight provider name>", "serviceType": { "id": "<service type ID>" }, "options": {"foo": "bar"}, "serviceUrl": "<service URL of insight provider>", "url": "https://<host name>:<port>/platform/service-catalog/api/v1/service-entries/<service type ID>" }

Request ParametersTable 44:

Parameter Required Description

id Yes ID of the insight provider you want to register in the insight provider catalog

NoteFor an overview of IDs that need to be entered for each insight provider, see Service Type IDs [page 73].

name Yes Name of the insight provider you want to register in the insight provider catalog

NoteOn the UI of the insight provider cata­log, predefined names and descrip­tions of insight providers are dis­played. These values are required by the registration procedure. For a list of the predefined names and descrip­tions for each insight provider, see Predefined Titles and Descriptions for Insight Provider Registration [page 73].

70 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Parameter Required Description

description Yes Description of the insight provider you want to register inthe insight provider catalog

NoteOn the UI of the insight provider cata­log, predefined names and descrip­tions of insight providers are dis­played. These values are required by the registration procedure. For a list of the predefined names and descrip­tions for each insight provider, see Predefined Titles and Descriptions for Insight Provider Registration [page 73].

imageUrl Yes URL path to the image that is displayed as the icon for the insight provider in the insight provider catalog

NoteFor an overview of the URLs that need to be entered for each insight provider, see URLs Required for In­sight Provider Registration [page 74].

serviceUrl Yes URL path to the insight provider

NoteFor an overview of the URLs that need to be entered for each insight provider, see URLs Required for In­sight Provider Registration [page 74].

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 71

Parameter Required Description

interactive Yes Value true if the insight provider is dis­played on the UI of the insight provider catalog

Value false if the insight provider is not displayed on the UI of the insight provider catalog

NoteWhen registering the insight provid­ers for 2D data visualization and fil­ter, set this value to false for these insight providers.

serviceType Yes Predefined value:

{"id": "com.sap.pdms.InsightProvider"}

options No This field can be used to store additional metadata about a service entry. and that it has to be any json object but cannot be a json array.

NoteIt can be any json object but cannot be a json array. This parameter is restricted to 2048 characters.

Related Information

Configuring the Insight Provider Catalog Using REST APIs [page 69]Read an Insight Provider Entry [page 76]Read All Insight Provider Entries [page 77]Read an Insight Provider Type [page 77]Read All Insight Provider Types [page 78]Delete an Insight Provider Type [page 79]Delete an Insight Provider Entry [page 79]

72 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

2.5.1.1 Service Type IDs

To register insight providers in the Insight Provider Catalog, you need to enter the service type ID of each insight provider.

Table 45: Service Type IDs

Insight Provider Service Type ID

Asset Explorer com.sap.pdms.ipro.asset-explorer

Components com.sap.pdms.ipro.component

Derived Signals com.sap.pdms.ipro.derived-signals

Work Activities com.sap.pdms.ipro.work-activity

Map com.sap.pdms.ipro.geospatial

3D Chart com.sap.pdms.ipro.3dviz

Filter

NoteThis insight provider is not displayed on the UI of the in­sight provider catalog, but is consumed by the Asset Ex­plorer.

com.sap.pdms.ipro.filter

2D Chart com.sap.pdms.ipro.2d-viz

Related Information

Create Insight Provider Entries in the Catalog [page 69]

2.5.1.2 Predefined Titles and Descriptions for Insight Provider Registration

To register insight providers in the insight provider catalog, you need to enter a name and description for each insight provider. These names and descriptions are identical to the names and descriptions predefined by SAP Predictive Maintenance and Service.

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 73

Table 46: Names and Descriptions for Insight Provider Registration

Insight Provider Name Description

Asset Explorer Asset Explorer Provides a list of assets, as well as their attributes. It also enables you to set fil­ters.

Components Components Provides a hierarchical list of compo­nents of an asset, along with their attrib­utes.

Derived Signals Derived Signals Provides a list of the current derived sig­nals based on rules defined for sensor data, and a 2D chart for data visualiza­tion.

Work Activities Work Activities Provides a list of current work activities with details.

Map Map Provides a display of assets and their health status by geolocation and issue severity. Also allows spatial selection.

3D Chart 3D Chart Provides sensor data visualization across assets and time, and the ability to overlay derived signals.

2D Chart 2D Chart Provides data visualization across one or more measurements.

Related Information

Create Insight Provider Entries in the Catalog [page 69]

2.5.1.3 URLs Required for Insight Provider Registration

imageURL

To register an insight provider in the Insight Provider Catalog, you need to enter the URL path to the image that is delivered with the insight provider.

74 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Table 47: imageURLs for Insight Provider Registration

Insight Provider imageURL

Asset Explorer sap-icon://newspaper

Components sap-icon://list

Derived Signals sap-icon://measuring-point

Work Activities sap-icon://activity-2

Map sap-icon://map-2

3D Chart sap-icon://chart-axis

Filter

NoteThis insight provider is not displayed on the UI of the in­sight provider catalog, but is consumed by the Asset Ex­plorer.

sap-icon://filter

2D Chart sap-icon://line-chart

serviceURL

To register an insight provider in the Insight Provider Catalog, you need to enter the URL path to the location of the insight provider.

Table 48: serviceURLs for Insight Provider Registration

Insight Provider serviceURL

Asset Explorer /ipro/asset-explorer

Components /ipro/components

Derived Signals /ipro/derived-signals

Work Activities /ipro/work-activity

Map /ipro/geospatial

3D Chart /ipro/threed-viz

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 75

Insight Provider serviceURL

Filter

NoteThis insight provider is not displayed on the UI of the in­sight provider catalog, but is consumed by the Asset Ex­plorer.

/ipro/filter

2D Chart /ipro/twod-viz/sap/pdms/2dviz

Related Information

Create Insight Provider Entries in the Catalog [page 69]

2.5.2 Read an Insight Provider Entry

Retrieves specific insight provider entry.

Request

Format: JSON

URI: http://<hostname>:<router port>/platform/service-catalog/api/v1/service-entries/<serviceEntryId>

HTTP Method: GET

Related Information

Configuring the Insight Provider Catalog Using REST APIs [page 69]Create Insight Provider Entries in the Catalog [page 69]Read All Insight Provider Entries [page 77]Read an Insight Provider Type [page 77]Read All Insight Provider Types [page 78]Delete an Insight Provider Type [page 79]Delete an Insight Provider Entry [page 79]

76 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

2.5.3 Read All Insight Provider Entries

Retrieves all insight provider entries.

Request

Format: JSON

URI: http://<hostname>:<router port>/platform/service-catalog/api/v1/service-entries

HTTP Method: GET

Request Parameters (Optional)Table 49:

Parameter Located In Required

serviceName Query No

serviceDescription Query No

serviceInteractive Query No

serviceTypeName Query No

Related Information

Configuring the Insight Provider Catalog Using REST APIs [page 69]Create Insight Provider Entries in the Catalog [page 69]Read an Insight Provider Entry [page 76]Read an Insight Provider Type [page 77]Read All Insight Provider Types [page 78]Delete an Insight Provider Type [page 79]Delete an Insight Provider Entry [page 79]

2.5.4 Read an Insight Provider Type

Retrieves specific insight provider type.

Request

Format: JSON

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 77

URI: http://<hostname>:<router port>/platform/service-catalog/api/v1/service-types/<serviceTypeId>

HTTP Method: GET

Related Information

Configuring the Insight Provider Catalog Using REST APIs [page 69]Create Insight Provider Entries in the Catalog [page 69]Read an Insight Provider Entry [page 76]Read All Insight Provider Entries [page 77]Read All Insight Provider Types [page 78]Delete an Insight Provider Type [page 79]Delete an Insight Provider Entry [page 79]

2.5.5 Read All Insight Provider Types

Retrieves all insight provider types.

Request

Format: JSON

URI: http://<hostname>:<router port>/platform/service-catalog/api/v1/service-types

HTTP Method: GET

Related Information

Configuring the Insight Provider Catalog Using REST APIs [page 69]Create Insight Provider Entries in the Catalog [page 69]Read an Insight Provider Entry [page 76]Read All Insight Provider Entries [page 77]Read an Insight Provider Type [page 77]Delete an Insight Provider Type [page 79]Delete an Insight Provider Entry [page 79]

78 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

2.5.6 Delete an Insight Provider Entry

Deletes specific insight provider entry.

Request

Format: JSON

URI: http://<hostname>:<router port>/platform/service-catalog/api/v1/service-entries/<serviceEntryId>

HTTP Method: DELETE

Related Information

Configuring the Insight Provider Catalog Using REST APIs [page 69]Create Insight Provider Entries in the Catalog [page 69]Read an Insight Provider Entry [page 76]Read All Insight Provider Entries [page 77]Read an Insight Provider Type [page 77]Read All Insight Provider Types [page 78]Delete an Insight Provider Type [page 79]

2.5.7 Delete an Insight Provider Type

Deletes specific insight provider type.

Request

Format: JSON

URI: http://<hostname>:<router port>/platform/service-catalog/api/v1/service-types/<serviceTypeId>

HTTP Method: DELETE

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 79

Related Information

Configuring the Insight Provider Catalog Using REST APIs [page 69]Create Insight Provider Entries in the Catalog [page 69]Read an Insight Provider Entry [page 76]Read All Insight Provider Entries [page 77]Read an Insight Provider Type [page 77]Read All Insight Provider Types [page 78]Delete an Insight Provider Entry [page 79]

2.6 Configuring Insight Providers Using Configuration UIs

As an alternative to REST APIs, you can also decide to configure insight providers using the configuration UIs.

Prerequisites

The following role collection is assigned to your user:

● <pdms-tech>

Having this role collection assigned, you can configure the Insight Provider Catalog and check the effect of your configurations in the Asset Health Control Center.

For more information about role collections, see the chapters Maintaining Roles and Users in SAP HANA and Role Templates for SAP Predictive Maintenance and Service, on-premise edition in the guide Installation of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02.

Context

NoteThe configuration UIs to configure insight providers support the following languages:

● English

Procedure

1. Open the URL https://<hostname>:<port>/app/launchpad/index.html and log on with your user.

80 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

2. In the group Configure Insight Providers, open the app Key Figures to create key figures as explained in the chapter Creating Key Figures [page 81].

3. In the group Configure Insight Providers, open the app Key Figure Sets to create key figure sets based on your key figures as explained in the chapter Creating Key Figure Sets [page 85].

4. In the group Configure Insight Providers, open the app of the insight provider, you want to configure:

○ Asset Explorer [page 86]○ Components [page 91]○ Work Activities [page 93]○ Derived Signals [page 95]○ Map [page 96]○ 2D Chart [page 103]○ 3D Chart [page 105]

NoteThere is no predefined order in which you should configure insight providers.

2.6.1 Creating Key Figures

Prerequisites

● The schema SAP_PDMS_DATA_KEY_FIGURES is created. If the schema is not created yet, create it as described in the chapter Installing SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02 in the guide Installation of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02.

● In the schema SAP_PDMS_DATA_KEY_FIGURES, data fusion views are created as explained in the chapter Creating Data Fusion Views for Key Figures [page 83].

● In the schema SAP_PDMS_DATA_KEY_FIGURES, stored procedures are created as explained in the chapter Creating Stored Procedures for Key Figures [page 84]

Context

To display key figures in the Asset Health Control Center that can be used for asset analysis, you first need to create key figures in the Key Figures app.

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 81

Procedure

1. On the launchpad, open the app Key Figures.

2. To create a key figure, click Create a New Key Figure.3. Fill in the required entries.

Table 50: Entries to Create Key Figures

Entry Field Description

Language Language in which the key figure is displayed

Title Title of the key figure

Unit of Measure Unit of measure used in the key figure

Decimal Places Accuracy of the key figure

Number Style You can choose among the following number styles:○ Short○ Standard

Stored Procedure Name of the procedure that you created for the key figure.

For more information about creating stored procedures, see the chapter Creating Stored Procedures for Key Figures [page 84].

Time Period Time period based on which readings are to be aggregated for the key figure.

ExampleYou would like to display the average temperature for to­

day: Choose Current 1 Day(s)

4. Save the key figure.

Results

You can add the key figure that you created to a key figure set as explained in the chapter Creating Key Figure Sets [page 85].

Related Information

Configuring Insight Providers Using Configuration UIs [page 80]

82 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

2.6.1.1 Creating Data Fusion Views for Key Figures

Prerequisites

● The data model of SAP Predictive Maintenance and Serivce, on-premise edition 1.0 is set up.For more information about the data model, see the chapter Data Model in the guide Installation of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02.

● The schema SAP_PDMS_DATA_KEY_FIGURES is created.

Context

Before you can configure key figures, you need to create two data fusion views:

1. One fusion view to define the parent-child relationship between the assets and components used for key figures.

2. Another fusion view to define the readings used for key figures.

Procedure

1. Log on to SAP HANA studio with the <PDMS_TECH_USER>.

2. In the SQL editor, execute the following statement to create the first fusion view:

Sample Code

CREATE VIEW "SAP_PDMS_DATA_KEY_FIGURES"."ASSET_COMPONENT_MAP" as select "<Alias3>"."ChildID" as "ComponentId", "<Alias4>"."ObjectID" as "AssetId" from (select "<Alias2>"."ObjectID" as "ChildID", "<Alias1>"."ParentID" from "SAP_PDMS_DATA"."com.sap.pdms.sdm::META.HierarchyNode" as "<Alias1>" inner join "SAP_PDMS_DATA"."com.sap.pdms.sdm::META.HierarchyAssignment" as "<Alias2>" on "<Alias1>"."ID" = "<Alias2>"."NodeID" where "<Alias2>"."StartDateTime" < CURRENT_TIMESTAMP and "<Alias2>"."EndDateTime" > CURRENT_TIMESTAMP) as "<Alias3>" inner join "SAP_PDMS_DATA"."com.sap.pdms.sdm::META.HierarchyAssignment" as "<Alias4>" on "<Alias3>"."ParentID" = "<Alias4>"."NodeID" where "<Alias4>"."StartDateTime" < CURRENT_TIMESTAMP and "<Alias4>"."EndDateTime" > CURRENT_TIMESTAMP;

You have now defined the parent-child relationship between assets and components. The first fusion view needs to be created once.

3. In the SQL editor, execute the following statement to create the second fusion view:

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 83

Sample Code

CREATE VIEW "SAP_PDMS_DATA_KEY_FIGURES"."<Measurement ID for which you want to create and compute key figures>" as select "<Alias5>"."AssetId" as "AssetId", "<Alias6>"."PropertyValue" as "Value", "<Alias6>"."Timestamp" as "Timestamp" from "SAP_PDMS_DATA"."com.sap.pdms.sdm::DATA.READINGS" as "<Alias6>" inner join "SAP_PDMS_DATA_KEY_FIGURES"."ASSET_COMPONENT_MAP" as "<Alias5>" on "<Alias6>"."Thing" = "<Alias5>"."ComponentId" where "<Alias6>"."ThingType" = '<ThingType>' and "<Alias6>"."PropertySetTypeId" = '<PropertySetTypeId>' and "<Alias6>"."PropertyId" = '<PropertyId>';

You have now defined the readings that you want to be used for your key figure. The second fusion view needs to be created for each type of measurement that you want to be used for key figures.

Results

After you have created the views, you can create procedures for each key figure that you want to create and compute as described in the chapter Creating Stored Procedures for Key Figures [page 84].

Related Information

Creating Key Figures [page 81]

2.6.1.2 Creating Stored Procedures for Key Figures

Prerequisites

● You have created the data fusion view schemas as explained in the chapter Creating Data Fusion Views for Key Figures [page 83].

Context

To create and compute key figures, you need to create procedures to make required data available to the key figures.

84 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Procedure

1. Log on to SAP HANA studio with the <PDMS_TECH_USER>.

2. In the SQL editor, execute the following statement to create a procedure:

Sample Code

CREATE PROCEDURE "SAP_PDMS_DATA_KEY_FIGURES"."<procedure name>"(in things table(id varchar(50)), in fr timestamp, in t timestamp, out result double) language sqlscript sql security invokerasbegin declare no_selection int := 0; select count(*) into no_selection from :things; if (no_selection > 0) then select avg("Value") into result from "SAP_PDMS_DATA_KEY_FIGURES"."<Measurement ID for which you want to create and compute key figures>" where "AssetId" in (select * from :things) and "Timestamp" >= fr and "Timestamp" <= t; else select avg("Value") into result from "SAP_PDMS_DATA_KEY_FIGURES"."<Measurement ID for which you want to create and compute key figures>" where "Timestamp" >= fr and "Timestamp" <= t; end if; end;

3. Repeat step 2 for each key figure that you want to create for a specific measurement ID.

The sample code is used to calculate the average of readings, which can be displayed in a key figure. You can also create procedures to calculate the maximum or minimum value of the the same readings if required.

For more information about what aggregation expressions are supported, see the chapter Aggregate Expressions in the SAP HANA SQL and System Views Reference.

Related Information

Creating Key Figures [page 81]

2.6.2 Creating Key Figure Sets

Prerequisites

● You have created at least one key figure that can be added to a key figure set as explained in the chapter Creating Key Figures [page 81].

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 85

Context

To make key figures available for asset analysis in the Asset Health Control Center or on the Asset Health Fact Sheet, key figures need to be added to key figure sets. Business users can then add these key figure sets from the Insight Provider to the Asset Health Control Center or the Asset Health Fact Sheet.

Procedure

1. On the launchpad, open the app Key Figure Sets.

2. To create a key figure set, click Create a New Key Figure Set.3. Fill in the general information of the key figure set.

Table 51: General Information of a Key Figure Set

Entry Field Description

Language Language in which the key figure set is displayed

Title Title of the key figure set

4. Add the key figures that you want to display in the key figure set.5. Save the key figure set.

Related Information

Configuring Insight Providers Using Configuration UIs [page 80]

2.6.3 Entries to Configure the Asset Explorer

Filter Attributes

Table 52: Entries to Configure Filter Attributes

Entry Field Description

Filter ID Identifies the attribute filter

Filter Name Name of the filter

86 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Entry Field Description

Filter Label Key of the filter that is used for text mapping in the section Translation.

NoteThe text mapped to this key is later on the filter label dis­played in the Asset Explorer.

Selection Type You can choose among the following options:

● MultipleBusiness users can filter on more than one value in the Asset Explorer.

● SingleBusiness users can filter on only one value in the Asset Explorer.

You can furthermore choose :

Example

ExampleThe following screenshots are examples of what your filter configuration can look like on the Asset Explorer UI:

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 87

Asset List

Table 53: Entries to Configure the Asset List

Entry Field Description

Dimension ID Identifies column that is to be displayed in the asset list

Dimension Type Data type of the column value such as string or float

Dimension Path Binds the column to the corresponding value of the JSON re­sponse sent by the back end

This field holds the path to the value, for example of an Anom­aly Score column. To render the value in UI, the corresponding column label has to be bound to the right path of the JSON, for example properties/AnomalyScore.

88 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Entry Field Description

Label Key of the column that is used for text mapping in the section Translation.

NoteThe text mapped to this key is later on the column label displayed in the Asset Explorer.

Default ID Specifies what column is displayed as first column in the table

NoteThis checkbox should be activated for one column only.

Default Sort Defines the column according to which the component list is sorted by default

NoteThis checkbox should be activated for one column only.

ExampleThe following screenshot is an example of what your asset list configuration can look like on the Asset Explorer UI:

Component List

The component list is accessed by business users by clicking on a component.

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 89

Table 54: Entries to Configure the Component List

Entry Field Description

Column ID Identifies column that is to be displayed in the component list

Column Type Data type of the column value such as string or float

Column Path Binds the column to the corresponding value of the JSON re­sponse sent by the back end

This field holds the path to the value, for example of an Anom­aly Score column. To render the value in UI, the corresponding column label has to be bound to the right path of the JSON, for example properties/AnomalyScore.

Label Key of the column that is used for text mapping in the section Translation.

NoteThe text mapped to this key is later on the column label displayed in the Asset Explorer.

Sort by ID Specifies what column is displayed as first column in the table

NoteThis checkbox should be activated for one column only.

Sort List by Defines the column according to which the component list is sorted by default

NoteThis checkbox should be activated for one column only.

ExampleThe following screenshot is an example of what your component list configuration can look like on the Asset Explorer UI:

90 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Translations

Table 55: Entries to Map UI Texts

Field Description

Lang Enter the language code of the language in which you want the filter labels and column lables to be displayed.

NoteIt is recommended to use standard ISO language code co­des such as en-US.

Key / Text Choose the key of the filter or column. Enter the text you would like to be displayed on the UI.

Related Information

Configuring Insight Providers Using Configuration UIs [page 80]

2.6.4 Entries to Configure Components

Component List

Table 56: Entries to Configure the Component List

Entry Field Description

Dimension ID Identifies column that is to be displayed in the component list

Dimension Type Data type of the column value

You can choose among the following values

● string● float● integer● healthStatus

Used to display scores calculated using data science services

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 91

Entry Field Description

Dimension Path Binds the column to the correspnding value of the JSON re­sponse sent by the back end

This field holds the path to the value, for example of an Anom­aly Score column. To render the value in UI, the corresponding column label has to be bound to the right path of the JSON, for example properties/AnomalyScore.

Label Key of the column that is used for text mapping in the section Translation

NoteThe text mapped to this key is later on the column label displayed in the Asset Explorer.

Default ID Specifies what column is displayed as first column in the table

NoteThis checkbox should be activated for one column only.

Default Sort Defines the column according to which the component list is sorted by default

NoteThis checkbox should be activated for one column only.

ExampleThe following screenshot is an example of what your component list configuration can look like on the Asset Health Fact Sheet:

92 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Translations

Table 57: Entries to Map UI Texts

Field Description

Lang Enter the language code of the language in which you want the column lables to be displayed.

NoteIt is recommended to use standard ISO language code co­des such as en-US.

Key / Text Choose the key of the column. Enter the text you would like to be displayed on the UI.

Related Information

Configuring Insight Providers Using Configuration UIs [page 80]

2.6.5 Entries to Configure Work Activities

Display Work Activities

In this section you define what columns business users see by default when looking at the insight provider for work activities in the Asset Health Control Center or on the Asset Health Fact Sheet. You can choose from a predefined list of values. The list values are retrieved from data maintained in the following views:

● WORKACTIVITY● WORKACTIVITY_TYPE_CODE_DESCRIPTION● WORKACTIVITY_PRIORITY_DESCRIPTION● WORKACTIVITY_STATUS_DESCRIPTION● Things metadata views

For more information about these views, see the chapters Views for Metadata and Views for Data in the guide Installation of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02.

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 93

Create Work Activities

When business users create work activities for a certain asset on the Asset Health Fact Sheet, they can post the work activity to an SAP system to schedule maintenance. Therefore, an OData service is needed.

Table 58: Entries to Specify OData Service

Field Description

Service URL URL of the OData service that you use to post new work activi­ties to a system that exposes the end point of the OData serv­ice, for example, SAP Gateway on top of SAP MRS

User Technical user that is used to access the OData end point and create work activities in the target system.

Password Password of the technical user that is used to access the OData end point and create work activities in the target sys­tem.

Entity Set Group of entities

An entity set is part of the data model of the OData service.

ExampleWork_Activities

Translations

Table 59: Entries to Map UI Texts

Field Description

Lang Enter the language code of the language in which you want the column lables to be displayed.

NoteThis checkbox should be activated for one column only.

Key / Text Choose the key of the column. Enter the text you would like to be displayed on the UI.

Related Information

Configuring Insight Providers Using Configuration UIs [page 80]

94 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

2.6.6 Entries to Configure Derived Signals

Display Derived Signals

In this section you define what columns business users see by default when looking at the insight provider of derived signals in the Asset Health Control Center or on the Asset Health Fact Sheet. You can choose from a predefined list of columns. The values in this list are retrieved from the data maintained in the view EVENTS and in the Things metadata views. For more information about these views, see the chapters Views for Metadata and Views for Data in the guide Installation of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02.

Translations

Table 60: Entries to Map UI Texts

Field Description

Lang Enter the language code of the language in which you want the column lables to be displayed.

NoteThis checkbox should be activated for one column only.

Key / Text Choose the key of the column. Enter the text you would like to be displayed on the UI.

ExampleThe following screenshot is an example of what your list configuration can look like on the UI of the Asset Health Control Center and the Asset Health Fact Sheet:

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 95

Related Information

Configuring Insight Providers Using Configuration UIs [page 80]

2.6.7 Entries to Configure the Map

Map Settings

Table 61: Map Settings

Entry Field Description

Zoom Level Number of levels for zooming into the map

Latitude Initial focus of latitude of the map

Longitude Initial focus of longitude of the map

Within the map settings you can configure base layer settings, overlay layer settings, and the layer color mapping.

NoteThe usage of the following tile providers is supported:

● OpenStreetMap● Esri● Noki Here

Base Layers

Table 62: Base Layer Settings

Field Description

Layer Name Name of the base layer

NoteThis name should be unique for each layer. The name is displayed later on the UI of the map.

96 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Field Description

Layer Type Type of the base layer

You can choose between the following types:

● xyzIf you choose this type, make sure you specify a Layer URL.

● esriIf you choose this type, make sure you specify an esri Base Layer Type.

Layer URL URL template of the tile provider for the base layer

NoteWhen using Open Street Maps with 'https' use layerUrl : https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png

NoteActivate the Mandatory checkbox if you filled in this entry field.

esri Base Layer Type Specifies the base layer type if the base layer is of type esri.

For more information about esri base layer types, see http://www.esri.com/data/basemaps .

NoteActivate the Mandatory checkbox if you filled in this entry field.

Attribution A string that defines the copyright of the map provider. You can also include an HTML link that leads to the copyrights of the map provider.

Example© Mapbox

NoteActivate the Mandatory checkbox if you filled in this entry field.

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 97

Field Description

Application ID NoteFill in this entry field if you use Noki Here Maps as tile pro­vider.

App ID used to register to the tile provider.

NoteActivate the Mandatory checkbox if you filled in this entry field.

Application Code NoteFill in this entry field if you use Noki Here Maps.

App code used to register to the tile provider.

NoteActivate the Mandatory checkbox if you filled in this entry field.

Subdomains NoteFill in this entry field if your tile provider use subdomains.

For more information about subdomains and subdomain pre­fixes, see https://developer.here.com/news/201602172#.V-Fc2U1pDct .

NoteActivate the Mandatory checkbox if you filled in this entry field.

98 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Field Description

Map ID Version of the map

NoteFill in this entry field according to the requirements and conventions of your tile provider.

NoteActivate the Mandatory checkbox if you filled in this entry field.

Base Map type such as panorama, traffic, or base

NoteFill in this entry field according to the requirements and conventions of your tile provider.

NoteActivate the Mandatory checkbox if you filled in this entry field.

Max Zoom Maximum umber of levels for zooming into the base layer.

NoteThis setting overrules the generic map zoom level.

NoteActivate the Mandatory checkbox if you filled in this entry field.

Hide Logo Hides the logo of the tile provider on the map

No Wrap Value true: base layers do not load outside the world width (-180 to 180 longitude).

Initial Base Layer Value true sets this base layer as the default base layer.

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 99

Overlay LayersTable 63: Overlay Layer Settings

Field Description

Layer Name Name of the overlay layer

NoteThis name should be unique for each layer. The name is displayed later on the UI of the map.

Layer Level Layer level of an overlay layer used for numbering across lay­ers

This setting is used as the ID of the layer.

Layer Type You can choose among the following values:

● Marker: Assets are displayed on the map individually.● Cluster: Assets are clustered on the map according to the

zoom level. The further users zoom out of a map, the wider the radius of a cluster.

Layer Color MappingTable 64: Layer Color Mapping

Field Description

Layer Level Layer level of an overlay layer used for numbering across lay­ers

This setting is used as the ID of the layer.

Indicator Type Key of indicator that is defined for derived signals. This key is used for coloring assets on the map according to their derived signals.

Sign Include or exclude a certain range of derived signals for color mapping

You can choose among the following values:

● I: Means inclusive approach● E: Means exclusive approach

ExampleAll assets that have received (I) between 5 and 10 derived signals are displayed yellow.

100 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Field Description

Option Range of derived signals that you want to map to a certain color

You can choose among the following values:

● LE: Means less or equal (Low needs to remain empty, a number needs to be entered for High)

● BT: Means between (excluding the minimum number of derived signals and including the maximum number of derived signals)

● GT: Means greater than (a number needs to be entered for Low), High needs to remain empty)

● EQ: Means equals (the same numbers needs to be en­tered for High and Low)

ExampleAll assets that have received between (BT) 5 and 10 de­rived signals are displayed yellow.

Low Minimum number of derived signals

ExampleAll assets that have received between 5 (Low) and 10 de­rived signals are displayed yellow.

High Maximum number of derived signals

ExampleAll assets that have received between 5 and 10 (High) de­rived signals are displayed yellow.

Color Color used to visualize the number of derived signals for an asset

NoteThe following colors are supported: red (critical), orange (severe), green (good), grey (unknown).

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 101

Translations

NoteThe definition of translations is mandatory.

Table 65: Entries to Map UI Texts

Field Description

Lang Enter the language code of the language in which you want the layers to be displayed.

NoteIt is recommended to use standard ISO language code co­des such as en-US.

Key / Text Choose the key of the layer.

NoteUse the following naming convention for the key: $<layer name>.

Enter the text you would like to be displayed on the UI.

ExampleThe following screenshot is an example of what your map configuration can look like in the Asset Health Control Center and on the Asset Health Fact Sheet:

102 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Related Information

Configuring Insight Providers Using Configuration UIs [page 80]

2.6.8 Entries to Configure the 2D Chart

Time Filter

Table 66: 2D Chart Settings

Entry Field Description

Key Key of the time interval

Text Label of the time interval that is displayed on the UI of the 2D chart

Example48 Hours, Today

Value Value of the time interval

Example48 for a time interval of 48 hours

Unit Unit of the time interval

Examplehour for a time interval of 48 hours

You can choose among the following values:

● hour● day● week● month● year

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 103

Default Metric Configurations

In this section you can choose the metrics that you want to be displayed in the 2D chart such as the temperature of a certain asset component.

NoteTo change the default metric configuration, you must first remove the previously configured metric and add again.

You can define the number of data points per measurement (metric) that you want to be displayed in the chart.

NoteA maximum of 600 data points in total can be displayed in the 2D chart.

ExampleThe following screenshot is an example of what your 2D chart configuration can look like in the Asset Health Control Center and on the Asset Health Fact Sheet:

104 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Translations

Table 67: Entries to Map UI Texts

Field Description

Lang Enter the language code of the language in which you want time filter texts to be displayed.

NoteIt is recommended to use standard ISO language code co­des such as en-US.

Key / Text Choose the key of the text. Enter the time filter text you would like to be displayed on the UI.

Related Information

Configuring Insight Providers Using Configuration UIs [page 80]

2.6.9 Entries to Configure the 3D Chart

Metric List

In this section you can choose the metrics that you want to be displayed in the 3D chart such as the temperature of a certain asset component.

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 105

Settings

Table 68: 3D Chart Settings

Field Description

View Rendering mode of the 3D chart

This setting determines the color and lighting of the 3D scene, and the surface of the 3D chart.

You can choose between the following values:

● 1No lighting effects are used. This means, no shadings are used, for example.

NoteThis rendering mode is less resource-consuming.

● 2Lighting effects are used. This means, shadings are used, for example.

106 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Field Description

Colors Colors of different parts of the 3D chart

You can set the color for the following parts:

● SurfaceSurface that can be built based on the measurements of assets displayed in the 3D chart

● Surface from

NoteThis field is relevant only if you chose the view render­ing mode 1.

The color you choose will gradiently change to the color you choose for Surface to. The color gradient goes from low values (Surface from) to high values (Surface to).

● Surface to

NoteThis field is relevant only if you chose the view render­ing mode 1.

The color you choose will be the target color of the gradi­ently changing color that you choose for Surface from. The color gradient goes from low values (Surface from) to high values (Surface to).

● BackgroundBackground of the 3D chart

● Axis textValue labels on the axes

● Spec limitThreshold for measurements of assets

● Time sliderTime line selector where you can select the time interval that you want to be displayed in the 3D chart.

● LinesLine that connect the measurements of an asset dis­played in the 3D chart

● EventsDerived signals

● Time slider brushSelected time interval in the time line selector.

Max Machines Maximum number of assets that are allowed to be displayed in the 3D data chart

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 107

Field Description

Animate transition angle Angle by which the animated transition moves through the scene

From date Maximum time interval for which data is displayed in the 3D chart

The time interval is defined by the start date you enter here, and the end date which is the present day

Aggregation threshold Thresholds used to automatically compute the aggregation level used for a given back-end request to read metrics lo­cated in the data model

ExampleThe following screenshot is an example of what your 3D chart configuration can look like in the Asset Health Control Center and on the Asset Health Fact Sheet:

Related Information

Configuring Insight Providers Using Configuration UIs [page 80]

108 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

2.7 Configuring Insight Provider Using REST APIs

REST APIs for configuring insight provider for usage in the Asset Health Control Center and on the Asset Health Fact Sheet.

Permissions: The following role collection is assigned to your user:

● <pdms-tech>

Having this role collection assigned, you can configure the Insight Provider Catalog and check the effect of your configurations in the Asset Health Control Center.

For more information about role collections, see the chapters Maintaining Roles and Users in SAP HANA and Role Templates for SAP Predictive Maintenance and Service, on-premise edition in the guide Installation of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02.

To configure insight providers, proceed as follows:

1. Create key figures as described in the chapter Create a Key Figure [page 110].You can also do the following:○ Read a Key Figure [page 112]○ Search for Key Figures [page 114]○ Read an Attribute Section of a Key Figure [page 115]○ Update a Key Figure [page 117]○ Delete a Key Figure [page 119]

2. Create key figure sets as described in the chapter Create a Key Figure Set [page 119].You can also do the following:○ Read a Key Figure Set [page 122]○ Search for Key Figure Sets [page 123]○ Read an Attibute Section of a Key Figure Set [page 124]○ Read All Key Figures of a Key Figure Set [page 126]○ Update a Key Figure Set [page 127]○ Delete a Key Figure Set [page 129]

3. Compute key figures as desribed in the chapter Compute Key Figures [page 130].4. Create the configurations of an insight provider as described in the chapter Create Configurations of an

Insight Provider [page 132].

NoteThe insight providers can be configured in a random order.

You can also do the following:○ Read a Configuration of an Insight Provider [page 161]○ Read All Configurations of an Insight Provider [page 162]○ Read a Front-End Configuration of an Insight Provider [page 164]○ Read All Text Interpretations for a Configuration of an Insight Provider [page 165]○ Read All Key-Text Pairs for a Configuration and Language Combination [page 167]○ Create Key-Text Pairs for a Configuration and Language Combination [page 168]○ Read a Text Value for a Specific Configuration, Lamguage, and Keyx Combination [page 170]

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 109

5. (If required) Update the configuration of an insight provider as described in the chapter Update a Configuration of an Insight Provider [page 171].

NoteYou can also do the following:○ Update All Configurations of an Insight Provider [page 173]○ Update Key-Text Pairs for a Configuration and Language Combination [page 176]○ Update a Text Value for a Specific Configuration, Text Key, and Language Combination [page 177]

6. (If required) Delete the configuration of an insight provider as described in the chapter Delete a Configuration of an Insight Provider [page 179].

NoteYou can also do the following:○ Delete All Configurations of an Insight Provider [page 180]○ Delete a Back-End Configuration and Front-End Configuration of an Insight Provider [page 181]○ Delete All Text Interpretations for a Configuration of an Insight Provider [page 182]○ Delete All Key-Text Pairs for a Configuration and Language Combination [page 183]○ Delete All Text Values for a Specific Configuration, Lamguage, and Keyx Combination [page 184]

Related Information

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 [page 10]

2.7.1 Create a Key Figure

Create a key figure.

Request

Format: JSON

URI: http://<hostname>:<router port>/ipro/key-figures-backend/api/v1/key-figures

HTTP Method: POST

Request Example

{ "id":"speed-avg",

110 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

"metadata":{ "type": "key-figure", "language": "E" }, "properties":{ "title": "Average Speed", "subtitle": "Sensor 1", "description": "Average speed as recorded by sensor 1", "uom": "km/h" }, "data":{ "value": 123 } }

Request ParametersIf the ID of the key figure is provided in the body, this ID is taken. A new ID is created automatically if the ID is absent from the body.

In any case the metadata.type parameter is mandatory. The metadata.language parameter is the language of the language-sensitive attributes in the properties section. If the metadata.language parameter is missing, the language of the database session will be used.

To install a default set of language-sensitive properties which will be returned when no language has been specified in the request, or if a translation is missing for a certain language, set the paramater metadata.language : "" .

Table 69:

Parameter Required Description

id No ID of the key figure. If no ID is provided, an ID is generated auto­matically.

metadata Yes type: Value = key-figure

language: Language of the language-sensitive attributes in the properties section. If no language is specified, the language of the database session is used. To install a default set of lan­guage-sensitive properties that is returned when no language has been specified in the request or a translation is missing for a par­ticular language, set `"metadata.language" : ""`.

properties Yes Language-sensitive values containing the title, subtitle, descrip­tion, and unit of measurement of the key figure.

data Yes Value that is displayed

Response

Response Example

{ "KeyFigureCollection": [ { "id":"speed-avg", "metadata":{

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 111

"type": "key-figure", "language": "E", "modifiedAt": "2015-08-24 12:34:45", "modifiedBy": "SOMEONE" }, "properties":{ "title": "Average Speed", "subtitle": "Sensor 1", "description": "Average speed as recorded by sensor 1", "uom": "km/h" }, "data":{ "value": "123" } } ] }

Response Status and Error Codes

Table 70:

Code Description

200 Key figure was created.

201 Key figure with specified ID already exists.

Related Information

Configuring Insight Provider Using REST APIs [page 109]Read a Key Figure [page 112]Search for Key Figures [page 114]Read an Attribute Section of a Key Figure [page 115]Update a Key Figure [page 117]Delete a Key Figure [page 119]

2.7.1.1 Read a Key Figure

Retrieve a specific key figure.

Request

Format: JSON

URI: http://<hostname>:<router port>/ipro/key-figures-backend/api/v1/key-figures/<keyFigureId>

HTTP Method: GET

112 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Response

Response Example

{ "KeyFigureCollection": [ { "id":"speed-avg", "metadata":{ "type": "key-figure", "language": "E", "modifiedAt": "2015-08-24 12:34:45", "modifiedBy": "SOMEONE" }, "properties":{ "title": "Average Speed", "subtitle": "Sensor 1", "description": "Average speed as recorded by sensor 1", "uom": "mph" }, "data":{ "value": "53" } } ] }

Response Status and Error CodesTable 71:

Code Description

200 Requested key figure was found.

204 Key figure with the specified ID could not be found.

Related Information

Create a Key Figure [page 110]Update a Key Figure [page 117]Search for Key Figures [page 114]Delete a Key Figure [page 119]

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 113

2.7.1.2 Search for Key Figures

Retrieve key figures according to specific attributes and values.

Request

Format: JSON

URI: http://<hostname>:<router port>/ipro/key-figures-backend/api/v1/key-figures

HTTP Method: GET

Request Example

http://<host>.com:<port>/api/key-figures?id=*speed*&properties.uom=mph http://<host>.com:<port>/api/key-figures?metadata.modifiedBy=SOMEONE

Request ParametersSearches for key figures containing specified attributes and values. A search attribute can be any attribute of a key figure. Nested attributes can be addressed using the "." operator, for example, "metadata.modifiedBy=*SOMEONE*". Both search attributes and values may contain wildcards "*". Multiple attributes and value pairs can be specified using the "&" separator.

Response

Response Example

{ "KeyFigureCollection": [ { "id":"speed-avg", "metadata":{ "type": "key-figure", "language": "E", "modifiedAt": "2015-08-24 12:34:45", "modifiedBy": "SOMEONE" }, "properties":{ "title": "Average Speed", "subtitle": "Sensor 1", "description": "Average speed as recorded by sensor 1", "uom": "mph" }, "data":{ "value": "53" } }, { "id":"top-speed", "metadata":{ "type": "key-figure",

114 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

"language": "E", "modifiedAt": "2015-08-24 12:34:45", "modifiedBy": "SOMEONE" }, "properties":{ "title": "Top Speed", "subtitle": "Sensor 2", "description": "Top speed as recorded by sensor 2", "uom": "mph" }, "data":{ "value": "143" } } ] }

Response Status and Error CodesTable 72:

Code Description

200 Search finished successfully.

204 Key figure with specified ID does not exist.

Related Information

Create a Key Figure [page 110]Update a Key Figure [page 117]Delete a Key Figure [page 119]Read a Key Figure [page 112]

2.7.1.3 Read an Attribute Section of a Key Figure

Retrieve a specific attribute section of a key figure.

Request

Format: JSON

URI: http://<hostname>:<router port>/ipro/key-figures-backend/api/v1/key-figures/<keyFigureId>/<keyFigureSection>

The base URI can be changed according to the attributes you would like to read.

Examplehttp://<hostname>:<router port>/ipro/key-figures-backend/api/v1/key-figures/<keyFigureId>/properties displays all property attributes of a key figure.

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 115

http://<hostname>:<router port>/ipro/key-figures-backend/api/v1/key-figures/<keyFigureId>/metadata displays all metadata attributes of a key figure.

http://<hostname>:<router port>/ipro/key-figures-backend/api/v1/key-figures/<keyFigureId>/data displays all data attributes of a key figure.

HTTP Method: GET

Response

Response Example

{ "KeyFigureCollection": [ { "id":"speed-avg", "metadata":{ "type": "key-figure", "language": "E", "modifiedAt": "2015-08-24 12:34:45", "modifiedBy": "SOMEONE" } } ] }

{ "KeyFigureCollection": [ { "id":"speed-avg", "properties":{ "title": "Average Speed", "subtitle": "Sensor 1", "description": "Average speed as recorded by sensor 1", "uom": "mph" } } ] }

{ "KeyFigureCollection": [ { "id":"speed-avg", "data":{ "value": "53" } } ] }

Response Status and Error CodesTable 73:

Code Description

200 Requested key figure was found.

116 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Related Information

Create a Key Figure [page 110]Read a Key Figure [page 112]Search for Key Figures [page 114]Update a Key Figure [page 117]Delete a Key Figure [page 119]

2.7.1.4 Update a Key Figure

Update a key figure.

Request

Format: JSON

URI: http://<hostname>:<router port>/ipro/key-figures-backend/api/v1/key-figures

HTTP Method: PUT

Request Example

{ "id":"speed-avg", "metadata":{ "type": "key-figure" }, "properties":{ "uom": "mph" }, "data":{ "value": "53" } }

Request Parameters

The ID and type of the key figure object has to be provided in the body of the request.

Table 74:

Parameter Required Description

id Yes ID of the key figure you want to update

metadata No type: Value = key-figure

properties Yes Value you want to update

data No Value you want to update

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 117

Parameter Required Description

metrics NoNote

If you want to update the metrics used for a key figure, you need to provide all metrics, the ones you want to update and the ones that stay the same. Otherwise, metrics that are not provided in the metrics section are deleted from the API con­figuration. If you do not want to update the metrics used for a key figure, leave this section out.

Response

Response Example

{ "KeyFigureCollection": [ { "id":"speed-avg", "metadata":{ "type": "key-figure", "language": "E", "modifiedAt": "2015-08-24 12:34:45", "modifiedBy": "SOMEONE" }, "properties":{ "title": "Average Speed", "subtitle": "Sensor 1", "description": "Average speed as recorded by sensor 1", "uom": "mph" }, "data":{ "value": "53" } } ] }

Response Status and Error CodesTable 75:

Code Description

200 Key figure was updated.

204 Key figure with specified ID does not exist.

Related Information

Create a Key Figure [page 110]Search for Key Figures [page 114]

118 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Delete a Key Figure [page 119]Read a Key Figure [page 112]

2.7.1.5 Delete a Key Figure

Delete a specific key figure.

Request

Format: JSON

URI: http://<hostname>:<router port>/ipro/key-figures-backend/api/v1/key-figures/<keyFigureId>

HTTP Method: DELETE

Response

Response Status and Error CodesTable 76:

Code Description

200 Key figure is deleted.

204 Key figure with the specified ID could not be found.

Related Information

Create a Key Figure [page 110]

2.7.2 Create a Key Figure Set

Create a key figure set.

Request

Format: JSON

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 119

URI: http://<hostname>:<router port>/ipro/key-figures-backend/api/v1/key-figure-sets

HTTP Method: POST

Request Example

{ "id": "speedset", "metadata": { "type": "key-figure-set", "language": "", "key-figures": { "0": "top-speed", "1": "speed-avg" } }, "properties": { "description": "Speed related sensors", "title": "Top Speed and Average Speed" } }

Request ParametersIf the ID of the key figure set is provided in the body, this ID is taken. A new ID is created automatically if the ID is absent from the body.

In any case the metadata.type parameter is mandatory. The metadata.language parameter is the language of the language-sensitive attributes in the properties section. If the metadata.language parameter is missing, the language of the database session will be used.

To install a default set of language-sensitive properties which will be returned when no language has been specified in the request, or if a translation is missing for a certain language, set the paramater metadata.language : "" .

Table 77:

Parameter Required Description

id No ID of the key figure. If no ID is provided, an ID is generated auto­matically.

metadata Yes type: Value = key-figure

language: Language of the language-sensitive attributes in the properties section. If no language is specified, the language of the database session is used. To install a default set of lan­guage-sensitive properties that is returned when no language has been specified in the request or a translation is missing for a par­ticular language, set `"metadata.language" : ""`.

key figures: Key figures that are part of this key figure set..

properties Yes Language-sensitive values containing the title and description of the key figure set.

120 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Response

Response Example

{ "KeyFigureCollection": [ { "id": "speedset", "metadata": { "active": "true", "key-figures": { "0": "top-speed", "1": "speed-avg" }, "language": "", "modifiedAt": "2016-01-29 15:39:55.5570000", "modifiedBy": "SOMEONE", "type": "key-figure-set" }, "properties": { "description": "Speed related sensors", "title": "Top Speed and Average Speed" } } ] }

Response Status and Error CodesTable 78:

Code Description

200 Key figure set was created.

201 Key figure set with specified ID already exists.

Related Information

Configuring Insight Provider Using REST APIs [page 109]Update a Key Figure Set [page 127]Search for Key Figure Sets [page 123]Delete a Key Figure Set [page 129]Read a Key Figure Set [page 122]Read All Key Figures of a Key Figure Set [page 126]Read an Attibute Section of a Key Figure Set [page 124]

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 121

2.7.2.1 Read a Key Figure Set

Retrieve a specific key figure set.

Request

Format: JSON

URI: http://<hostname>:<router port>/ipro/key-figures-backend/api/v1/key-figure-sets/<keyFigureSetId>

HTTP Method: GET

Response

Response Example

{ "KeyFigureCollection": [ { "id": "speedset", "metadata": { "active": "true", "key-figures": { "0": "speed-avg", "1": "top-speed" }, "language": "", "modifiedAt": "2016-01-29 15:39:55.5570000", "modifiedBy": "SOMEONE", "type": "key-figure-set" }, "properties": { "description": "Speed related sensors", "title": "Average and Top Speed" } } ] }

Response Status and Error Codes

Table 79:

Code Description

200 Requested key figure set was found.

204 Key figure set with the specified ID could not be found.

122 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

2.7.2.2 Search for Key Figure Sets

Retrieve a key figure set according to specific attributes and values.

Request

Format: JSON

URI: http://<hostname>:<router port>/ipro/key-figures-backend/api/v1/key-figure-sets

HTTP Method: GET

Request Example

http://host.com:8080/api/key-figure-sets?metadata.modifiedBy=SOMEONE

Request ParametersSearches for key figure sets containing specified attributes and values. A search attribute can be any attribute of a key figure set. Nested attributes can be addressed using the "." operator, for example, "metadata.modifiedBy=*SOMEONE*". Both search attributes and values may contain wildcards "*". Multiple attributes and value pairs can be specified using the "&" separator.

Response

Response Example

{ "KeyFigureCollection": [ { "id": "fuelset", "metadata": { "active": "true", "key-figures": { "0": "fuel2", "1": "fuel1" }, "language": "", "modifiedAt": "2016-01-29 15:39:56.2480000", "modifiedBy": "SOMEONE", "type": "key-figure-set" }, "properties": { "description": "Fuel related sensors", "title": "Fuel Consumption" } }, { "id": "speedset", "metadata": { "active": "true", "key-figures": { "0": "speed-avg",

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 123

"1": "top-speed" }, "language": "", "modifiedAt": "2016-01-29 15:39:55.5570000", "modifiedBy": "SOMEONE", "type": "key-figure-set" }, "properties": { "description": "Speed related sensors", "title": "Average and Top Speed" } } ] }

Response Status and Error CodesTable 80:

Code Description

200 Search finished successfully.

204 No key figure sets could be found.

Related Information

Create a Key Figure Set [page 119]Update a Key Figure Set [page 127]Delete a Key Figure Set [page 129]Read a Key Figure Set [page 122]

2.7.2.3 Read an Attibute Section of a Key Figure Set

Retrieve a specific section of all key figures of a key figure set according to the specified ID of the key figure set.

Request

Format: JSON

URI: http://<hostname>:<router port>/ipro/key-figures-backend/api/v1/key-figure-sets/<keyFigureSetId>/key-figures/<section>

The base URI can be changed according to the attributes you would like to read.

Examplehttp://<hostname>:<router port>/ipro/key-figures-backend/api/v1/key-figure-sets/<keyFigureSetId>/key-figures/properties displays all property attributes of a key figure.

124 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

http://<hostname>:<router port>/ipro/key-figures-backend/api/v1/key-figure-sets/<keyFigureSetId>/key-figures/metadata displays all metadata attributes of a key figure.

http://<hostname>:<router port>/ipro/key-figures-backend/api/v1/key-figure-sets/<keyFigureSetId>/key-figures/data displays all data attributes of a key figure.

HTTP Method: GET

Response

Response Example

{ "KeyFigureCollection": [ { "id": "fuel2", "metadata": { "language": "", "modifiedAt": "2016-01-29 15:39:54.1560000", "modifiedBy": "JOHNDOE", "objectFilters": "CARID='Q3',SENSOR=0x3,REGISTER='0x3a'", "primaryObject": "CARS", "type": "key-figure" } }, { "id": "fuel1", "metadata": { "language": "", "modifiedAt": "2016-01-28 15:39:53.3970000", "modifiedBy": "JOHNDOE", "objectFilters": "CARID='Q3',SENSOR=0x1,REGISTER='0x4b'", "primaryObject": "CARS", "type": "key-figure" } } ] }

Response Status and Error CodesTable 81:

Code Description

200 Requested key figure set was found.

204 Key figure set with the specified ID could not be found.

Related Information

Create a Key Figure Set [page 119]Update a Key Figure Set [page 127]

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 125

Search for Key Figure Sets [page 123]Delete a Key Figure Set [page 129]Read a Key Figure Set [page 122]Read All Key Figures of a Key Figure Set [page 126]

2.7.2.4 Read All Key Figures of a Key Figure Set

Retrieve all key figures of a key figure set according to the specified ID of the key figure set.

Request

Format: JSON

URI: http://<hostname>:<router port>/ipro/key-figures-backend/api/v1/key-figure-sets/<keyFigureSetId>/key-figures

HTTP Method: GET

Response

Response Example

{ "KeyFigureCollection": [ { "data": { "value": "27.7" }, "id": "fuel2", "metadata": { "language": "", "modifiedAt": "2016-01-29 15:39:54.1560000", "modifiedBy": "SOMEONE", "objectFilters": "CARID='Q3',SENSOR=0x3,REGISTER='0x3a'", "primaryObject": "CARS", "type": "key-figure" }, "properties": { "description": "Fuel consumption recorded by sensor 3", "filters": "A4, Sensor 3", "timePeriod": "2015/12/01 - 2015/12/10", "title": "Fuel Consumption", "uom": "mpg" } }, { "data": { "value": "56.6" }, "id": "fuel1", "metadata": {

126 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

"language": "", "modifiedAt": "2016-01-28 15:39:53.3970000", "modifiedBy": "SOMEONE", "objectFilters": "CARID='Q3',SENSOR=0x1,REGISTER='0x4b'", "primaryObject": "CARS", "type": "key-figure" }, "properties": { "description": "Fuel consumption recorded by sensor 3", "filters": "A4, Sensor 3", "decimalPlaces": "", "timePeriod": "Last Week", "title": "Fuel Consumption", "uom": "gallons" } } ] }

Response Status and Error CodesTable 82:

Code Description

200 Requested key figure set was found.

204 Key figure set with the specified ID could not be found.

Related Information

Create a Key Figure Set [page 119]Update a Key Figure Set [page 127]Search for Key Figure Sets [page 123]Delete a Key Figure Set [page 129]Read a Key Figure Set [page 122]Read an Attibute Section of a Key Figure Set [page 124]

2.7.2.5 Update a Key Figure Set

Update a key figure set.

Request

Format: JSON

URI: http://<hostname>:<router port>/ipro/key-figures-backend/api/v1/key-figure-sets

HTTP Method: PUT

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 127

Request Example

{ "id": "speedset", "metadata": { "type": "key-figure-set", "language": "", "key-figures": { "0": "speed-avg", "1": "top-speed" } }, "properties": { "title": "Average And Top Speed" } }

Request ParametersIn the request parameters, provide the parameter sections that you want to update. If whole sections do not need to be updated, leave them out of the PUT call.

Table 83:

Parameter Required Description

id Yes ID of the key figure you want to update

metadata Yes type: Value = key-figure-set

key-figures: Key figures that you want to update in the key figure set

NoteIf you want to update the key figures used for a key figure set, you need to provide all key figures, the ones you want to up­date and the ones that stay the same. Otherwise, key figures that are not provided in the key-figures section are deleted from the API configuration. If you do not want to update the key figures used for a key figure set, leave this section out.

properties Yes Value you want to update

Response

Response Example

{ "KeyFigureCollection": [ { "id": "speedset", "metadata": { "active": "true", "key-figures": { "0": "speed-avg", "1": "top-speed"

128 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

}, "language": "", "modifiedAt": "2016-01-29 15:39:55.5570000", "modifiedBy": "JOHNDOE", "type": "key-figure-set" }, "properties": { "description": "Speed related sensors", "title": "Average And Top Speed" } } ] }

Response Status and Error Codes

Table 84:

Code Description

200 Key figure set was updated.

204 Key figure set with specified ID does not exist.

Related Information

Create a Key Figure Set [page 119]Search for Key Figure Sets [page 123]Delete a Key Figure Set [page 129]Read a Key Figure Set [page 122]

2.7.2.6 Delete a Key Figure Set

Delete a specific key figure set.

Request

Format: JSON

URI: http://<hostname>:<router port>/ipro/key-figures-backend/api/v1/key-figure-sets/<keyFigureSetId>

HTTP Method: DELETE

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 129

Response

Response Status and Error Codes

Table 85:

Code Description

200 Key figure set is deleted.

204 Key figure set with the specified ID could not be found.

2.7.3 Compute Key Figures

Compute values for all key figures of a key figure set according to the specified ID of the key figure set.

Request

URI: api/v1/key-figure-sets/{:id}/key-figures/compute

Format: JSON

URI: http://<hostname>:<router port>/ipro/key-figures-backend/api/v1/key-figure-sets/<keyFigureSetId>/key-figures/compute

HTTP Method: PUT

Request Example

{ "selected": ["machine_id1", "machine_id2"] }

Request Parameters

Table 86:

Parameter Required Description

selected Yes IDs of the key figure sets for which you want to trigger computa­tion.

NoteIf no values are specified for this parameter, computation is triggered for all key figure sets.

130 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Response

Response Example

{ "KeyFigureCollection": [ { "id":"speed-avg", "metadata":{ "type": "key-figure", "language": "E", "modifiedAt": "2015-08-24 12:34:45", "modifiedBy": "SOMEONE" }, "properties":{ "title": "Average Speed", "subtitle": "Sensor 1", "description": "Average speed as recorded by sensor 1", "uom": "mph" }, "data":{ "value": "53" } } ] }

Response Status and Error CodesTable 87:

Code Description

200 Values were computed for all key figures of a key figure set according to the speci­fied ID of the key figure set.

204 Key figure set with specified ID does not exist.

Related Information

Configuring Insight Provider Using REST APIs [page 109]

2.7.4 Retrieve a CSRF Token

Retrieves the CSRF token needed for REST calls for configuration.

Request

Format: JSON

URI: https://<host name>:<port>/api/v1/config/global

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 131

HTTP Method: GET

NoteAs the configuration end points of some insight provider are protected against cross site request forgery (CSRF), you need to retrieve the CSRF token first before the REST calls can be made to configure the insight providers. Extract the value for x-csrf-token from the response headers.

2.7.5 Create Configurations of an Insight Provider

Creates or overwrites configuration resources including nested resources for given configuration IDs

Request

NoteAs the configuration end points of this insight provider are protected against cross site request forgery (CSRF), you need to retrieve the CSRF token first before the following REST call can be made. Retrieve the CSRF token as described in the chapter Retrieve a CSRF Token [page 131].

Format: JSON

URI: http://<host>:<port>/ipro/<insight provider>/api/v1/configs

NoteFill in the variable <insight provider> with the value that corresponds to insight provider that you want to configure. For an overview of the insight provider values, see the chapter Insight Provider Values for Base URI [page 185].

HTTP Method: POST

Before you send the POST call, enter the x-csrf-token that you just retrieved in the header section of your REST API call.

Examplekey = x-csrf-token

value = <CSRF token that you retrieved with the previous GET call>

You can then go ahead with the POST call.

Request Example

[ {

132 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

"configId": "ahcc", "config": { "zoomLevel": 4 }, "i18n": [ { "lang": "en-US", "mapping": [ { "key" : "typeDimLabel", "text" : "Type", "key" : "colorLabel","text" : "Color" } ] }, { "lang": "de-DE", "mapping": [ { "key" : "typeDimLabel", "text" : "Typ", "key" : "colorLabel","text" : "Farbe" } ] } ] }, { "configId": "eid", "config": { "zoomLevel": 7 }, "i18n" : [ { "lang": "en-US", "mapping": [ { "key" : "typeDimLabel", "text" : "Type", "key" : "colorLabel","text" : "Color" } ] }, { "lang": "en-GB", "mapping": [ { "key" : "typeDimLabel", "text" : "Type", "key" : "colorLabel","text" : "Colour" } ] } ] }]

Request ParametersTable 88:

Parameter Required Description

configId Yes ID of the configuration of an insight provider

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 133

Parameter Required Description

config Yes Contains the configuration parameters of the insight provider

NoteThe configuration parameters vary for the insight providers. For an overview of configuration parameters you can use for a specific insight provider, see the chapter Configuration Pa­rameters per Insight Provider [page 135].

i18n Contains the mappings per language of text keys and text values

lang Language code

mapping Contains the mappings of text keys and text values for a specific language

Response

Format: JSON

Response Status and Error Codes

Table 89:

Code Description

200 Configurations for the insight provider were created.

Related Information

Configuring Insight Provider Using REST APIs [page 109]Create Configurations of an Insight Provider [page 132]Read a Configuration of an Insight Provider [page 161]Read All Configurations of an Insight Provider [page 162]Read a Front-End Configuration of an Insight Provider [page 164]Read All Text Interpretations for a Configuration of an Insight Provider [page 165]Read All Key-Text Pairs for a Configuration and Language Combination [page 167]Create Key-Text Pairs for a Configuration and Language Combination [page 168]Read a Text Value for a Specific Configuration, Lamguage, and Keyx Combination [page 170]Update a Configuration of an Insight Provider [page 171]Delete a Configuration of an Insight Provider [page 179]

134 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

2.7.5.1 Configuration Parameters per Insight Provider

Configuration Parameters for Asset Explorer

Table 90:

Configuration Parameter Sub-Parameters Description

i18n lang Language code

mapping Mapping of a text key (dimensionLabel) and a readable text string in the language defined with the parameter lang

config filterConfiguration Contains the following parameters:

● dimensionIdIdentifies the attribute filter

● dimensionNameName of the filter

● dimensionLabelKey of the filter that is used for text mapping in the i18n parameter section

NoteThe text mapped to this key is later on the filter label displayed in the Asset Explorer.

● dimensionSelectionTypeYou can choose among the follow­ing options:

○ MultipleBusiness users can filter on more than one value in the As­set Explorer.

○ SingleBusiness users can filter on only one value in the Asset Ex­plorer.

primaryObjectDimensionId Identifies an asset

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 135

Configuration Parameter Sub-Parameters Description

machineConfiguration Contains the following parameters to configure the asset list of the Asset Ex­plorer:

● tableConfiguration○ dimensionId

Identifies column that is to be displayed in the asset list

○ dimensionTypeDimension Type Data type of the column value such as string or float

○ dimensionPathBinds the column to the corre­sponding value of the JSON re­sponse sent by the back endThis field holds the path to the value, for example of an Anom­aly Score column. To render the value in UI, the correspond­ing column label has to be bound to the right path of the JSON, for example properties/AnomalyScore.

○ labelKey of the column label that is used for text mapping in the i18n parameter section

NoteThe text mapped to this key is later on the column label displayed in the Asset Ex­plorer.

○ defaultIdSpecifies what column is dis­played as first column in the ta­ble (value = "true")

NoteThe value true should be set for one dimension ID

136 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Configuration Parameter Sub-Parameters Description

only in the context of the tableConfiguration section.

○ defaultSortDefines the column according to which the asset list is sorted by default

NoteThe value true should be set for one dimension ID only in the context of the tableConfiguration section.

componentConfiguration Contains the same parameters like the tableConfiguration section, but to configure the components list within the Asset Explorer.

Sample Code

{ "i18n":[ { "lang":"en-US", "mapping":[ { "key":"healthStatusColumnLabel", "text":"Health Status" }, { "key":"nameColumnLabel", "text":"Name" } ] }, { "lang":"de", "mapping":[ { "key":"healthStatusColumnLabel", "text":"Gesundheitszustand" }, { "key":"nameColumnLabel", "text":"Name" } ] }, { "lang":"zh", "mapping":[

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 137

{ "key":"healthStatusColumnLabel", "text":"健康状态" }, { "key":"nameColumnLabel", "text":"资产名称" } ] } ], "config":{ "filterConfiguration":[ { "dimensionId":"MaintenancePlant", "dimensionName":"MaintenancePlant", "dimensionLabel":"maintenancePlaneDimensionLabel", "dimensionSelectionType":"Multiple" }, { "dimensionId":"machineId", "dimensionName":"machineId", "dimensionLabel":"primaryObjectIdDimensionLabel", "dimensionSelectionType":"Multiple" } ], "primaryObjectDimensionId":"machineId", "machineConfiguration":{ "tableConfiguration":[ { "dimensionId":"machineID", "dimensionType":"string", "dimensionPath":"id", "label":"primaryObjectDimensionId", "defaultId":true, "defaultSort":true }, { "dimensionId":"STATUS", "dimensionType":"healthStatus", "dimensionPath":"properties/STATUS", "label":"healthStatusColumnLabel", "defaultId":false, "defaultSort":false } ] }, "componentConfiguration":{ "tableConfiguration":[ { "dimensionId":"id", "dimensionType":"string", "dimensionPath":"id", "label":"componentIdColumnLabel", "defaultId":true, "defaultSort":true }, { "dimensionId":"name", "dimensionType":"string", "dimensionPath":"name", "label":"nameColumnLabel", "defaultId":false, "defaultSort":false } ] } }

138 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

}

Configuration Parameters for Components

Table 91:

Configuration Parameter Sub-Parameters Description

i18n lang Language code

mapping Mapping of a text key (dimensionLabel) and a readable text string in the language defined with the parameter lang

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 139

Configuration Parameter Sub-Parameters Description

config tableConfiguration Contains the following parameters to configure the component list:

● tableConfiguration○ dimensionId

Identifies column that is to be displayed in the component list

○ dimensionTypeDimension Type Data type of the column value such as string or float

○ dimensionPathBinds the column to the corre­sponding value of the JSON re­sponse sent by the back endThis field holds the path to the value, for example of an Anom­aly Score column. To render the value in UI, the correspond­ing column label has to be bound to the right path of the JSON, for example properties/AnomalyScore.

○ labelKey of the column label that is used for text mapping in the i18n parameter section

NoteThe text mapped to this key is later on the column label displayed in the component list.

○ defaultIdSpecifies what column is dis­played as first column in the ta­ble (value = "true")

NoteThe value true should be set for one dimension ID

140 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Configuration Parameter Sub-Parameters Description

only in the context of the tableConfiguration section.

○ defaultSortDefines the column according to which the component list is sorted by default

NoteThe value true should be set for one dimension ID only in the context of the tableConfiguration section.

Sample Code

{ "i18n":[ { "lang":"en-US", "mapping":[ { "key":"healthStatusColumnLabel", "text":"Health Status" }, { "key":"nameColumnLabel", "text":"Name" } ] }, { "lang":"zh", "mapping":[ { "key":"healthStatusColumnLabel", "text":"�康状�" }, { "key":"nameColumnLabel", "text":"�称" } ] } ], "config":{ "tableConfiguration":[ { "dimensionId":"id", "dimensionType":"string", "dimensionPath":"id", "label":"componentIdColumnLabel", "defaultId":true,

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 141

"defaultSort":true }, { "dimensionId":"name", "dimensionType":"string", "dimensionPath":"name", "label":"nameColumnLabel", "defaultId":false, "defaultSort":false } ] }}

Configuration Parameters for Derived Signals

Table 92:

Configuration Parameter Sub-Parameters Description

i18n lang Language code

mapping Mapping of a text key (ExternalID) and a readable text string in the lan­guage defined with the parameter lang

config displayDerivedSingals Contains the parameters to configure the columns of the list of derived signals

Sample Code

{ "i18n": [{ "lang": "en-US", "mapping": [{ "key": "ExternalId", "text": "test-translate" }] }], "config": { "displayDerivedSignals": { "columns": ["AssetId", "ComponentId", "Name", "Event", "Timestamp", "Status", "Type", "Severity", "Code", "Source", "ThingId"] } } }

142 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Configuration Parameters for Work Activities

Table 93:

Configuration Parameter Sub-Parameters Description

generic displayWorkActivity Contains the values to configure the col­umns of the list of work activities

These values can be taken from the fol­lowing views:

● WORKACTIVITY● WORKACTIVITY_TYPE_CODE_DESC

RIPTION● WORKACTIVITY_PRIORITY_DESCR

IPTION● WORKACTIVITY_STATUS_DESCRIP

TION

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 143

Configuration Parameter Sub-Parameters Description

createWorkActivity Contains the OData metadata and the OData credentials required to retrieve the fields displayed to business users to create work activities from the Asset Health Fact Sheet.

● ODataMetadata○ entitySet

Group of entitiesAn entity set is part of the data model of the OData service.

ExampleWork_Activities

○ contextToODataPropertyMapping

● credentials○ url

URL of the OData service that you use to post new work activ­ities to a system that exposes the end point of the OData service, for example, SAP Gate­way on top of SAP MRS

○ userTechnical user that is used to access the OData end point and create work activities in the target system.

○ passwordPassword of the technical user that is used to access the OData end point and create work activities in the target system.

Sample Code

{ "configId":"com.sap.pdms.app.ahcc", "generic":{ "displayWorkActivity":{ "columns":[ "Id", "Name", "ThingId", "ComponentId",

144 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

"TypeCodeDescription", "PriorityDescription", "StatusDescription", "StartTS", "EndTS", "ReportedBy", "AssignedTo" ] }, "createWorkActivity":{ "ODataMetadata":{ "entitySet":"NotificationsCollection", "contextToODataPropertyMapping":{ "assetId":{ "enabled":false, "targetProperty":"assetId" }, "description":{ "enabled":false, "targetProperty":"description" } } }, "credentials":{ "url":"<OData service URL>", "user":"<OData service user>", "password":"<User password>" } } } }

Configuration Parameters for the Map

Table 94:

Configuration Parameter Sub-Parameters Description

i18n

NoteThe definition of language mappings is mandatory.

lang Language code

mapping Mapping of a text key and a readable text string in the language defined with the parameter lang

config zoomLevel Number of levels for zooming into the map

latitude Initial focus of latitude of the map

longitude Initial focus of longitude of the map

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 145

Configuration Parameter Sub-Parameters Description

baseLayers Within the map settings you can config­ure base layer settings, overlay layer set­tings, and the layer color mapping.

NoteThe usage of the following tile provid­ers is supported:

● OpenStreetMap● Esri● Noki Here

You can define the following parameters:

● layerNameName of the base layer

NoteThis name should be unique for each layer. The name is dis­played later on the UI of the map.

● layerTypeType of the base layerYou can choose between the follow­ing types:○ xyz

If you choose this type, make sure you specify a layerUrl.

○ esriIf you choose this type, make sure you specify an esri Base Layer Type.

● layerUrlURL template of the tile provider for the base layer

NoteWhen using Open Street Maps with 'https' use layerUrl : https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png

146 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Configuration Parameter Sub-Parameters Description

NoteSet the parameter mandatory to true if you filled in the pa­rameter layerUrl.

● layerParamsThe parameter esriBaseLayerType specifies the base layer type if the base layer is of type esri.For more information about esri base layer types, see http://www.esri.com/data/basemaps .

NoteSet the parameter mandatory to true if you filled in the pa­rameter layerParams.

● layerOptionsThe parameter attribution is a string that defines the copyright of the map provider. You can also in­clude an HTML link that leads to the copyrights of the map provider.

Example© Mapbox

NoteSet the parameter mandatory to true if you filled in the pa­rameter attribution.

● app_id

NoteFill in this parameter if you use Noki Here Maps as tile provider.

App ID used to register to the tile provider.

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 147

Configuration Parameter Sub-Parameters Description

NoteSet the parameter mandatory to true if you filled in the pa­rameter app_id.

● app_code

NoteFill in this parameter if you use Noki Here Maps.

App code used to register to the tile provider.

NoteSet the parameter mandatory to true if you filled in the pa­rameter app_code.

● subdomains

NoteFill in this parameter if your tile provider use subdomains.

For more information about subdo­mains and subdomain prefixes, see https://developer.here.com/news/201602172#.V-Fc2U1pDct .

NoteSet the parameter mandatory to true if you filled in the pa­rameter subdomains.

● mapIDVersion of the map

NoteFill in this parameter according to the requirements and conven­tions of your tile provider.

148 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Configuration Parameter Sub-Parameters Description

NoteSet the parameter mandatory to true if you filled in the pa­rameter mapID.

● baseMap type such as panorama, traffic, or base

NoteFill in this parameter according to the requirements and conven­tions of your tile provider.

NoteSet the parameter mandatory to true if you filled in the pa­rameter base.

● maxZoomMaximum number of levels for zooming into the base layer.

NoteThis setting overrules the ge­neric map zoom level.

NoteSet the parameter mandatory to true if you filled in the pa­rameter maxZoom.

● noWrapValue true: base layers do not load outside the world width (-180 to 180 longitude).

● initialBaseLayerValue true sets this base layer as the default base layer.

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 149

Configuration Parameter Sub-Parameters Description

overlayLayers You can define the following parameters:

● layerNameName of the overlay layer

NoteThis name should be unique for each layer. The name is dis­played later on the UI of the map.

● layerLevelLayer level of an overlay layer used for numbering across layersThis setting is used as the ID of the layer.

● layerTypeYou can choose among the follow­ing values:

○ marker: Assets are displayed on the map individually.

○ cluster: Assets are clus­tered on the map according to the zoom level. The further users zoom out of a map, the wider the radius of a cluster.

indicatorType Key of indicator that is defined for de­rived signals. This key is used for color­ing assets on the map according to their derived signals.

150 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Configuration Parameter Sub-Parameters Description

layerColorMapping You can define the following parameters:

● layerLevelLayer level of an overlay layer used for numbering across layersThis setting is used as the ID of the layer.

● indicatorTypeKey of indicator that is defined for derived signals. This key is used for coloring assets on the map accord­ing to their derived signals.

● selectionTableYou can define the following values:

○ sign:Include or exclude a certain range of derived signals for color mappingYou can choose among the fol­lowing values:○ I: Means inclusive ap­

proach○ E: Means exclusive ap­

proach

ExampleAll assets that have received (I) between 5 and 10 derived signals are displayed yellow.

○ option:Range of derived signals that you want to map to a certain colorYou can choose among the fol­lowing values:○ LE: Means less or equal

(Low needs to remain empty, a number needs to be entered for High)

○ BT: Means between (ex­cluding the minimum number of derived signals and including the maxi­

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 151

Configuration Parameter Sub-Parameters Description

mum number of derived signals)

○ GT: Means greater than (a number needs to be en­tered for Low), High needs to remain empty)

○ EQ: Means equals (the same numbers needs to be entered for High and Low)

ExampleAll assets that have received between (BT) 5 and 10 de­rived signals are displayed yellow.

○ low:Minimum number of derived signals

ExampleAll assets that have received between 5 (Low) and 10 de­rived signals are displayed yellow.

○ high:Maximum number of derived signals

ExampleAll assets that have received between 5 and 10 (High) de­rived signals are displayed yellow.

○ color:Color used to visualize the number of derived signals for an asset

152 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Configuration Parameter Sub-Parameters Description

NoteThe following colors are supported: red (critical), orange (severe), green (good), grey (unknown).

Sample Code

{ "i18n": [ { "lang": "en-US", "mapping": [ { "key": "$MINES", "text": "Mines" }, { "key": "$PIPELINES", "text": "Pipelines" } ] }, { "lang": "de", "mapping": [ { "key": "$MINES", "text": "Minen" }, { "key": "$PIPELINES", "text": "Rohrleitungen" } ] }, { "lang": "zh", "mapping": [ { "key": "$MINES", "text": "矿区" }, { "key": "$PIPELINES", "text": "管道" } ] }],"config": { "zoomLevel": 4, "latitude": 20.8, "longitude": 23.8, "baseLayers": [ { "layerName": "Open Street Maps", "layerType": "xyz",

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 153

"layerUrl": { "layerUrl": "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", "mandatory": true }, "layerParams": { "esriBaseLayerType": "", "mandatory": false }, "layerOptions": { "attribution": { "attribution": "&copy; <a href=\"http://osm.org/copyright\">OpenStreetMap</a> contributors", "mandatory": true }, "app_id": { "app_id": "", "mandatory": false }, "app_code": { "app_code": "", "mandatory": false }, "subdomains": { "subdomains": "", "mandatory": false }, "mapID": { "mapID": "", "mandatory": false }, "base": { "base": "", "mandatory": false }, "maxZoom": { "maxZoom": "", "mandatory": false }, "noWrap": { "noWrap": true } }, "initialBaseLayer": "true" }, { "layerName": "Satellite", "layerType": "esri", "layerUrl": { "layerUrl": "", "mandatory": false }, "layerParams": { "esriBaseLayerType": "Imagery", "mandatory": true }, "layerOptions": { "attribution": { "attribution": "", "mandatory": false }, "app_id": { "app_id": "", "mandatory": false }, "app_code": { "app_code": "", "mandatory": false },

154 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

"subdomains": { "subdomains": "", "mandatory": false }, "mapID": { "mapID": "", "mandatory": false }, "base": { "base": "", "mandatory": false }, "maxZoom": { "maxZoom": "", "mandatory": false }, "noWrap": { "noWrap": true } }, "initialBaseLayer": "false" } ], "overlayLayers": [ { "layerName": "MINES", "layerLevel": 3, "layerType": "marker" }, { "layerName": "PIPELINES", "layerLevel": 2, "layerType": "marker" } ], "indicatorType": "DERIVED_SIGNALS", "layerColorMapping": [ { "layerLevel": 1, "indicatorType": "DERIVED_SIGNALS", "selectionTable": [ { "sign": "I", "option": "LE", "low": "", "high": "0", "color": "grey" }, { "sign": "I", "option": "GT", "low": "0", "high": "", "color": "green" } ] } ]} }

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 155

Configuration Parameters for the 2D Chart

Table 95:

Configuration Parameter Sub-Parameters Description

i18n lang Language code

mapping Mapping of a text key defined in the TimeFilter parameter and a reada­ble text string in the language defined with the parameter lang

config TimeFilters

Contains parameters to define the ag­gregation levels for which you can dis­play data measurements in the 2D chart

Contains the following parameters

● keyKey of the time interval

● textLabel of the time interval that is dis­played on the UI of the 2D chart

Example48 Hours, Today

● numberValue of the time interval

Example48 for a time interval of 48 hours

● unitUnit of the time interval

Examplehour for a time interval of 48 hours

You can define the following values:

○ hour○ day○ week○ month○ year

DefaultMetricConfig The metrics (measurements) that you want to make available for display in the 2D chart

156 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Sample Code

[{ "configId": "com.sap.pdms.app.ahcc", "config": { "TimeFilters": [{ "key": "1W", "text": "1 Week", "number": 1, "unit": "week" }, { "key": "3M", "text": "3 Months", "number": 3, "unit": "month" }], "DefaultMetricConfig": [{ "uniqueId": "[LC-50001-01-B2-M1] com.sap.pdms.example.trains:TractionMotor > temperature1 > Temperature" }] }, "i18n": [{ "lang": "de", "mapping": [{ "key": "1W", "text": "1 Woche" }] }]}]

Configuration Parameters for the 3D Chart

Table 96:

Configuration Parameter Sub-Parameters Description

config defaultMetricConfig The metrics (measurements) that you want to make available for display in the 3D chart

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 157

Configuration Parameter Sub-Parameters Description

settings Contains the following parameters to de­fine the view settings:

● renderingModeRendering mode of the 3D chartThis setting determines the color and lighting of the 3D scene, and the surface of the 3D chart.You can choose between the follow­ing values:○ 1

No lighting effects are used. This means, no shadings are used, for example.

NoteThis rendering mode is less resource-consuming.

○ 2Lighting effects are used. This means, shadings are used, for example.

● labelXSet this parameter to false if no lable should be displayed on the x-axis

● labelYSet this parameter to false if no lable should be displayed on the y-axis

● labelZSet this parameter to false if no lable should be displayed on the z-axis

● axisSet this parameter to true if axes should be displayed in the 3D chart

Contains the following parameters to de­fine the color settings:

● surfaceSurface that can be built based on the measurements of assets dis­played in the 3D chart

158 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Configuration Parameter Sub-Parameters Description

● surfaceFrom

NoteThis parameter is relevant only if you chose the view rendering mode 1.

The color you choose will gradiently change to the color you choose for surfaceTo. The color gradient goes from low values (surfaceFrom) to high values (surfaceTo).

● surfaceTo

NoteThis parameter is relevant only if you chose the view rendering mode 1.

The color you choose will be the tar­get color of the gradiently changing color that you choose for surfaceFrom. The color gradient goes from low values (surfaceFrom) to high values (surfaceTo).

● backgroundBackground color of the 3D chart

● axisTextColor of labels on the axes

● specLimitThreshold for measurements of as­sets

● timeSliderTime line selector where you can select the time interval that you want to be displayed in the 3D chart.

● linesLine that connect the measure­ments of an asset displayed in the 3D chart

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 159

Configuration Parameter Sub-Parameters Description

● eventsDerived signals

● timeSliderBrushSelected time interval in the time line selector.

Contains the following parameters to de­fine generic chart settings:

● maxMachinesMaximum number of assets that are allowed to be displayed in the 3D data chart

● animateTransitionAngleAngle by which the animated transi­tion moves through the scene

● animateTransitionSet this parameter to true if you want the transition between chart displays to be animated.

● fromDateMaximum time interval for which data is displayed in the 3D chartThe time interval is defined by the start date you enter here, and the end date which is the present day

● aggThresholdsThresholds used to automatically compute the aggregation level used for a given back-end request to read metrics located in the data model

Sample Code

{ "i18n": [], "config": { "defaultMetricConfig": [], "settings": { "view": { "renderingMode": 2, "labelX": false, "labelY": true, "labelZ": false, "axis": true }, "colors": { "surface": "#405f6b", "surfaceFrom": "#405f6b", "surfaceTo": "#02ff0f", "background": "#000000",

160 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

"axisText": "#fffefe", "specLimit": "#f0ab00", "timeSlider": "#009de0", "lines": "#ff0000", "events": "#a24020", "timeSliderBrush": "#d9e7e6" }, "maxMachines": 5, "animateTransitionAngle": -45, "animateTransition": true, "fromDate": "2016-07-13", "aggThresholds": { "minutes": 3000, "hours": 360000, "days": 36000000 } } }

2.7.5.2 Read a Configuration of an Insight Provider

Fetches a configuration with a specific configuration ID

Request

Format: JSON

URI: http://<host>:<port>/ipro/<insight provider>/api/v1/configs/<configID>

NoteFill in the variable <insight provider> with the value that corresponds to insight provider that you want to configure. For an overview of the insight provider values, see the chapter Insight Provider Values for Base URI [page 185].

HTTP Method: GET

Response

Response Example

{ "config": { "zoomLevel": 4 }, "i18n": [ { "lang": "en-US", "mapping": [

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 161

{ "key" : "typeDimLabel", "text" : "Type", "key" : "colorLabel","text" : "Color" } ] }, { "lang": "de-DE", "mapping": [ { "key" : "typeDimLabel", "text" : "Typ", "key" : "colorLabel","text" : "Farbe" } ] } ] }

Response Status and Error CodesTable 97:

Code Description

200 Requested insight provider configuration was found.

Related Information

Configuring Insight Provider Using REST APIs [page 109]Create Configurations of an Insight Provider [page 132]Read All Configurations of an Insight Provider [page 162]Read a Front-End Configuration of an Insight Provider [page 164]Read All Text Interpretations for a Configuration of an Insight Provider [page 165]Read All Key-Text Pairs for a Configuration and Language Combination [page 167]Create Key-Text Pairs for a Configuration and Language Combination [page 168]Read a Text Value for a Specific Configuration, Lamguage, and Keyx Combination [page 170]

2.7.5.3 Read All Configurations of an Insight Provider

Fetches all configurations of an insight provider

Request

Format: JSON

URI: http://<host>:<port>/ipro/<insight provider>/api/v1/configs

162 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

NoteFill in the variable <insight provider> with the value that corresponds to insight provider that you want to configure. For an overview of the insight provider values, see the chapter Insight Provider Values for Base URI [page 185].

HTTP Method: GET

Response

Response Example

[ { "configId": "ahcc", "config": { "zoomLevel": 4 }, "i18n": [ { "lang": "en-US", "mapping": [ { "key" : "typeDimLabel", "text" : "Type", "key" : "colorLabel","text" : "Color" } ] }, { "lang": "de-DE", "mapping": [ { "key" : "typeDimLabel", "text" : "Typ", "key" : "colorLabel","text" : "Farbe" } ] } ] }, { "configId": "eid", "config": { "zoomLevel": 7 }, "i18n" : [ { "lang": "en-US", "mapping": [ { "key" : "typeDimLabel", "text" : "Type", "key" : "colorLabel","text" : "Color" } ] }, { "lang": "en-GB", "mapping": [ { "key" : "typeDimLabel", "text" : "Type", "key" : "colorLabel","text" : "Colour" }

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 163

] } ] } ]

Response Status and Error CodesTable 98:

Code Description

200 Requested insight provider configurations were found.

Related Information

Configuring Insight Provider Using REST APIs [page 109]Create Configurations of an Insight Provider [page 132]Read a Configuration of an Insight Provider [page 161]Read a Front-End Configuration of an Insight Provider [page 164]Read All Text Interpretations for a Configuration of an Insight Provider [page 165]Read All Key-Text Pairs for a Configuration and Language Combination [page 167]Create Key-Text Pairs for a Configuration and Language Combination [page 168]Read a Text Value for a Specific Configuration, Lamguage, and Keyx Combination [page 170]

2.7.5.4 Read a Front-End Configuration of an Insight Provider

Fetches the frontend Insight Provider configuration for a given configId

Request

Format: JSON

URI: http://<host>:<port>/ipro/<insight provider>/api/v1/configs/<configID>/common-configs

NoteFill in the variable <insight provider> with the value that corresponds to insight provider that you want to configure. For an overview of the insight provider values, see the chapter Insight Provider Values for Base URI [page 185].

HTTP Method: GET

164 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Response

Response Example

{ "zoomLevel": 4, "aggregationLevel": "HOUR" }

Response Status and Error CodesTable 99:

Code Description

200 Requested front-end configuration was found.

Related Information

Configuring Insight Provider Using REST APIs [page 109]Create Configurations of an Insight Provider [page 132]Read a Configuration of an Insight Provider [page 161]Read All Configurations of an Insight Provider [page 162]Read All Text Interpretations for a Configuration of an Insight Provider [page 165]Read All Key-Text Pairs for a Configuration and Language Combination [page 167]Create Key-Text Pairs for a Configuration and Language Combination [page 168]Read a Text Value for a Specific Configuration, Lamguage, and Keyx Combination [page 170]

2.7.5.5 Read All Text Interpretations for a Configuration of an Insight Provider

Fetches all text interpretations for a given configuration ID

Request

Format: JSON

URI: http://<host>:<port>/ipro/<insight provider>/api/v1/configs/<configID>/text-interpretations

NoteFill in the variable <insight provider> with the value that corresponds to insight provider that you want to configure. For an overview of the insight provider values, see the chapter Insight Provider Values for Base URI [page 185].

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 165

HTTP Method: GET

Response

Response Example

[ { "lang": "en-US", "mapping": [ { "key" : "typeDimLabel", "text" : "Type", "key" : "colorLabel","text" : "Color" } ] }, { "lang": "de-DE", "mapping": [ { "key" : "typeDimLabel", "text" : "Typ", "key" : "colorLabel","text" : "Farbe" } ] } ]

Response Status and Error Codes

Table 100:

Code Description

200 Requested text interpretations were found.

Related Information

Configuring Insight Provider Using REST APIs [page 109]Create Configurations of an Insight Provider [page 132]Read a Configuration of an Insight Provider [page 161]Read All Configurations of an Insight Provider [page 162]Read a Front-End Configuration of an Insight Provider [page 164]Read All Key-Text Pairs for a Configuration and Language Combination [page 167]Create Key-Text Pairs for a Configuration and Language Combination [page 168]Read a Text Value for a Specific Configuration, Lamguage, and Keyx Combination [page 170]

166 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

2.7.5.6 Read All Key-Text Pairs for a Configuration and Language Combination

Request

Format: JSON

URI: http://<host>:<port>/ipro/<insight provider>/api/v1/configs/<configID>/text-interpretations/<language>

NoteFill in the variable <insight provider> with the value that corresponds to insight provider that you want to configure. For an overview of the insight provider values, see the chapter Insight Provider Values for Base URI [page 185].

HTTP Method: GET

Response

Response Example

{ "mapping": [ { "key" : "typeDimLabel", "text" : "Type", "key" : "colorLabel","text" : "Color" } ] }

Response Status and Error CodesTable 101:

Code Description

200 Requested text interpretations were found.

Related Information

Configuring Insight Provider Using REST APIs [page 109]Create Configurations of an Insight Provider [page 132]Read a Configuration of an Insight Provider [page 161]Read All Configurations of an Insight Provider [page 162]

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 167

Read a Front-End Configuration of an Insight Provider [page 164]Read All Text Interpretations for a Configuration of an Insight Provider [page 165]Create Key-Text Pairs for a Configuration and Language Combination [page 168]Read a Text Value for a Specific Configuration, Lamguage, and Keyx Combination [page 170]

2.7.5.7 Create Key-Text Pairs for a Configuration and Language Combination

Creates key-text pairs for a configuration ID and a given language ID

Request

NoteAs the configuration end points of this insight provider are protected against cross site request forgery (CSRF), you need to retrieve the CSRF token first before the following REST call can be made. Retrieve the CSRF token as described in the chapter Retrieve a CSRF Token [page 131].

Format: JSON

URI: http://<host>:<port>/ipro/<insight provider>/api/v1/configs/<configID>/text-interpretations/<lang>

NoteFill in the variable <insight provider> with the value that corresponds to insight provider that you want to configure. For an overview of the insight provider values, see the chapter Insight Provider Values for Base URI [page 185].

HTTP Method: PUT

Before you send the PUT call, enter the x-csrf-token that you just retrieved in the header section of your REST API call.

Examplekey = x-csrf-token

value = <CSRF token that you retrieved with the previous GET call>

You can then go ahead with the PUT call.

Request Example

{ "mapping": [ {

168 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

"key" : "typeDimLabel", "text" : "Type", "key" : "colorLabel","text" : "Color" } ] }

Request Parameters

Table 102:

Parameter Required Description

mapping Contains the mappings of text keys and text values for a specific language

Response

Format: JSON

Response Status and Error Codes

Table 103:

Code Description

200 Key-text pairs for the specified configuration ID were created.

Related Information

Configuring Insight Provider Using REST APIs [page 109]Create Configurations of an Insight Provider [page 132]Read a Configuration of an Insight Provider [page 161]Read All Configurations of an Insight Provider [page 162]Read a Front-End Configuration of an Insight Provider [page 164]Read All Text Interpretations for a Configuration of an Insight Provider [page 165]Read All Key-Text Pairs for a Configuration and Language Combination [page 167]Read a Text Value for a Specific Configuration, Lamguage, and Keyx Combination [page 170]Configuring Insight Provider Using REST APIs [page 109]Update a Configuration of an Insight Provider [page 171]Update All Configurations of an Insight Provider [page 173]Update a Text Value for a Specific Configuration, Text Key, and Language Combination [page 177]

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 169

2.7.5.8 Read a Text Value for a Specific Configuration, Lamguage, and Keyx Combination

Fetches the text value for a specific configuration ID, language, and key combination

Request

Format: JSON

URI: http://<host>:<port>/ipro/<insight provider>/api/v1/configs/<configID>/text-interpretations/<lang>/<key>

NoteFill in the variable <insight provider> with the value that corresponds to insight provider that you want to configure. For an overview of the insight provider values, see the chapter Insight Provider Values for Base URI [page 185].

HTTP Method: GET

Response

Response Example

{ "text": "Type" }

Response Status and Error CodesTable 104:

Code Description

200 Requested text value was found.

Related Information

Configuring Insight Provider Using REST APIs [page 109]Create Configurations of an Insight Provider [page 132]Read a Configuration of an Insight Provider [page 161]Read All Configurations of an Insight Provider [page 162]Read a Front-End Configuration of an Insight Provider [page 164]Read All Text Interpretations for a Configuration of an Insight Provider [page 165]

170 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Read All Key-Text Pairs for a Configuration and Language Combination [page 167]Create Key-Text Pairs for a Configuration and Language Combination [page 168]

2.7.6 Update a Configuration of an Insight Provider

Updates a configuration with a specific configuration ID

Request

NoteAs the configuration end points of this insight provider are protected against cross site request forgery (CSRF), you need to retrieve the CSRF token first before the following REST call can be made. Retrieve the CSRF token as described in the chapter Retrieve a CSRF Token [page 131].

Format: JSON

URI: http://<host>:<port>/ipro/<insight provider>/api/v1/configs/<configID>

NoteFill in the variable <insight provider> with the value that corresponds to insight provider that you want to configure. For an overview of the insight provider values, see the chapter Insight Provider Values for Base URI [page 185].

HTTP Method: PUT

Before you send the PUT call, enter the x-csrf-token that you just retrieved in the header section of your REST API call.

Examplekey = x-csrf-token

value = <CSRF token that you retrieved with the previous GET call>

You can then go ahead with the PUT call.

Request Example

[ { "configId": "ahcc", "config": { "zoomLevel": 4 }, "i18n": [ { "lang": "en-US",

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 171

"mapping": [ { "key" : "typeDimLabel", "text" : "Type", "key" : "colorLabel","text" : "Color" } ] }, { "lang": "de-DE", "mapping": [ { "key" : "typeDimLabel", "text" : "Typ", "key" : "colorLabel","text" : "Farbe" } ] } ] }, { "configId": "eid", "config": { "zoomLevel": 7 }, "i18n" : [ { "lang": "en-US", "mapping": [ { "key" : "typeDimLabel", "text" : "Type", "key" : "colorLabel","text" : "Color" } ] }, { "lang": "en-GB", "mapping": [ { "key" : "typeDimLabel", "text" : "Type", "key" : "colorLabel","text" : "Colour" } ] } ] } ]

Request ParametersTable 105:

Parameter Required Description

configId Yes

zoomLevel

i18n ID of the configuration of an insightContains the mappings per language of text keys and text values

lang Language code

mapping Contains the mappings of text keys and text values for a specific language

172 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Response

Format: JSON

Response Status and Error CodesTable 106:

Code Description

200 Configuration with the specified configuration ID was updated.ID of the configura­tion of an insight provider

Related Information

Configuring Insight Provider Using REST APIs [page 109]Create Configurations of an Insight Provider [page 132]Update All Configurations of an Insight Provider [page 173]Update Key-Text Pairs for a Configuration and Language Combination [page 176]Update a Text Value for a Specific Configuration, Text Key, and Language Combination [page 177]Delete a Configuration of an Insight Provider [page 179]

2.7.6.1 Update All Configurations of an Insight Provider

Deletes any existing configurations of an insight provider, regardless of their configuration IDs, and then creates new configurations for the given configuration IDs

Request

NoteAs the configuration end points of this insight provider are protected against cross site request forgery (CSRF), you need to retrieve the CSRF token first before the following REST call can be made. Retrieve the CSRF token as described in the chapter Retrieve a CSRF Token [page 131].

Format: JSON

URI: http://<host>:<port>/ipro/<insight provider>/api/v1/configs

NoteFill in the variable <insight provider> with the value that corresponds to insight provider that you want to configure. For an overview of the insight provider values, see the chapter Insight Provider Values for Base URI [page 185].

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 173

HTTP Method: PUT

Before you send the PUT call, enter the x-csrf-token that you just retrieved in the header section of your REST API call.

Examplekey = x-csrf-token

value = <CSRF token that you retrieved with the previous GET call>

You can then go ahead with the PUT call.

Request Example

[ { "configId": "ahcc", "config": { "zoomLevel": 4 }, "i18n": [ { "lang": "en-US", "mapping": [ { "key" : "typeDimLabel", "text" : "Type", "key" : "colorLabel","text" : "Color" } ] }, { "lang": "de-DE", "mapping": [ { "key" : "typeDimLabel", "text" : "Typ", "key" : "colorLabel","text" : "Farbe" } ] } ] }, { "configId": "eid", "config": { "zoomLevel": 7 }, "i18n" : [ { "lang": "en-US", "mapping": [ { "key" : "typeDimLabel", "text" : "Type", "key" : "colorLabel","text" : "Color" } ] }, { "lang": "en-GB", "mapping": [ { "key" : "typeDimLabel", "text" : "Type", "key" : "colorLabel","text" : "Colour" } ]

174 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

} ] } ]

Request ParametersTable 107:

Parameter Required Description

configId Yes ID of the configuration of an insight provider

zoomLevel

i18n Contains the mappings per language of text keys and text values

lang Language code

mapping Contains the mappings of text keys and text values for a specific language

Response

Format: JSON

Response Status and Error CodesTable 108:

Code Description

200 Configurations for the insight provider were created.

Related Information

Configuring Insight Provider Using REST APIs [page 109]Update a Configuration of an Insight Provider [page 171]Update Key-Text Pairs for a Configuration and Language Combination [page 176]Update a Text Value for a Specific Configuration, Text Key, and Language Combination [page 177]

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 175

2.7.6.2 Update Key-Text Pairs for a Configuration and Language Combination

Updates key-text pairs for a configuration ID and a given language ID

Request

NoteAs the configuration end points of this insight provider are protected against cross site request forgery (CSRF), you need to retrieve the CSRF token first before the following REST call can be made. Retrieve the CSRF token as described in the chapter Retrieve a CSRF Token [page 131].

Format: JSON

URI: http://<host>:<port>/ipro/<insight provider>/api/v1/configs/<configID>/text-interpretations/<lang>

NoteFill in the variable <insight provider> with the value that corresponds to insight provider that you want to configure. For an overview of the insight provider values, see the chapter Insight Provider Values for Base URI [page 185].

HTTP Method: PUT

Before you send the PUT call, enter the x-csrf-token that you just retrieved in the header section of your REST API call.

Examplekey = x-csrf-token

value = <CSRF token that you retrieved with the previous GET call>

You can then go ahead with the PUT call.

Request Example

{ "mapping": [ { "key" : "typeDimLabel", "text" : "Type", "key" : "colorLabel","text" : "Color" } ] }

176 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Request ParametersTable 109:

Parameter Required Description

mapping Contains the mappings of text keys and text values for a specific language

Response

Format: JSON

Response Status and Error CodesTable 110:

Code Description

200 Key-text pairs for the specified configuration ID were updated.

2.7.6.3 Update a Text Value for a Specific Configuration, Text Key, and Language Combination

Updates a text value for a specific key for a configuration ID and language combination

Request

NoteAs the configuration end points of this insight provider are protected against cross site request forgery (CSRF), you need to retrieve the CSRF token first before the following REST call can be made. Retrieve the CSRF token as described in the chapter Retrieve a CSRF Token [page 131].

Format: JSON

URI: http://<port>:<host>/ipro/<insight provider>/api/v1/configs/<configID>/text-interpretations/<lang>/<key>

NoteFill in the variable <insight provider> with the value that corresponds to insight provider that you want to configure. For an overview of the insight provider values, see the chapter Insight Provider Values for Base URI [page 185].

HTTP Method: PUT

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 177

Before you send the PUT call, enter the x-csrf-token that you just retrieved in the header section of your REST API call.

Examplekey = x-csrf-token

value = <CSRF token that you retrieved with the previous GET call>

You can then go ahead with the PUT call.

Request Example

{ "text": "Type" }

Request Parameters

Table 111:

Parameter Required Description

text Yes Contains the updated text value, for example, Type

Response

Format: JSON

Response Status and Error Codes

Table 112:

Code Description

200 Key-text pairs for the specified configuration ID were updated.

Related Information

Configuring Insight Provider Using REST APIs [page 109]Update a Configuration of an Insight Provider [page 171]Update All Configurations of an Insight Provider [page 173]Update Key-Text Pairs for a Configuration and Language Combination [page 176]

178 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

2.7.7 Delete a Configuration of an Insight Provider

Deletes all nested configuration resources for a given configuration ID

Request

Format: JSON

URI: http://<host>:<port>/ipro/<insight provider>/api/v1/configs/<configID>

NoteFill in the variable <insight provider> with the value that corresponds to insight provider that you want to configure. For an overview of the insight provider values, see the chapter Insight Provider Values for Base URI [page 185].

HTTP Method: DELETE

Response

Response Status and Error Codes

Table 113:

Code Description

200 Configuration with the specified configuration ID was deleted.

Related Information

Configuring Insight Provider Using REST APIs [page 109]Create Configurations of an Insight Provider [page 132]Update a Configuration of an Insight Provider [page 171]Delete All Configurations of an Insight Provider [page 180]Delete a Back-End Configuration and Front-End Configuration of an Insight Provider [page 181]Delete All Text Interpretations for a Configuration of an Insight Provider [page 182]Delete All Key-Text Pairs for a Configuration and Language Combination [page 183]Delete All Text Values for a Specific Configuration, Lamguage, and Keyx Combination [page 184]

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 179

2.7.7.1 Delete All Configurations of an Insight Provider

Deletes all configurations of an insight provider

Request

Format: JSON

URI: http://<host>:<port>/ipro/<insight provider>/api/v1/configs

NoteFill in the variable <insight provider> with the value that corresponds to insight provider that you want to configure. For an overview of the insight provider values, see the chapter Insight Provider Values for Base URI [page 185].

HTTP Method: DELETE

Response

Response Status and Error Codes

Table 114:

Code Description

200 Configurations for the insight provider were deleted.

Related Information

Configuring Insight Provider Using REST APIs [page 109]Delete a Configuration of an Insight Provider [page 179]Delete a Back-End Configuration and Front-End Configuration of an Insight Provider [page 181]Delete All Text Interpretations for a Configuration of an Insight Provider [page 182]Delete All Key-Text Pairs for a Configuration and Language Combination [page 183]Delete All Text Values for a Specific Configuration, Lamguage, and Keyx Combination [page 184]

180 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

2.7.7.2 Delete a Back-End Configuration and Front-End Configuration of an Insight Provider

Deletes the back-end configuration and the front-end configuration with a specific configuration ID

Request

Format: JSON

URI: http://<host>:<port>/ipro/<insight provider>/api/v1/configs/<configID>/common-configs

NoteFill in the variable <insight provider> with the value that corresponds to insight provider that you want to configure. For an overview of the insight provider values, see the chapter Insight Provider Values for Base URI [page 185].

HTTP Method: DELETE

Response

Response Status and Error Codes

Table 115:

Code Description

200 Configuration with the specified configuration ID was deleted.

Related Information

Configuring Insight Provider Using REST APIs [page 109]Delete a Configuration of an Insight Provider [page 179]Delete All Configurations of an Insight Provider [page 180]Delete All Text Interpretations for a Configuration of an Insight Provider [page 182]Delete All Key-Text Pairs for a Configuration and Language Combination [page 183]Delete All Text Values for a Specific Configuration, Lamguage, and Keyx Combination [page 184]

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 181

2.7.7.3 Delete All Text Interpretations for a Configuration of an Insight Provider

Deletes all text interpretations for a given configuration ID

Request

Format: JSON

URI: http://<host>:<port>/ipro/<insight provider>/api/v1/configs/<configID>/text-interpretations

NoteFill in the variable <insight provider> with the value that corresponds to insight provider that you want to configure. For an overview of the insight provider values, see the chapter Insight Provider Values for Base URI [page 185].

HTTP Method: DELETE

Response

Response Status and Error Codes

Table 116:

Code Description

200 Text interpretation for the specified configuration ID was deleted.

Related Information

Configuring Insight Provider Using REST APIs [page 109]Delete a Configuration of an Insight Provider [page 179]Delete All Configurations of an Insight Provider [page 180]Delete a Back-End Configuration and Front-End Configuration of an Insight Provider [page 181]Delete All Key-Text Pairs for a Configuration and Language Combination [page 183]Delete All Text Values for a Specific Configuration, Lamguage, and Keyx Combination [page 184]

182 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

2.7.7.4 Delete All Key-Text Pairs for a Configuration and Language Combination

Deletes all key-text pairs for a configuration ID and a given language

Request

Format: JSON

URI: http://<host>:<port>/ipro/<insight provider>/api/v1/configs/<configID>/text-interpretations/<lang>

NoteFill in the variable <insight provider> with the value that corresponds to insight provider that you want to configure. For an overview of the insight provider values, see the chapter Insight Provider Values for Base URI [page 185].

HTTP Method: DELETE

Response

Response Status and Error Codes

Table 117:

Code Description

200 Key-text pair for the specified configuration ID was deleted.

Related Information

Configuring Insight Provider Using REST APIs [page 109]Delete a Configuration of an Insight Provider [page 179]Delete All Configurations of an Insight Provider [page 180]Delete a Back-End Configuration and Front-End Configuration of an Insight Provider [page 181]Delete All Text Interpretations for a Configuration of an Insight Provider [page 182]Delete All Text Values for a Specific Configuration, Lamguage, and Keyx Combination [page 184]

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 183

2.7.7.5 Delete All Text Values for a Specific Configuration, Lamguage, and Keyx Combination

Deletes the text values for a given configuration ID, language, and key

Request

Format: JSON

URI: http://<host>:<port>/ipro/<insight provider>/api/v1/configs/<configID>/text-interpretations/<lang>/<key>

NoteFill in the variable <insight provider> with the value that corresponds to insight provider that you want to configure. For an overview of the insight provider values, see the chapter Insight Provider Values for Base URI [page 185].

HTTP Method: DELETE

Response

Response Status and Error Codes

Table 118:

Code Description

200 Key-text pair for the specified configuration ID was deleted.

Related Information

Configuring Insight Provider Using REST APIs [page 109]Delete a Configuration of an Insight Provider [page 179]Delete All Configurations of an Insight Provider [page 180]Delete a Back-End Configuration and Front-End Configuration of an Insight Provider [page 181]Delete All Text Interpretations for a Configuration of an Insight Provider [page 182]Delete All Key-Text Pairs for a Configuration and Language Combination [page 183]

184 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

2.7.8 Insight Provider Values for Base URI

In the base URI that you use to configure insight providers using REST APIs, you need to specify what insight provider you want to configure. The following table gives you an overview of values for the base URI variable <insight provider>:

Table 119: Variable Values

Insight Provider You Want ot Configure Variable Value in Base URI

Map geospatial

2D chart twod-viz

Work activities work-activity

3D chart threed-viz

Asset Explorer asset-explorer

Derived signals derived-signals

Components components

Related Information

Configuring Insight Provider Using REST APIs [page 109]Create Configurations of an Insight Provider [page 132]Update a Configuration of an Insight Provider [page 171]Delete a Configuration of an Insight Provider [page 179]

2.8 Checking Configurations

You can check your configurations in the Asset Health Control Center.

Prerequisites

At least one of the following role collections is assigned to your user:

● <pdms-tech>● <ahcc-user-role>

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 P U B L I C 185

For more information about role collections, see the chapters Maintaining Roles and Users in SAP HANA and Role Templates for SAP Predictive Maintenance and Service, on-premise edition in the guide Installation of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02.

Context

After you have configured an insight provider or data science services, you can access the Asset Health Control Center to check the effects of your configurations on the business user.

Procedure

1. Go to http(s)://<host>:<port>/app/launchpad/index.html and log on.

If your user contains the role collections <pdms-tech>, or <ahcc-user-role> and <pdms-datascience-role>, you can use the administration launchpad to do both configure insight providers or data science services, and check your configurations in the Asset Health Control Center.

2. In the group Launch Application, open the app Asset Health Control Center.

Results

You can now check the look and feel of your configurations of the insight providers. You can furthermore check, if data science services are working as desired as well.

For more information about how to use the Asset Health Control Center, see the Application Help.

NoteThis document is also available in German, Simplified Chinese, and Italian.

Related Information

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0 [page 10]

186 P U B L I CConfiguration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02

Configuring SAP Predictive Maintenance and Service, on-premise edition 1.0

Important Disclaimers and Legal Information

Coding SamplesAny software coding and/or code lines / strings ("Code") included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended to better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, unless damages were caused by SAP intentionally or by SAP's gross negligence.

AccessibilityThe information contained in the SAP documentation represents SAP's current view of accessibility criteria as of the date of publication; it is in no way intended to be a binding guideline on how to ensure accessibility of software products. SAP in particular disclaims any liability in relation to this document. This disclaimer, however, does not apply in cases of willful misconduct or gross negligence of SAP. Furthermore, this document does not result in any direct or indirect contractual obligations of SAP.

Gender-Neutral LanguageAs far as possible, SAP documentation is gender neutral. Depending on the context, the reader is addressed directly with "you", or a gender-neutral noun (such as "sales person" or "working days") is used. If when referring to members of both sexes, however, the third-person singular cannot be avoided or a gender-neutral noun does not exist, SAP reserves the right to use the masculine form of the noun and pronoun. This is to ensure that the documentation remains comprehensible.

Internet HyperlinksThe SAP documentation may contain hyperlinks to the Internet. These hyperlinks are intended to serve as a hint about where to find related information. SAP does not warrant the availability and correctness of this related information or the ability of this information to serve a particular purpose. SAP shall not be liable for any damages caused by the use of related information unless damages have been caused by SAP's gross negligence or willful misconduct. All links are categorized for transparency (see: http://help.sap.com/disclaimer).

Configuration of SAP Predictive Maintenance and Service, on-premise edition 1.0 FP02Important Disclaimers and Legal Information P U B L I C 187

go.sap.com/registration/contact.html

© 2017 SAP SE or an SAP affiliate company. All rights reserved.No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company. The information contained herein may be changed without prior notice.Some software products marketed by SAP SE and its distributors contain proprietary software components of other software vendors. National product specifications may vary.These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP or its affiliated companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP or SAP affiliate company products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company) in Germany and other countries. All other product and service names mentioned are the trademarks of their respective companies.Please see http://www.sap.com/corporate-en/legal/copyright/index.epx for additional trademark information and notices.