REST API

These are the public REST APIs that can be used by 3rd party applications to consume the analytical data.

List all equipment instances

A Get call to fetch all the resource instances with resource definition as "Equipment".

URL
/ibm/ppa/auto/service/listEquipmentInstance
Method
The request type
GET
Success Response
{
     "EquipmentInstanceList":[{
          "M_UID": "R-851",
          "NAME": "Robo-1"
     },{
          "M_UID": "R-852",
          "NAME": "Robo-2"
     },{
          "M_UID": "R-853",
          "NAME": "Robo-3"
     },{
          "M_UID": "R-854",
          "NAME": "Robo-4"
     },{
          "M_UID": "R-855",
          "NAME": "Robo-5"
     }]
}          
Sample call
http://localhost:9080/ibm/ppa/auto/service/listEquipmentInstance

List all operation instances

A GET call to fetch all the operation instances.

URL
/ibm/ppa/auto/service/listOperationInstance
Method
The request type
GET
Success response
{
     "OperationInstanceList":[{
          "M_UID": "Weld",
          "NAME": "Weld"
    }]
}          
Sample call
http://localhost:9080/ibm/ppa/auto/service/listOperationInstance

List all measurement type instances

A GET call to fetch all the measurement type instances.

URL
/ibm/ppa/auto/service/listMeasurementTypeInstance
Method
The request type
GET
Success response
{
     "MeasurementTypeInstanceList":[{
          "M_UID": "PM",
          "NAME": "Preventative Maintenance"
    },{
          "M_UID": "CM",
          "NAME": "Corrective Maintenance"
    },{
          "M_UID": "Fault",
          "NAME": "Fault"
    },{
          "M_UID": "Warn",
          "NAME": "Warning"
    },{
          "M_UID": "Probability of Failure",
          "NAME": "Probability of Failure"
    }]
}          
Sample call
http://localhost:9080/ibm/ppa/auto/service/listMeasurementTypeInstance

List the predicted results for a piece of equipment

A GET call to fetch the latest predicted results for a piece of equipment.

URL
/ibm/ppa/auto/service/listPredictedResults
Method
The request type
GET
URL Parameters
equipment=[Text]
for example
equipment=R-851
Success response
{
     "PredictedResults":[{
          "MeasurementType": "Predicted Duration of Fault",
          "Code": "Servo 2 Fault"
          "Value":13.7817598453185
    },{
          "MeasurementType": "Probability of Failure",
          "Code": "Servo 2 Fault"
          "Value":0.00412678099955388 
    }]
}          
Sample call
http://localhost:9080/ibm/ppa/auto/service/listPredictedResults?equipment=R-851

Add a new operation

A Post call to add a new operation.

URL
/ibm/ppa/auto/service/addOperations
Method
The request type
post=POST
Data Parameters
{
  "ppa-resource":{
    "operation_def":{
      "operation_unique_id":"PAINT"
      "operation_name":"PAINT"
    }
  }
}
Success Response
{"Info": "Operation Successful"}
Sample call
http://localhost:9080/ibm/ppa/auto/service/addOperations

Add a new resource definition

A POST call to add a new resource definition.

URL
/ibm/ppa/auto/service/addResourceDef
Method
The request type
post=POST
Data Parameters
{
  "ppa-resource":{
    "resource_def":{
      "resource_unique_id":"Test123"
      "resource_name":"Test123"
    }
  }
}
Success Response
{"Info": "Operation Successful"}
Sample call
http://localhost:9080/ibm/ppa/auto/service/addResourceDef

Execute early warning model

A POST call to execute QEWS to analyze a sample data and to provide the early qualification.

URL
/ibm/ppa/auto/service/addResourceDef
Method
The request type
post=POST
Data Parameters
{
     "Accept_Level":0.034",
     "Unaccept_Level:"0.037",
     "False_Alarm_Rate":"1.000",
     "Type_of_Control":"2",
     "Target":"0.025",
     "Sigma":"1.05",
     "Num_Points":"250",
     "inputfilepath":"<Directory locationof the .csv file>",
     "outputpath":"<Directory location of the output of QEWS>",
     "equipmentid":"R01",
  }
}
Success Response
{"Info": "Operation Successful"}
Sample call
http://localhost:9080/ibm/ppa/auto/service/qews