Pace DPR API Documentation

Introduction:


The API-method present in this document can be used to download reports in CSV format, PDF format and to query the machine data.

Log-in API

This API helps you login to Pace DPR by using username and password

Method

Post


http://localhost:8080/api/login

Parameter:

ParameterValue Details
usernameusername
passwordpassword

Response:

On Success:


      {
          "access_token": "< token >",
          "status": "Logged In"
      }

On Failure:


      { 
          "status":"Invalid Login"
      }

Parameters are missing:

      '(Parameter Name) parameter is missing -'        

Download Reports in CSV

For a particular machine

This method helps you download an hourly report for a particular machine based on shift in CSV format.

Method

POST


http://localhost:8080/api/hour/report/shift/csv/download

Parameter:

ParameterValue Detail
machine idMachine id for which you want the report.
dateSpecify the date on which you want the report format -(mm/dd/yyyy).
shiftSpecify shift number – (shift1, shift2, shift3)

Response:

On Success:

                   
    '"machine_id_date_shift_report.csv" file will download.'

On Failure:

    'CSV file will not download'

Parameters are missing:

     '(Parameter Name) parameter is missing -'            

For overall machines

This method helps you download an hourly report for a overall machines based on shift in CSV format.

Method

POST


http://localhost:8080/api/hour/overall/report/shift/csv/download  

Parameter:

ParameterValue Detail
dateSpecify the date on which you want the report format -(mm/dd/yyyy).
shiftSpecify shift number – (shift1, shift2, shift3).

Response:

On Success:

                                          
    'overall_date_shift_report.csv" file will download.'

On Failure:

    'CSV file will not download.'

Parameters are missing:

     '(Parameter Name) parameter is missing -'            

For a day – particular machine

This method helps you download an hourly report of a particular machine for a day in CSV format.

Method

POST


http://localhost:8080/api/hour/report/day/csv/download  

Parameter:

ParameterValue Detail
machine idmachine id for which you want the report.
dateSpecify the date on which you want the report format -(mm/dd/yyyy).

Response:

On Success:

                           
    'machine_id_date_day_report.csv" file will download.'

On Failure:

    'CSV file will not download.'

Parameters are missing:

     '(Parameter Name) parameter is missing -'            

For a day – overall machines

This method helps you download an hourly report of overall machines for a day in CSV format.

Method

POST


http://localhost:8080/api/hour/overall/report/day/csv/download    

Parameter:

ParameterValue Detail
dateSpecify the date on which you want the report format -(mm/dd/yyyy).

Response:

On Success:

                           
    'overall_date_day_report.csv" file will download.'

On Failure:

    'CSV file will not download.' 

Parameters are missing:

     '(Parameter Name) parameter is missing -'            

Download Reports in PDF

For a particular machine

This method helps you download an hourly report of a particular machine for a day in PDF.

Method

POST


http://localhost:8080/api/hour/report/day/pdf/download      

Parameter:

ParameterValue Detail
machine_idMachine id for which you want the report.
dateSpecify the date on which you want the report. Format -(mm/dd/yyyy).

Response:

On Success:

                 
    'machine_id_date_day_report.pdf" file will download.'

On Failure:

    'PDF file will not download.'

Parameters are missing:

     '(Parameter Name) parameter is missing -'            

For overall machines

This method helps you download an hourly report of overall machines for a day in PDF.

Method

POST


http://localhost:8080/api/hour/overall/report/day/pdf/download  
  

Parameter:

ParameterValue Detail
dateSpecify the date on which you want the report. Format -(mm/dd/yyyy).

Response:

On Success

                    
    'overall_date_day_report.pdf" file will download.'

On Failure

    'PDF file will not download'

Parameters are missing:

     '(Parameter Name) parameter is missing -'            

Query Machine data

Last hour productivity – particular machine

This method helps you get data on productivity of a particular machine for last hour.

Method

POST


http://localhost:8080/api/get/data/lasthour/productivity

Parameter:

ParameterValue Detail
machine idMachine id for which you want the productivity data.

Response:

On Success:

                   
    '{productivity: value}'

On Failure:

    '{productivity: 0}'

Parameters are missing:

     '(Parameter Name) parameter is missing -'            

Last hour productivity – overall machine

This method helps you get data on productivity of overall machines for last hour.

Method

POST


http://localhost:8080/api/get/data/overall/lasthour/productivity

Response:

On Success:

                   
    '{productivity: value}'

On Failure:

    '{productivity: 0}'

Parameters are missing:

     '(Parameter Name) parameter is missing -'            

Production count – particular machine

This method helps you get data on today’s production count of a particular machine.

Method

POST


http://localhost:8080/api/get/data/Productioncount/today

Parameter:

ParameterValue Detail
machine idMachine id for which you want the productivity data.

Response:

On Success:

                   
    '{production_count: value}'

On Failure:

    '{production_count: 0}'

Parameters are missing:

     '(Parameter Name) parameter is missing -'            

Production count – overall machines

This method helps you get data on today’s production count of overall machines.

Method

POST


http://localhost:8080/api/get/data/overall/productioncount/today

Response:

On Success:

                   
    '{production_count: value}'

On Failure:

    '{production_count: 0}'

Availbility – particular machine

This method helps you get data on today’s availability of a particular machine.

Method

POST


http://localhost:8080/api/get/data/availability/today

Parameter:

ParameterValue Detail
machine idMachine id for which you want the availability data.

Response:

On Success:

                   
    '{availability: value}'

On Failure:

    '{availability: 0}'

Parameters are missing:

     '(Parameter Name) parameter is missing -'            

Availability – overall machines

This method helps you get data on today’s availability of overall machines.

Method

POST


http://localhost:8080/api/get/data/overall/availability/today

Response:

On Success:

                   
    '{availability: value}'

On Failure:

    '{availability: 0}'

Productivity – particular machine

This method helps you get data on today’s productivity of a particular machine.

Method

POST


http://localhost:8080/api/get/data/productivity/today

Parameter:

ParameterValue Detail
machine idMachine id for which you want the productivity data.

Response:

On Success:

                   
    '{productivity: value}'

On Failure:

    '{productivity: 0}'

Parameters are missing:

     '(Parameter Name) parameter is missing -'            

Productivity – overall machines

This method helps you get data on today’s productivity of overall machines.

Method

POST


http://localhost:8080/api/get/data/overall/productivity/today

Response:

On Success:

                   
    '{productivity: value}'

On Failure:

    '{productivity: 0}'

OEE – particular machine

This method helps you get data on today’s OEE of a particular machine.

Method

POST


http://localhost:8080/api/get/data/oee/today

Parameter:

ParameterValue Detail
machine idMachine id for which you want the OEE data.

Response:

On Success:

                   
    '{oee: value}'

On Failure:

    '{oee: 0}'

Parameters are missing:

     '(Parameter Name) parameter is missing -'            

OEE – overall machines

This method helps you get data on today’s OEE of overall machines.

Method

POST


http://localhost:8080/api/get/data/overall/oee/today

Response:

On Success:

                   
    '{oee: value}'

On Failure:

    '{oee: 0}'

Logout API

This API helps you log out from Pace DPR by using username and password.

Method

POST


http://localhost:8080/api/logout  


Parameter:

ParameterValue Detail
usernameusername
passwordpassword

Response:

On Success:


      {
         "status": "Logged Out"
      }

On Failure:


      { 
          "status":"Invalid Logout"
      }