Skip to content

An IoT Application on Capping Devices

License

Notifications You must be signed in to change notification settings

giuseppe-lisena/AROL-CLOUD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AROL-CLOUD

How to run project

Local

Set up env file

Step 1: cd ./express-server and create a file name ".env"

Step 2: Paste the following content in it

JWT_SECRET_KEY=6c9c23d766e7cf2280dfdb8fca8f97841ddcd80eee01eb0cbaff85037848962f
JWT_EXPIRATION=900000
REFRESH_TOKEN_SECRET_KEY=47e648a61b5c7c8b3d12bb9c46dbc64f35fd2d3fb22bfc5debc9d7cf6036ff1b
REFRESH_TOKEN_EXPIRATION=2592000000
POSTGRES_HOST=localhost
POSTGRES_PORT=5432
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
MONGODB_HOST=localhost
MONGODB_PORT=27017

Important note

To run project locally, PostgreSQL and MongoDB need to be installed in the system. DB configuration scripts/exports for both DBMS-es can be found under configuration/pg and configuration/mongo/data dirs. These exports need to be imported into the corresponding DBMS manually.

Run server

Step 1: cd ./express-server

Step 2: npm install --force

Step 3: npm run start:dev

Run client

Step 1: cd ./react-client

Step 2: npm install --force

Step 3: npm run start

Docker

Step 1: Make sure you have Docker installed locally on your system

Step 2: cd ./configuration

Step 3: docker compose up --build

Step 4: Manually import "./configuration/mongo/dump" folder into "/home" folder of the MongoDB container

Step 5: Inside the MongoDB container run "mongorestore /home/dump

Step 6: Open Docker Desktop and make sure to run all the containers under the "arol-cloud" container

Step 7: Open http://localhost:3000 on you favourite browser

DB Schema

DB Schema

Credentials

username: postgres

password: postgres

port: 5432

Available users and credentials

AROL

Company 1

Company 2

Company 3

PoliTO S.R.L.

API Documentation

Base URLs: http://localhost:8080

Email: support

Authentication

HTTP Authentication

Scheme

bearer

public

Public operations (no auth token needed)

  • post__public_login

    POST /public/login

    Initial authentication

    Perform initial authentication to obtain JWT auth token

    Body parameter

    {
      "email": "[email protected]",
      "password": 12345678
    }

    Parameters

    Name In Type Required Description
    body body LoginCredentials true none
    » email body string true none
    » password body string true none

    Example responses

    200 Response

    {
      "id": 0,
      "companyID": 1,
      "name": "string",
      "surname": "string",
      "email": "string",
      "roles": ["string"],
      "authToken": "string",
      "authTokenExpiration": 0,
      "refreshToken": "string",
      "refreshTokenExpiry": 0,
      "permissions": {
        "machineryUID": {
          "dashboardsWrite": true,
          "dashboardsModify": true,
          "dashboardsRead": true,
          "documentsWrite": true,
          "documentsModify": true,
          "documentsRead": true
        }
      }
    }

    Responses

    Status Meaning Description Schema
    200 OK Successful operation LoginResponse
    403 Forbidden Bad credentials or account disabled None

    This operation does not require authentication

  • post__public_logout

    POST /public/logout

    Logout

    Perform logout and delete any refresh tokens associated to this session

    Parameters

    Name In Type Required Description
    id query integer false none
    token query string false none

    Responses

    Status Meaning Description Schema
    200 OK Logout successful None

    This operation does not require authentication

  • get__public_refreshtoken

    GET /public/refreshtoken

    JWT token refresh

    Refresh JWT token by providing a valid refresh token

    Parameters

    Name In Type Required Description
    id query integer false none
    token query string false none

    Example responses

    200 Response

    {
      "id": 0,
      "companyID": "string",
      "name": "string",
      "surname": "string",
      "email": "string",
      "roles": ["string"],
      "authToken": "string",
      "authTokenExpiration": 0,
      "refreshToken": "string",
      "refreshTokenExpiry": 0,
      "permissions": {
        "machineryUID": {
          "dashboardsWrite": true,
          "dashboardsModify": true,
          "dashboardsRead": true,
          "documentsWrite": true,
          "documentsModify": true,
          "documentsRead": true
        }
      }
    }

    Responses

    Status Meaning Description Schema
    200 OK Token refresh successful LoginResponse
    400 Bad Request Invalid refresh token None
    401 Unauthorized Invalid refresh token None
    403 Forbidden Account disabled None

    This operation does not require authentication

  • get__public_status

    GET /public/status

    Health

    Check server health

    Responses

    Status Meaning Description Schema
    200 OK Server is on and accepting requests None

    This operation does not require authentication

company

Operations about companies

  • get__company_all

    GET /company/all

    All companies information

    Retrieve information about all companies

    Example responses

    200 Response

    [
      {
        "id": 0,
        "name": "string"
      },
      {
        "id": 1,
        "name": "string"
      },
      ...
    ]

    Responses

    Status Meaning Description Schema
    200 OK Companies retrieved successfully Array of CompanyResponse
    401 Unauthorized Authentication failed None
    404 Not Found No companies found None

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • get__company_{id}

    GET /company/:id

    Company information

    Retrive information of a company

    Example responses

    200 Response

    {
      "id": 0,
      "name": "string"
    }

    Responses

    Status Meaning Description Schema
    200 OK Company retrieved successfully CompanyResponse
    401 Unauthorized Authentication failed None
    404 Not Found Company not found None

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • post__company_create

    POST /company/create

    Create company

    Insert a new company

    Body parametrs

    {
      "id": 0,
      "name": "string",
      "city": "string",
    }

    Parameters

    Name In Type Required Description
    body body CreateCompanyRequest false New company details
    » name body string false none
    » city body number false none

    Example responses

    200 Response

    {
    "result": true
    }

    Responses

    Status Meaning Description Schema
    200 OK Company created successfully GenericResponse
    400 Bad Request Failed to created company None
    403 Forbidden Insufficient permissions None
  • post__company_update

    POST /company/update

    Update company

    Modify information about a company

    {
      "id": 0,
      "name": "string",
      "city": "string",
    }

    Parameters

    Name In Type Required Description
    body body UpdateCompanyRequest false New company details
    » id body number false none
    » name body string false none
    » city body number false none

    Example responses

    200 Response

    {
    "result": true
    }

    Responses

    Status Meaning Description Schema
    200 OK Company updated successfully GenericResponse
    400 Bad Request Failed to update company None
    403 Forbidden Insufficient permissions None
  • delete__company_{id}

    DELETE /company/:id

    Delete company

    Delete all information about a company

    Example response

    200 Response

    {
      "result": true
    }

    Responses

    Status Meaning Description Schema
    200 OK Company deleted successfully GenericResponse
    400 Bad Request Failed to delete company None
    403 Forbidden Cannot delete AROL company None

machinery

Operations on company machineries by AROL and company users

  • get__machinery_all

    GET /machinery/all

    All machineries

    Get all the machineries for the authenticated AROL user

    Example responses

    200 Response

    {
      "locationCluster": [
        {
          "uid": "string",
          "companyID": 0,
          "modelID": "string",
          "modelName": "string",
          "modelType": "string",
          "geoLocation": {
            "x": 0,
            "y": 0
          },
          "locationCluster": "string",
          "numHeads": 0
        }
      ]
    }

    Responses

    Status Meaning Description Schema
    200 OK Company machineries groupped by their corresponding location cluster. Each cluster contains the actual array of machineries that belong to that cluster. CompanyMachineriesResponse
    400 Bad Request Invalid company ID detected None
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • get__machinery_all_{companyID}

    GET /machinery/all/{companyID}

    All Machinery by CompanyID

    Get all the company machineries for the authenticated user by company ID

    Parameters

    Name In Type Required Description
    companyID path number true The company ID for which the machineries must be returned

    Example responses

    200 Response

    {
      "uid": "string",
      "companyID": 0,
      "modelID": "string",
      "modelName": "string",
      "modelType": "string",
      "geoLocation": {
        "x": 0,
        "y": 0
      },
      "locationCluster": "string",
      "numHeads": 0
    }

    Responses

    Status Meaning Description Schema
    200 OK List of machinery for a specific company CompanyMachineriesResponse
    400 Bad Request Invalid company ID detected None
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None
    404 Not Found Machineries for company ID passed is not found None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • get__machinery_details_{modelID}

    GET /machinery/details/{modelID}

    Machinery details by modelID

    Get details for the machinery that has the modelID passed as parameter

    Parameters

    Name In Type Required Description
    modelID path string true Ther modelID for which details are requested

    Example responses

    200 Response

    {
      "modelID": "MMMMM",
      "name": "string",
      "type": "string"
    }

    Responses

    Status Meaning Description Schema
    200 OK Machinery details for the selected machinery MachineryDetailsResponse
    400 Bad Request Invalid model ID detected None
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None
    404 Not Found Machineries for model ID passed is not found None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • get__machinery_sensors_all

    GET /sensors/catalogue/all

    Sensors Catalogue

    Get the catalogue of all available sensors

    Example responses

    200 Response

    [
      {
        "sensorName": "string",
        "sensorDescription": "string",
        "sensorUnit": "string",
        "sensorThresholdLow": 0.0,
        "sensorThresHoldHigh": 1.0,
        "sensorInternalName": "string",
        "sensorCategory": "string",
        "sensorType": "string",
        "sensorImgFilename": "string",
        "imgPointerLocation": {
          "x": 0,
          "y": 0
        },
        "sensorBucketingType": "string"
      }
    ]

    Responses

    Status Meaning Description Schema
    200 OK List of all available sensors SensorsCatalogueResponse
    400 Bad Request Errors in request message None
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • get__machinery_{machineryUID}

    GET /machinery/:machineryUID

    Machinery by UID

    Get the machinery informati for the authenticated user by machinery UID

    Parameters

    Name In Type Required Description
    machineryUID path number true The machinery UID of the requested machinery

    Example responses

    200 Response

    {
      "uid": "string",
      "companyID": 0,
      "modelID": "string",
      "modelName": "string",
      "modelType": "string",
      "geoLocation": {
        "x": 0,
        "y": 0
      },
      "locationCluster": "string",
      "numHeads": 0
    }

    Responses

    Status Meaning Description Schema
    200 OK Machinery details for the given UID MachinerySchema
    400 Bad Request Missing user details or invalid machinery UID detected None
    403 Forbidden Insufficient permissions or machinery not owned by the company None
    404 Not Found Machinery not found None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • get__machinery_sensors_{machineryUID}

    GET /machinery/sensors/{machineryUID}

    Get Machinery Sensors by MachineryUID

    Get sensors associated to the machinery defined by the machineryUID as parameter

    Parameters

    Name In Type Required Description
    machineryUID path type true The machinery UID required to get related sensors

    Example responses

    200 Response

    {
      "sensorName": "string",
      "sensorDescription": "string",
      "sensorUnit": "string",
      "sensorThresholdLow": 0.0,
      "sensorThresHoldHigh": 1.0,
      "sensorInternalName": "string",
      "sensorCategory": "string",
      "sensorType": "string",
      "sensorImgFilename": "string",
      "imgPointerLocation": {
        "x": 0,
        "y": 0
      },
      "sensorBucketingType": "string",
      "machineryUID": "MMMMM",
      "isHeadMounted": false
    }

    Responses

    Status Meaning Description Schema
    200 OK List of sensors associated to the specific machinery MachinerySensorsResponse
    400 Bad Request Invalid machinery UID detected None
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None
    404 Not Found Sensors for machinery UID passed is not found None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • post__machinery_sensors_data

    POST /machinery/sensors/data

    Machinery sensors data by its UID

    Get the authenticated user company machinery sensors data by its UID. The returned data will be filtered using the parameters sent using the request body.

    Body parameter

    {
      "sensorFilters": {
        "requestType": "string",
        "cacheDataRequestMaxTime": 0,
        "newDataRequestMinTime": 0,
        "widgetCategory": "string",
        "dataRange": {
          "amount": 0,
          "unit": "string"
        },
        "sensors": {
          "sensorName": [
            {
              "headNumber": 0,
              "mechNumber": 0,
              "sensorNames": [
                {
                  "name": "string",
                  "color": "string"
                }
              ]
            }
          ]
        },
        "aggregations": [
          {
            "name": "string",
            "color": "string"
          }
        ]
      }
    }

    Parameters

    Name In Type Required Description
    machineryUID query string true The UID of the desired machinery
    body body MachineryDataRequest true none
    » sensorFilters body object false none
    »» requestType body string false none
    »» cacheDataRequestMaxTime body number false none
    »» newDataRequestMinTime body number false none
    »» widgetCategory body string false none
    »» dataRange body object false none
    »»» amount body number false none
    »»» unit body string false none
    »» sensors body object false none
    »»» sensorName body [object] false none
    »»»» headNumber body number false none
    »»»» mechNumber body number false none
    »»»» sensorNames body [object] false none
    »»»»» name body string false none
    »»»»» color body string false none
    »» aggregations body [object] false none
    »»» name body string false none
    »»» color body string false none

    Example responses

    200 Response

    {
      "requestType": "string",
      "minDisplayTime": 0,
      "cachedSensorData": {
        "active": true,
        "machineryOff": true,
        "machineryOffFrom": 0,
        "machineryOffTo": 0,
        "time": 0,
        "minTime": 0,
        "maxTime": 0,
        "formattedTime": "string",
        "activeData": {
          "sensorInternalName": 0
        },
        "fillerData": {
          "sensorInternalName": 0
        },
        "allData": {
          "sensorInternalName": 0
        },
        "aggregationData": {
          "aggregationName": {
            "value": 0,
            "note": "string"
          }
        }
      },
      "displaySensorData": {
        "active": true,
        "machineryOff": true,
        "machineryOffFrom": 0,
        "machineryOffTo": 0,
        "time": 0,
        "minTime": 0,
        "maxTime": 0,
        "formattedTime": "string",
        "activeData": {
          "sensorInternalName": 0
        },
        "fillerData": {
          "sensorInternalName": 0
        },
        "allData": {
          "sensorInternalName": 0
        },
        "aggregationData": {
          "aggregationName": {
            "value": 0,
            "note": "string"
          }
        }
      },
      "newSensorData": {
        "active": true,
        "machineryOff": true,
        "machineryOffFrom": 0,
        "machineryOffTo": 0,
        "time": 0,
        "minTime": 0,
        "maxTime": 0,
        "formattedTime": "string",
        "activeData": {
          "sensorInternalName": 0
        },
        "fillerData": {
          "sensorInternalName": 0
        },
        "allData": {
          "sensorInternalName": 0
        },
        "aggregationData": {
          "aggregationName": {
            "value": 0,
            "note": "string"
          }
        }
      },
      "numSensorData": 0,
      "endOfData": true
    }

    Responses

    Status Meaning Description Schema
    200 OK Machinery sensors data MachineryDataResponse
    400 Bad Request Invalid company ID detected None
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • post__machinery_insert

    POST /machinery/insert

    Creation of a new machinery

    Creates a new machinery to be associated to a company

    Body parameters

    {
      "uid": "string",
      "companyID": 0,
      "modelID": "string",
      "modelName": "string",
      "modelType": "string",
      "geoLocation": {
        "x": 0,
        "y": 0
      },
      "locationCluster": "string",
      "numHeads": 0
    }

    Parameters

    Name In Type Required Description
    body body MachineryDataRequest true none

    Responses

    Status Meaning Description Schema
    200 OK Insertion flag GenericRespones
    400 Bad Request Invalid company ID detected None
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • post__machinery_sensor_insert

    POST /machinery/sensors/insert

    Creation of a new sensor

    Creates a new sensor to be inserted in the sensor catalogue

    Body parameters

    {
      "sensorName": "string",
      "sensorDescription": "string",
      "sensorUnit": "string",
      "sensorThresholdLow": 0.0,
      "sensorThresHoldHigh": 1.0,
      "sensorInternalName": "string",
      "sensorCategory": "string",
      "sensorType": "string",
      "sensorImgFilename": "string",
      "imgPointerLocation": {
        "x": 0,
        "y": 0
      },
      "sensorBucketingType": "string"
    }

    Responses

    Status Meaning Description Schema
    200 OK Insertion flag GenericRespones
    400 Bad Request Invalid sensor specs None
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • post__machinery_modify

    POST /machinery/modify

    Modification of a company machinery

    This API is used to change some values for a company machinery

    Body parameters

    {
      "uid": "string",
      "companyID": 0,
      "geoLocation": {
        "x": 0,
        "y": 0
      },
      "locationCluster": "string",
      "numHeads": 0
    }

    Responses

    Status Meaning Description Schema
    200 OK Insertion flag GenericRespones
    400 Bad Request Invalid values detected None
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • post__machinery_sensors_modify

    POST /machinery/sensors/modify

    Update sensors installed on the machinery

    Based on machinery UID passed as parameter, update sensors mounted on it

    Body parameters

    {
      "machineryUID": "string",
      "sensorsToBeAdded": [
        {
          "sensorName": "string",
          "sensorDescription": "string",
          "sensorUnit": "string",
          "sensorThresholdLow": 0.0,
          "sensorThresHoldHigh": 1.0,
          "sensorInternalName": "string",
          "sensorCategory": "string",
          "sensorType": "string",
          "sensorImgFilename": "string",
          "imgPointerLocation": {
            "x": 0,
            "y": 0
          },
          "sensorBucketingType": "string",
          "machineryUID": "MMMMM",
          "isHeadMounted": false
        }
      ],
      "sensorsToBeDeleted": [
        {
          "sensorName": "string",
          "sensorDescription": "string",
          "sensorUnit": "string",
          "sensorThresholdLow": 0.0,
          "sensorThresHoldHigh": 1.0,
          "sensorInternalName": "string",
          "sensorCategory": "string",
          "sensorType": "string",
          "sensorImgFilename": "string",
          "imgPointerLocation": {
            "x": 0,
            "y": 0
          },
          "sensorBucketingType": "string",
          "machineryUID": "MMMMM",
          "isHeadMounted": false
        }
      ]
    }

    Responses

    Status Meaning Description Schema
    200 OK Insertion flag GenericRespones
    400 Bad Request Invalid machineryUID None
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • post__machinery_sensor_update

    POST /machinery/sensor/update

    Update sensors information

    Change generic sensor information in the catalogue by an Authenticated User

    Body parameters

    {
      "internalName": "string",
      "category": "string",
      "name": "string",
      "description": "string",
      "unit": "string",
      "thresholdLow": "number",
      "thresholdHigh": "number",
      "type": "string",
      "bucketingType": "string"
    }

    Responses

    Status Meaning Description Schema
    200 OK Insertion flag GenericRespones
    400 Bad Request Invalid values detected None
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • put__machinery_reassign

    PUT /machinery/reassign

    Reassign machineries

    Reassign machineries for deleted company to AROL

    Body parameters

    {
      "companyID": 0
    }

    Responses

    Status Meaning Description Schema
    200 OK Update flag GenericRespones
    400 Bad Request Invalid values detected None
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • delete__machinery_delete_all_{companyID}

    DELETE /machinery/delete/all/:companyID

    Delete company machinery

    Delete all machineries of a company

    Parameters

    Name In Type Required Description
    companyID path number true The company ID for which all machineries must be deleted

    Example response

    200 Response

    {
      "result": true
    }

    Responses

    Status Meaning Description Schema
    200 OK Machinery deleted successfully GenericResponse
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None
    404 Not Found Machinery not found None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • delete__machinery_delete_{machineryUID}

    DELETE /machinery/delete/:machineryUID

    Delete machinery

    Delete a machinery

    Parameters

    Name In Type Required Description
    machineryUID path number true The machinery UID of the machinery to be deleted

    Example response

    200 Response

    {
      "result": true
    }

    Responses

    Status Meaning Description Schema
    200 OK Machinery deleted successfully GenericResponse
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None
    404 Not Found Machinery or permissions not found None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth

user

Public operations (no auth token needed)

  • get__users_company_{companyID}

    GET /users/company/:companyID

    Company users

    Get all users of a company

    Parameters

    Name In Type Required Description
    companyID path number true The company ID for which the users must be returned

    Example responses

    200 Response

    [
      {
        "id": 0,
        "email": "string",
        "name": "string",
        "surname": "string",
        "roles": [
          "string"
        ],
        "active": true,
        "companyID": 0,
        "createdAt": 0,
        "createdBy": "string",
        "isTemp": false
      },
      ...
    ]

    Responses

    Status Meaning Description Schema
    200 OK Company users CompanyUsers
    400 Bad Request Invalid company ID None
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • post__users_create

    POST /users/create

    Create new user account

    Create a new user account; Admin and Manager (company), or Chief and Supervisor (AROL) roles only

    Body parameter

    {
      "email": "string",
      "password": "string",
      "name": "string",
      "surname": "string",
      "roles": ["string"],
      "companyID": 0,
      "permissions": {
        "machineryUID": {
          "dashboardsWrite": true,
          "dashboardsModify": true,
          "dashboardsRead": true,
          "documentsWrite": true,
          "documentsModify": true,
          "documentsRead": true
        }
      }
    }

    Parameters

    Name In Type Required Description
    body body CreateAccountRequest false Account data
    » email body string false none
    » password body string false none
    » name body string false none
    » surname body string false none
    » roles body [string] false none
    » companyID body number¦null false none
    » permissions body object false none
    »» machineryUID body object false none
    »»» dashboardsWrite body boolean false none
    »»» dashboardsModify body boolean false none
    »»» dashboardsRead body boolean false none
    »»» documentsWrite body boolean false none
    »»» documentsModify body boolean false none
    »»» documentsRead body boolean false none

    Example responses

    200 Response

    {
      "email": "string",
      "password": "string",
      "name": "string",
      "surname": "string",
      "roles": ["string"],
      "companyID": 0,
      "permissions": {
        "machineryUID": {
          "dashboardsWrite": true,
          "dashboardsModify": true,
          "dashboardsRead": true,
          "documentsWrite": true,
          "documentsModify": true,
          "documentsRead": true
        }
      },
      "createdBy": 18,
      "isTemp": false
    }

    Responses

    Status Meaning Description Schema
    200 OK Created account CreateAccountResponse
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • post__users_details_update

    POST /users/details/update

    Update user account details

    Update user accounts details

    Body parameter

    {
      "id": 0,
      "email": "string",
      "name": "string",
      "surname": "string",
      "roles": "string",
      "active": true,
      "isTemp": false,
    }

    Parameters

    Name In Type Required Description
    body body UpdateAccountRequest false New account details
    » id body number false none
    » email body string false none
    » name body string false none
    » surname body string false none
    » roles body string false none
    » active body boolean false none
    » isTemp body boolean false none

    Responses

    Status Meaning Description Schema
    200 OK Account details updated None
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • post__users_password_reset

    POST /users/password/reset

    Reset account password

    Reset account password and invalidate any refresh tokens associated to the given user

    Body parameter

    {
      "id": 0,
      "password": "string",
      "isTemp": true
    }

    Parameters

    Name In Type Required Description
    body body PasswordResetRequest false Password reset data
    » id body number false none
    » password body string false none

    Responses

    Status Meaning Description Schema
    200 OK Password succesfully reset None
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • get__users_permissions_{userID}

    GET /users/permissions/:userID

    User permissions

    Get all the permissions of the given user

    Parameters

    Name In Type Required Description
    userID path number true The user ID for which the permissions must be returned

    Example responses

    200 Response

    [
      {
        "userID": 0,
        "machineryUID": "string",
        "dashboardsWrite": true,
        "dashboardsModify": true,
        "dashboardsRead": true,
        "documentsWrite": true,
        "documentsModify": true,
        "documentsRead": true
      },
      ...
    ]

    Responses

    Status Meaning Description Schema
    200 OK User permissions wrt given machinery UID Array ofUserPermissionsResponse
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • get__users_permissions_{userID}_{machineryUID}

    GET /users/permissions/:userID/:machineryUID

    User permissions

    Get the permissions for a machinery and a given user

    Parameters

    Name In Type Required Description
    userID path number true The user ID for which the permissions must be returned
    machineryID path number true The machinery ID for which the permissions must be returned

    Example responses

    200 Response

    {
      "userID": 0,
      "machineryUID": "string",
      "dashboardsWrite": true,
      "dashboardsModify": true,
      "dashboardsRead": true,
      "documentsWrite": true,
      "documentsModify": true,
      "documentsRead": true
    }

    Responses

    Status Meaning Description Schema
    200 OK User permissions wrt given machinery UID UserPermissionsResponse
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • post__users_permissions_update

    POST /users/permissions/update

    Update user permissions

    Update user permissions

    Body parameter

    {
      "userID": 0,
      "machineryUID": "string",
      "dashboardsWrite": true,
      "dashboardsModify": true,
      "dashboardsRead": true,
      "documentsWrite": true,
      "documentsModify": true,
      "documentsRead": true
    }

    Parameters

    Name In Type Required Description
    body body UserPermissionsRequest false New user permissions
    » userID body number false none
    » machineryUID body string false none
    » dashboardsWrite body boolean false none
    » dashboardsModify body boolean false none
    » dashboardsRead body boolean false none
    » documentsWrite body boolean false none
    » documentsModify body boolean false none
    » documentsRead body boolean false none

    Responses

    Status Meaning Description Schema
    200 OK Permissions updated successfully None
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • delete__users_{userID}

    DELETE /users/delete/:userID

    Delete user

    Delete user infromation

    Parameters

    Name In Type Required Description
    userID path number true The user ID of user that must be deleted

    Example response

    200 Response

    {
      "result": true
    }

    Responses

    Status Meaning Description Schema
    200 OK User deleted successfully GenericResponse
    400 Bad Request Failed to delete user None
    403 Forbidden Cannot delete own account or user manages machinery None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • delete__permissions_{userID}

    DELETE /users/delete/permissions/:userID

    Delete user permissions

    Delete all user permissions on all machineries

    Parameters

    Name In Type Required Description
    userID path number true The user ID for which the permissions must be deleted

    Example response

    200 Response

    {
      "result": true
    }

    Responses

    Status Meaning Description Schema
    200 OK User permissions deleted successfully GenericResponse
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None
    404 Not Found User or permissions not found None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth

dashboard

Operations on customer company machinery dashboards

  • post__dashboard_save

    POST /dashboard/save

    Save dashboard configuration

    Save dashboard configuration for the given machinery

    Body parameter

    {
      "dashboard": {}
    }

    Parameters

    Name In Type Required Description
    body body SaveDashboardRequest false none
    » dashboard body object false none

    Responses

    Status Meaning Description Schema
    200 OK Dashboard config saved successfully None
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None
    404 Not Found Dashboard could not be saved None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • post__dashboard_saveas

    POST /dashboard/saveas

    Save dashboard configuration as a new dashboard

    Save dashboard configuration as a new dashboard for the given machinery. This will ensure that the dashboard name is unique for the given machinery.

    Body parameter

    {
      "dashboard": {}
    }

    Parameters

    Name In Type Required Description
    body body SaveDashboardRequest false none
    » dashboard body object false none

    Responses

    Status Meaning Description Schema
    200 OK Dashboard config saved successfully None
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None
    409 Conflict Dashboard could not be saved since another dashboard with this name already exists for this machinery None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • delete__dashboard_delete

    DELETE /dashboard/delete

    Delete dashboard configuration

    Delete dashboard configuration for the given machinery

    Parameters

    Name In Type Required Description
    machineryUID query string true The UID of the desired machinery
    dashboardName query string true The name of the dashboard to delete

    Responses

    Status Meaning Description Schema
    200 OK Dashboard deleted successfully None
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None
    404 Not Found A dashboard with the given name and for the given machinery UID could not be found None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • get__dashboard_load

    GET /dashboard/load

    Load dashboard configuration

    Load dashboard configuration for the given machinery

    Parameters

    Name In Type Required Description
    machineryUID query string true The UID of the desired machinery
    dashboardName query string true The name of the dashboard to load

    Example responses

    200 Response

    {
      "name": "string",
      "machineryUID": "string",
      "timestamp": 0,
      "userID": 0,
      "isDefault": true,
      "numUnsavedChanges": 0,
      "lastSave": 0,
      "isNew": true,
      "numCols": 0,
      "numRows": 0,
      "gridCompaction": "string",
      "grid": {
        "widgets": [
          {
            "id": "string",
            "name": "string",
            "type": "string",
            "maxSensors": 0,
            "sensorsMonitoring": {
              "dataRange": {
                "amount": 0,
                "unit": "string"
              },
              "sensors": [
                {
                  "headNumber": 0,
                  "mechNumber": 0,
                  "sensorNames": [
                    {
                      "name": "string",
                      "color": "string"
                    }
                  ]
                }
              ],
              "aggregations": [
                {
                  "name": "string",
                  "color": "string"
                }
              ]
            }
          }
        ],
        "layout": []
      }
    }

    Responses

    Status Meaning Description Schema
    200 OK Dashboard configuration Dashboard
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None
    404 Not Found A dashboard with the given name and for the given machinery UID could not be found None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • get__dashboard_load_default

    GET /dashboard/load/default

    Load the default dashboard configuration

    Load the default dashboard configuration for the given machinery

    Parameters

    Name In Type Required Description
    machineryUID query string true The UID of the desired machinery

    Example responses

    200 Response

    {
      "name": "string",
      "machineryUID": "string",
      "timestamp": 0,
      "userID": 0,
      "isDefault": true,
      "numUnsavedChanges": 0,
      "lastSave": 0,
      "isNew": true,
      "numCols": 0,
      "numRows": 0,
      "gridCompaction": "string",
      "grid": {
        "widgets": [
          {
            "id": "string",
            "name": "string",
            "type": "string",
            "maxSensors": 0,
            "sensorsMonitoring": {
              "dataRange": {
                "amount": 0,
                "unit": "string"
              },
              "sensors": [
                {
                  "headNumber": 0,
                  "mechNumber": 0,
                  "sensorNames": [
                    {
                      "name": "string",
                      "color": "string"
                    }
                  ]
                }
              ],
              "aggregations": [
                {
                  "name": "string",
                  "color": "string"
                }
              ]
            }
          }
        ],
        "layout": []
      }
    }

    Responses

    Status Meaning Description Schema
    200 OK Dashboard configuration Dashboard
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None
    404 Not Found A dashboard with the given name and for the given machinery UID could not be found None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • get__dashboard_saved

    GET /dashboard/saved

    Get list of saved dashboards

    Get list of saved dashboards for the given machinery

    Parameters

    Name In Type Required Description
    machineryUID query string true The UID of the desired machinery

    Example responses

    200 Response

    {
      "savedDashboards": [
        {
          "name": "string",
          "isDefault": true,
          "machineryUID": "string",
          "timestamp": 0,
          "numSensorsMonitored": 0,
          "numWidgets": 0
        }
      ]
    }

    Responses

    Status Meaning Description Schema
    200 OK Saved dashboards SavedDashboards
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • get__dashboard_templates

    GET /dashboard/templates

    Get list of dashboard templates

    Get list of dashboard templates for the given machinery. Templates are dashboard configurations for machineries of the same model but with no sensors selected for monitoring.

    Parameters

    Name In Type Required Description
    machineryUID query string true The UID of the desired machinery
    companyID query number true The ID of the company owner of the machinery

    Example responses

    200 Response

    {
      "templateDashboards": [
        {
          "name": "string",
          "isDefault": true,
          "machineryUID": "string",
          "timestamp": 0,
          "numSensorsMonitored": 0,
          "numWidgets": 0
        }
      ]
    }

    Responses

    Status Meaning Description Schema
    200 OK Dashboards templates SavedDashboardTemplates
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth

document

Operations on customer company machinery documents

  • get__documents

    GET /documents/all

    Machinery documents

    Get the authenticated user company machinery documents by its UID.

    Parameters

    Name In Type Required Description
    machineryUID query string true The UID of the desired machinery

    Example responses

    200 Response

    {
      "rootFolderId": "string",
      "childrenIds": ["string"],
      "fileMap": {
        "fileID": {
          "id": "string",
          "name": "string",
          "documentUID": "string",
          "isDir": true,
          "isDocument": true,
          "isModifiable": true,
          "childrenIds": ["string"],
          "childrenCount": 0,
          "parentId": "string",
          "modDate": "2019-08-24T14:15:22Z",
          "size": 0,
          "isPrivate": true,
          "isArol": false
        }
      }
    }

    Responses

    Status Meaning Description Schema
    200 OK Machinery documents MachineryDocuments
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None
    404 Not Found Machinery with this UID and that belongs the authenticated user company not found None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • delete__documents DELETE /documents

    Delete machinery documents/folders

    Delete one or multiple documents and/or folders for the given machinery UID

    Body parameter

    {
      "documentsList": [
        {
          "id": "string",
          "documentUID": "string"
        }
      ]
    }

    Parameters

    Name In Type Required Description
    machineryUID query string true The UID of the desired machinery
    body body MachineryDeleteFilesRequest true none
    » documentsList body [object] false none
    »» id body string false none
    »» documentUID body string false none

    Responses

    Status Meaning Description Schema
    200 OK Machinery folder created successfully None
    400 Bad Request Bad document path None
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None
    404 Not Found Machinery with this UID and that belongs the authenticated user company not found None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • get__documents_document GET /documents/document

    Machinery documents

    Get the authenticated user company machinery documents by its UID

    Parameters

    Name In Type Required Description
    machineryUID query string true The UID of the desired machinery
    documentUID query string true The UID of the desired machinery document

    Responses

    Status Meaning Description Schema
    200 OK Machinery document None
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None
    404 Not Found Machinery with this UID and that belongs the authenticated user company not found None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • post__documents_rename

    POST /documents/rename

    Rename machinery document

    Rename a machinery document

    Body parameter

    {
      "oldFileID": "string",
      "documentUID": "string",
      "newFileName": "string",
      "oldFileName": "string",
      "type": "string"
    }

    Parameters

    Name In Type Required Description
    machineryUID query string true The UID of the desired machinery
    body body MachineryDocumentRename true none
    » oldFileID body string false none
    » documentUID body string false none
    » newFileName body string false none
    » oldFileName body string false none
    » type body string false none

    Responses

    Status Meaning Description Schema
    200 OK Machinery document renamed successfully None
    400 Bad Request Bad document path None
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None
    404 Not Found Machinery with this UID and that belongs the authenticated user company not found None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • put__documents_folder

    PUT /documents/folder

    Create machinery folder

    Create folder for the given machinery UID

    Body parameter

    {
      "folderPath": "string"
    }

    Parameters

    Name In Type Required Description
    machineryUID query string true The UID of the desired machinery
    body body MachineryCreateFolderRequest true none
    » folderPath body string false none

    Responses

    Status Meaning Description Schema
    200 OK Machinery folder created successfully None
    400 Bad Request Bad document path None
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None
    404 Not Found Machinery with this UID and that belongs the authenticated user company not found None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth
  • put__documents_files

    PUT /documents/files

    Upload machinery documents

    Upload one or multiple documents for the given machinery UID

    Body parameter

    {
      "parentFolderPath": "string"
    }

    Parameters

    Name In Type Required Description
    machineryUID query string true The UID of the desired machinery
    isPrivate query boolean true Flag to indicate if document is private or not
    body body MachineryUploadFilesRequest true none
    » parentFolderPath body string false none

    Responses

    Status Meaning Description Schema
    200 OK Machinery folder created successfully None
    400 Bad Request Bad document path None
    401 Unauthorized Authentication failed None
    403 Forbidden Insufficient permissions None
    404 Not Found Machinery with this UID and that belongs the authenticated user company not found None

    Warning

    To perform this operation, you must be authenticated by means of one of the following methods:

    • bearerAuth

Schemas

GenericResponse

{
  "result": true
}

Properties

Name Type Required Restrictions Description
result boolean none none none

LoginCredentials

{
  "email": "[email protected]",
  "password": 12345678
}

Properties

Name Type Required Restrictions Description
email string true none none
password string true none none

LoginResponse

{
  "id": 0,
  "companyID": 1,
  "name": "string",
  "surname": "string",
  "email": "string",
  "roles": ["string"],
  "authToken": "string",
  "authTokenExpiration": 0,
  "refreshToken": "string",
  "refreshTokenExpiry": 0,
  "permissions": {
    "machineryUID": {
      "dashboardsWrite": true,
      "dashboardsModify": true,
      "dashboardsRead": true,
      "documentsWrite": true,
      "documentsModify": true,
      "documentsRead": true
    }
  }
}

Properties

Name Type Required Restrictions Description
id number false none none
companyID string false none none
name string false none none
surname string false none none
email string false none none
roles [string] false none none
authToken string false none none
authTokenExpiration number false none none
refreshToken string false none none
refreshTokenExpiry number false none none
permissions object false none none
» machineryUID object false none none
»» dashboardsWrite boolean false none none
»» dashboardsModify boolean false none none
»» dashboardsRead boolean false none none
»» documentsWrite boolean false none none
»» documentsModify boolean false none none
»» documentsRead boolean false none none

CompanyResponse

  [
    {
      "id": 0,
      "name": "string"
    },
    {
      "id": 1,
      "name": "string"
    },
    ...
  ]

Properties

Name Type Required Restrictions Description
id number false none none
name string false none none

CompanyMachineriesResponse

{
  "locationCluster": [
    {
      "uid": "string",
      "companyID": 0,
      "modelID": "string",
      "modelName": "string",
      "modelType": "string",
      "geoLocation": {
        "x": 0,
        "y": 0
      },
      "locationCluster": "string",
      "numHeads": 0
    }
  ]
}

Properties

Name Type Required Restrictions Description
locationCluster [object] true none none
» uid string true none none
» companyID number true none none
» modelID string true none none
» modelName string true none none
» modelType string true none none
» geoLocation object false none none
»» x number false none none
»» y number false none none
» locationCluster string false none none
» numHeads number true none none

CreateCompanyRequest

{
  "name": "string",
  "city": "string",
}

Properties

Name In Type Required Description
name body string false none
city body number false none

UpdateCompanyRequest

{
  "id": 0,
  "name": "string",
  "city": "string",
}

Properties

Name In Type Required Description
id body number false none
name body string false none
city body string false none

Machinery

{
  "uid": "string",
  "companyID": 0,
  "modelID": "string",
  "modelName": "string",
  "modelType": "string",
  "geoLocation": {
    "x": 0,
    "y": 0
  },
  "locationCluster": "string",
  "numHeads": 0
}

Properties

Name Type Required Restrictions Description
uid string true none none
companyID number true none none
modelID string true none none
modelName string true none none
modelType string true none none
geoLocation object false none none
» x number false none none
» y number false none none
locationCluster string false none none
numHeads number true none none

MachineryDetailsResponse

{
  "modelID": "string",
  "modelName": "string",
  "modelType": "string"
}

Properties

Name Type Required Restrictions Description
modelID string true none none
modelName string true none none
modelID string true none none

SensorsCatalogueResponse

[
  {
    "sensorName": "string",
    "sensorDescription": "string",
    "sensorUnit": "string",
    "sensorThresholdLow": "number",
    "sensorThresholdHigh": "number",
    "sensorInternalName": "string",
    "sensorCategory": "string",
    "sensorType": "string",
    "sensorImgFilename": "string",
    "imgPointerLocation": {
      "x": 0,
      "y": 0
    },
    "sensorBucketingType": "string"
  }
]

Properties

Name Type Required Restrictions Description
sensorName string true none none
sensorDescription string true none none
sensorUnit string true none none
sensorThresholdLow string true none none
sensorThresholdHigh string true none none
sensorInternalName string true none none
sensorCategory string true none none
sensorType string true none none
sensorImgFilename string false none none
sensorImgPointerLocation object false none none
» x number false none none
» y number false none none
sensorBucketingType string true none none

MachinerySensorsResponse

[
  {
    "machineryUID": "string",
    "name": "string",
    "description": "string",
    "unit": "string",
    "thresholdLow": 0,
    "thresholdHigh": 0,
    "internalName": "string",
    "category": "string",
    "type": "string",
    "isHeadMounted": true,
    "bucketingType": "string",
    "imgFilename": 0,
    "imgPointerLocation": {
      "x": 0,
      "y": 0
    }
  }
]

Properties

Name Type Required Restrictions Description
machineryUID string true none none
name string true none none
description string true none none
unit string true none none
thresholdLow number true none none
thresholdHigh number true none none
internalName string true none none
category string true none none
type string true none none
isHeadMounted boolean true none none
bucketingType string true none none
imgFilename number false none none
imgPointerLocation object false none none
» x number false none none
» y number false none none

MachineryDataRequest

{
  "sensorFilters": {
    "requestType": "string",
    "cacheDataRequestMaxTime": 0,
    "newDataRequestMinTime": 0,
    "widgetCategory": "string",
    "dataRange": {
      "amount": 0,
      "unit": "string"
    },
    "sensors": {
      "sensorName": [
        {
          "headNumber": 0,
          "mechNumber": 0,
          "sensorNames": [
            {
              "name": "string",
              "color": "string"
            }
          ]
        }
      ]
    },
    "aggregations": [
      {
        "name": "string",
        "color": "string"
      }
    ]
  }
}

Properties

Name Type Required Restrictions Description
sensorFilters object false none none
» requestType string false none none
» cacheDataRequestMaxTime number false none none
» newDataRequestMinTime number false none none
» widgetCategory string false none none
» dataRange object false none none
»» amount number false none none
»» unit string false none none
» sensors object false none none
»» sensorName [object] false none none
»»» headNumber number false none none
»»» mechNumber number false none none
»»» sensorNames [object] false none none
»»»» name string false none none
»»»» color string false none none
» aggregations [object] false none none
»» name string false none none
»» color string false none none

MachineryDataResponse

{
  "requestType": "string",
  "minDisplayTime": 0,
  "cachedSensorData": {
    "active": true,
    "machineryOff": true,
    "machineryOffFrom": 0,
    "machineryOffTo": 0,
    "time": 0,
    "minTime": 0,
    "maxTime": 0,
    "formattedTime": "string",
    "activeData": {
      "sensorInternalName": 0
    },
    "fillerData": {
      "sensorInternalName": 0
    },
    "allData": {
      "sensorInternalName": 0
    },
    "aggregationData": {
      "aggregationName": {
        "value": 0,
        "note": "string"
      }
    }
  },
  "displaySensorData": {
    "active": true,
    "machineryOff": true,
    "machineryOffFrom": 0,
    "machineryOffTo": 0,
    "time": 0,
    "minTime": 0,
    "maxTime": 0,
    "formattedTime": "string",
    "activeData": {
      "sensorInternalName": 0
    },
    "fillerData": {
      "sensorInternalName": 0
    },
    "allData": {
      "sensorInternalName": 0
    },
    "aggregationData": {
      "aggregationName": {
        "value": 0,
        "note": "string"
      }
    }
  },
  "newSensorData": {
    "active": true,
    "machineryOff": true,
    "machineryOffFrom": 0,
    "machineryOffTo": 0,
    "time": 0,
    "minTime": 0,
    "maxTime": 0,
    "formattedTime": "string",
    "activeData": {
      "sensorInternalName": 0
    },
    "fillerData": {
      "sensorInternalName": 0
    },
    "allData": {
      "sensorInternalName": 0
    },
    "aggregationData": {
      "aggregationName": {
        "value": 0,
        "note": "string"
      }
    }
  },
  "numSensorData": 0,
  "endOfData": true
}

Properties

Name Type Required Restrictions Description
requestType string false none none
minDisplayTime number false none none
cachedSensorData SensorData false none none
displaySensorData SensorData false none none
newSensorData SensorData false none none
numSensorData number false none none
endOfData boolean false none none

SensorData

{
  "active": true,
  "machineryOff": true,
  "machineryOffFrom": 0,
  "machineryOffTo": 0,
  "time": 0,
  "minTime": 0,
  "maxTime": 0,
  "formattedTime": "string",
  "activeData": {
    "sensorInternalName": 0
  },
  "fillerData": {
    "sensorInternalName": 0
  },
  "allData": {
    "sensorInternalName": 0
  },
  "aggregationData": {
    "aggregationName": {
      "value": 0,
      "note": "string"
    }
  }
}

Properties

Name Type Required Restrictions Description
active boolean false none none
machineryOff boolean false none none
machineryOffFrom number false none none
machineryOffTo number false none none
time number false none none
minTime number false none none
maxTime number false none none
formattedTime string false none none
activeData object false none none
» sensorInternalName number¦null false none none
fillerData object false none none
» sensorInternalName number¦null false none none
allData object false none none
» sensorInternalName number¦null false none none
aggregationData object false none none
» aggregationName object false none none
»» value number false none none
»» note string false none none

MachineryDocuments

{
  "rootFolderId": "string",
  "childrenIds": ["string"],
  "fileMap": {
    "fileID": {
      "id": "string",
      "name": "string",
      "documentUID": "string",
      "isDir": true,
      "isDocument": true,
      "isModifiable": true,
      "childrenIds": ["string"],
      "childrenCount": 0,
      "parentId": "string",
      "modDate": "2019-08-24T14:15:22Z",
      "size": 0,
      "isPrivate": true,
      "isArol": false
    }
  }
}

Properties

Name Type Required Restrictions Description
rootFolderId string false none none
childrenIds [string] false none none
fileMap object false none none
» fileID object false none none
»» id string false none none
»» name string false none none
»» documentUID string false none none
»» isDir boolean false none none
»» isDocument boolean false none none
»» isModifiable boolean false none none
»» childrenIds [string] false none none
»» childrenCount number false none none
»» parentId string false none none
»» modDate string(date-time) false none none
»» size number false none File size in bytes
»» isPrivate boolean false none none
»» isArol boolean false none none

MachineryDocumentRename

{
  "oldFileID": "string",
  "documentUID": "string",
  "newFileName": "string",
  "oldFileName": "string",
  "type": "string"
}

Properties

Name Type Required Restrictions Description
oldFileID string false none none
documentUID string false none none
newFileName string false none none
oldFileName string false none none
type string false none none

MachineryCreateFolderRequest

{
  "folderPath": "string"
}

Properties

Name Type Required Restrictions Description
folderPath string false none none

MachineryUploadFilesRequest

{
  "parentFolderPath": "string"
}

Properties

Name Type Required Restrictions Description
parentFolderPath string false none none

MachineryDeleteFilesRequest

{
  "documentsList": [
    {
      "id": "string",
      "documentUID": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
documentsList [object] false none none
» id string false none none
» documentUID string false none none

SaveDashboardRequest

{
  "dashboard": {}
}

Properties

Name Type Required Restrictions Description
dashboard object false none none

Dashboard

{
  "name": "string",
  "machineryUID": "string",
  "timestamp": 0,
  "userID": 0,
  "isDefault": true,
  "numUnsavedChanges": 0,
  "lastSave": 0,
  "isNew": true,
  "numCols": 0,
  "numRows": 0,
  "gridCompaction": "string",
  "grid": {
    "widgets": [
      {
        "id": "string",
        "name": "string",
        "type": "string",
        "maxSensors": 0,
        "sensorsMonitoring": {
          "dataRange": {
            "amount": 0,
            "unit": "string"
          },
          "sensors": [
            {
              "headNumber": 0,
              "mechNumber": 0,
              "sensorNames": [
                {
                  "name": "string",
                  "color": "string"
                }
              ]
            }
          ],
          "aggregations": [
            {
              "name": "string",
              "color": "string"
            }
          ]
        }
      }
    ],
    "layout": []
  }
}

Properties

Name Type Required Restrictions Description
name string false none none
machineryUID string false none none
timestamp number false none none
userID number false none none
isDefault boolean false none none
numUnsavedChanges number false none none
lastSave number false none none
isNew boolean false none none
numCols number false none none
numRows number false none none
gridCompaction string¦null false none none
grid object false none none
» widgets [object] false none none
»» id string false none none
»» name string false none none
»» type string false none none
»» maxSensors number false none none
»» sensorsMonitoring object false none none
»»» dataRange object false none none
»»»» amount number false none none
»»»» unit string false none none
»»» sensors [object] false none none
»»»» headNumber number false none none
»»»» mechNumber number false none none
»»»» sensorNames [object] false none none
»»»»» name string false none none
»»»»» color string false none none
»»» aggregations [object] false none none
»»»» name string false none none
»»»» color string false none none
» layout array false none none

SavedDashboards

{
  "savedDashboards": [
    {
      "name": "string",
      "isDefault": true,
      "machineryUID": "string",
      "timestamp": 0,
      "numSensorsMonitored": 0,
      "numWidgets": 0
    }
  ]
}

Properties

Name Type Required Restrictions Description
savedDashboards [object] false none none
» name string false none none
» isDefault boolean false none none
» machineryUID string false none none
» timestamp number false none none
» numSensorsMonitored number false none none
» numWidgets number false none none

SavedDashboardTemplates

{
  "templateDashboards": [
    {
      "name": "string",
      "isDefault": true,
      "machineryUID": "string",
      "timestamp": 0,
      "numSensorsMonitored": 0,
      "numWidgets": 0
    }
  ]
}

Properties

Name Type Required Restrictions Description
templateDashboards [object] false none none
» name string false none none
» isDefault boolean false none none
» machineryUID string false none none
» timestamp number false none none
» numSensorsMonitored number false none none
» numWidgets number false none none

User

{
  "id": 0,
  "email": "string",
  "name": "string",
  "surname": "string",
  "roles": ["string"],
  "active": true,
  "companyID": 0,
  "createdAt": 0,
  "createdBy": "string"
}

Properties

Name Type Required Restrictions Description
id number false none none
email string false none none
name string false none none
surname string false none none
roles [string] false none none
active boolean false none none
companyID number¦null false none none
createdAt number false none none
createdBy string false none none

CompanyUsers

[
  {
    "id": 0,
    "email": "string",
    "name": "string",
    "surname": "string",
    "roles": [
      "string"
    ],
    "active": true,
    "companyID": 0,
    "createdAt": 0,
    "createdBy": "string",
    "isTemp": false
  },
  ...
]

Properties

Name Type Required Restrictions Description
anonymous [User] false none none

UpdateAccountRequest

{
  "id": 0,
  "email": "string",
  "name": "string",
  "surname": "string",
  "roles": "string",
  "active": true,
  "isTemp": false,
}

Properties

Name Type Required Restrictions Description
id number false none none
email string false none none
name string false none none
surname string false none none
roles string false none none
active boolean false none none
isTemp boolean false none none

PasswordResetRequest

{
  "id": 0,
  "password": "string",
  "isTemp": true
}

Properties

Name Type Required Restrictions Description
id number false none none
password string false none none
isTemp string false none none

CreateAccountRequest

{
  "email": "string",
  "password": "string",
  "name": "string",
  "surname": "string",
  "roles": ["string"],
  "companyID": 0,
  "permissions": {
    "machineryUID": {
      "dashboardsWrite": true,
      "dashboardsModify": true,
      "dashboardsRead": true,
      "documentsWrite": true,
      "documentsModify": true,
      "documentsRead": true
    }
  }
}

CreateAccountResponse

{
  "email": "string",
  "password": "string",
  "name": "string",
  "surname": "string",
  "roles": ["string"],
  "companyID": 0,
  "permissions": {
    "machineryUID": {
      "dashboardsWrite": true,
      "dashboardsModify": true,
      "dashboardsRead": true,
      "documentsWrite": true,
      "documentsModify": true,
      "documentsRead": true
    }
  },
  "createdBy": 18,
  "isTemp": true
}

Properties

Name Type Required Restrictions Description
email string false none none
password string false none none
name string false none none
surname string false none none
roles [string] false none none
companyID number¦null false none none
createdBy number false none none
permissions object false none none
» machineryUID object false none none
»» dashboardsWrite boolean false none none
»» dashboardsModify boolean false none none
»» dashboardsRead boolean false none none
»» documentsWrite boolean false none none
»» documentsModify boolean false none none
»» documentsRead boolean false none none

UserPermissionsRequest

{
  "userID": 0,
  "machineryUID": "string",
  "dashboardsWrite": true,
  "dashboardsModify": true,
  "dashboardsRead": true,
  "documentsWrite": true,
  "documentsModify": true,
  "documentsRead": true
}

Properties

Name Type Required Restrictions Description
userID number false none none
machineryUID string false none none
dashboardsWrite boolean false none none
dashboardsModify boolean false none none
dashboardsRead boolean false none none
documentsWrite boolean false none none
documentsModify boolean false none none
documentsRead boolean false none none

UserPermissionsResponse

{
  "userID": 0,
  "machineryUID": "string",
  "dashboardsWrite": true,
  "dashboardsModify": true,
  "dashboardsRead": true,
  "documentsWrite": true,
  "documentsModify": true,
  "documentsRead": true
}

Properties

Name Type Required Restrictions Description
userID number false none none
machineryUID string false none none
dashboardsWrite boolean false none none
dashboardsModify boolean false none none
dashboardsRead boolean false none none
documentsWrite boolean false none none
documentsModify boolean false none none
documentsRead boolean false none none

[
  {
    "userID": 0,
    "machineryUID": "string",
    "dashboardsWrite": true,
    "dashboardsModify": true,
    "dashboardsRead": true,
    "documentsWrite": true,
    "documentsModify": true,
    "documentsRead": true
  }
]

Properties

Name Type Required Restrictions Description
anonymous [UserPermissionsResponse] false none none

About

An IoT Application on Capping Devices

Resources

License

Stars

Watchers

Forks

Languages