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
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 Docker/pg
and Docker/mongo/data
dirs. These exports need to be imported into the corresponding DBMS manually.
Step 1: cd ./express-server
Step 2: npm install --force
Step 3: npm run start:dev
Step 1: cd ./react-client
Step 2: npm install --force
Step 3: npm run start
Step 1: Make sure you have Docker installed locally on your system
Step 2: cd ./Docker
Step 3: docker compose up --build
Step 4: Open Docker Desktop and make sure to run all the containers under the "arol-cloud" container
Step 5: Open http://localhost:3000 on you favourite browser
username: postgres
password: postgres
port: 5432
username: mariodeda@hotmail.com
password: 123
roles: Administrator
username: mariodeda2@hotmail.com
password: 123
roles: Worker
username: test2@hotmail.com
password: 12345678
roles: Worker
username: worker@hotmail.com
password: 12345678
roles: Worker, Manager
Base URLs:
Email: Support
- HTTP Authentication, scheme: bearer
Public operations (no auth token needed)
POST /public/login
Initial authentication
Perform initial authentication to obtain JWT auth token
Body parameter
{
"email": "example@email.com",
"password": 12345678
}
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | LoginCredentials | true | none |
body | string | true | none | |
» password | body | string | true | 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
}
}
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Successful operation | LoginResponse |
403 | Forbidden | Bad credentials or account disabled | None |
POST /public/logout
Logout
Perform logout and delete any refresh tokens associated to this session
Name | In | Type | Required | Description |
---|---|---|---|---|
id | query | integer | false | none |
token | query | string | false | none |
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Logout successful | None |
GET /public/refreshtoken
JWT token refresh
Refresh JWT token by providing a valid refresh token
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
}
}
}
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 |
GET /public/status
Health
Check server health
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Server is on and accepting requests | None |
Operations about AROL customer companies
GET /company
Company information
Get the current authenticated user company information
Example responses
200 Response
{
"id": 0,
"name": "string"
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Company details | CompanyResponse |
401 | Unauthorized | Authentication failed | None |
404 | Not Found | No company found for the authenticated user | None |
Operations on customer company machineries
GET /machinery/company
Company machineries
Get all the authenticated user company machineries
Example responses
200 Response
{
"locationCluster": [
{
"uid": "string",
"companyID": 0,
"modelID": "string",
"modelName": "string",
"modelType": "string",
"geoLocation": {
"x": 0,
"y": 0
},
"locationCluster": "string",
"numHeads": 0
}
]
}
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 |
GET /machinery/company/{machineryUID}
Machinery by its UID
Get the authenticated user company machinery by its UID
Name | In | Type | Required | Description |
---|---|---|---|---|
machineryUID | path | string | true | The UID of the desired machinery |
Example responses
200 Response
{
"uid": "string",
"companyID": 0,
"modelID": "string",
"modelName": "string",
"modelType": "string",
"geoLocation": {
"x": 0,
"y": 0
},
"locationCluster": "string",
"numHeads": 0
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Machinery information | MachineryResponse |
400 | Bad Request | Invalid company ID detected | 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 |
GET /machinery/sensors
Machinery sensors by its UID
Get the authenticated user company machinery sensors by its UID
Name | In | Type | Required | Description |
---|---|---|---|---|
machineryUID | query | string | true | The UID of the desired machinery |
Example responses
200 Response
[
{
"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
}
}
]
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Machinery sensors information | MachinerySensorsResponse |
400 | Bad Request | Invalid company ID detected | None |
401 | Unauthorized | Authentication failed | None |
403 | Forbidden | Insufficient permissions | None |
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"
}
]
}
}
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
}
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 |
Public operations (no auth token needed)
GET /users/company
Company users
Get all company users (Admin only)
Example responses
200 Response
[
{
"id": 0,
"email": "string",
"name": "string",
"surname": "string",
"roles": [
"string"
],
"active": true,
"companyID": 0,
"createdAt": 0,
"createdBy": "string"
}
]
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 |
POST /users/create
Create new user account
Create a new user account (Admin or Manager 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
}
}
}
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | CreateAccountRequest | false | Account data |
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
}
}
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Created account | CreateAccountRequest |
401 | Unauthorized | Authentication failed | None |
403 | Forbidden | Insufficient permissions | None |
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
}
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | UpdateAccountRequest | false | New account details |
» id | body | number | false | none |
body | string | false | none | |
» name | body | string | false | none |
» surname | body | string | false | none |
» roles | body | string | false | none |
» active | body | boolean | false | none |
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Account details updated | None |
401 | Unauthorized | Authentication failed | None |
403 | Forbidden | Insufficient permissions | None |
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"
}
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | PasswordResetRequest | false | Password reset data |
» id | body | number | false | none |
» password | body | string | false | none |
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Password succesfully reset | None |
401 | Unauthorized | Authentication failed | None |
403 | Forbidden | Insufficient permissions | None |
GET /users/permissions
User permissions
Get user permissions wrt to the given machinery UID. If machinery UID is not provided, the list of all users permissions will be returned. The response body will be an array of permission objects.
Example responses
200 Response
{
"userID": 0,
"machineryUID": "string",
"dashboardsWrite": true,
"dashboardsModify": true,
"dashboardsRead": true,
"documentsWrite": true,
"documentsModify": true,
"documentsRead": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | User permissions wrt given machinery UID | UserPermissionsResponse |
401 | Unauthorized | Authentication failed | None |
403 | Forbidden | Insufficient permissions | None |
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
}
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 |
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Permissions updated successfully | None |
401 | Unauthorized | Authentication failed | None |
403 | Forbidden | Insufficient permissions | None |
Operations on customer company machinery dashboards
POST /dashboard/save
Save dashboard configuration
Save dashboard configuration for the given machinery
Body parameter
{
"dashboard": {}
}
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | SaveDashboardRequest | false | none |
» dashboard | body | object | false | none |
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 |
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": {}
}
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | SaveDashboardRequest | false | none |
» dashboard | body | object | false | none |
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 |
DELETE /dashboard/delete
Delete dashboard configuration
Delete dashboard configuration for the given machinery
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 |
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 |
GET /dashboard/load
Load dashboard configuration
Load dashboard configuration for the given machinery
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": []
}
}
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 |
GET /dashboard/load/default
Load the default dashboard configuration
Load the default dashboard configuration for the given machinery
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": []
}
}
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 |
GET /dashboard/saved
Get list of saved dashboards
Get list of saved dashboards for the given machinery
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
}
]
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Saved dashboards | SavedDashboards |
401 | Unauthorized | Authentication failed | None |
403 | Forbidden | Insufficient permissions | None |
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.
Name | In | Type | Required | Description |
---|---|---|---|---|
machineryUID | query | string | true | The UID of the desired machinery |
Example responses
200 Response
{
"templateDashboards": [
{
"name": "string",
"isDefault": true,
"machineryUID": "string",
"timestamp": 0,
"numSensorsMonitored": 0,
"numWidgets": 0
}
]
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Dashboards templates | SavedDashboardTemplates |
401 | Unauthorized | Authentication failed | None |
403 | Forbidden | Insufficient permissions | None |
Operations on customer company machinery documents
GET /documents
Machinery documents
Get the authenticated user company machinery documents by its UID.
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
}
}
}
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 |
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"
}
]
}
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 |
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 |
GET /documents/document
Machinery documents
Get the authenticated user company machinery documents by its UID.
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 |
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 |
POST /documents/rename
Rename machinery document
Rename a machinery document.
Body parameter
{
"oldFileID": "string",
"documentUID": "string",
"newFileName": "string",
"type": "string"
}
Name | In | Type | Required | Description |
---|---|---|---|---|
machineryUID | query | string | true | The UID of the desired machinery |
body | body | MachineryDocumentRenameRequest | true | none |
» oldFileID | body | string | false | none |
» documentUID | body | string | false | none |
» newFileName | body | string | false | none |
» type | body | string | false | none |
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 |
PUT /documents/folder
Create machinery folder
Create folder for the given machinery UID
Body parameter
{
"folderPath": "string"
}
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 |
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 |
PUT /documents/files
Upload machinery documents
Upload one or multiple documents for the given machinery UID
Body parameter
{
"parentFolderPath": "string"
}
Name | In | Type | Required | Description |
---|---|---|---|---|
machineryUID | query | string | true | The UID of the desired machinery |
body | body | MachineryUploadFilesRequest | true | none |
» parentFolderPath | body | string | false | none |
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 |
{
"email": "example@email.com",
"password": 12345678
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
string | true | none | none | |
password | string | true | none | none |
{
"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
}
}
}
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 |
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 |
{
"id": 0,
"name": "string"
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | number | false | none | none |
name | string | false | none | none |
{
"locationCluster": [
{
"uid": "string",
"companyID": 0,
"modelID": "string",
"modelName": "string",
"modelType": "string",
"geoLocation": {
"x": 0,
"y": 0
},
"locationCluster": "string",
"numHeads": 0
}
]
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
locationCluster | [object] | false | none | none |
» uid | string | false | none | none |
» companyID | number | false | none | none |
» modelID | string | false | none | none |
» modelName | string | false | none | none |
» modelType | string | false | none | none |
» geoLocation | object | false | none | none |
»» x | number | false | none | none |
»» y | number | false | none | none |
» locationCluster | string | false | none | none |
» numHeads | number | false | none | none |
{
"uid": "string",
"companyID": 0,
"modelID": "string",
"modelName": "string",
"modelType": "string",
"geoLocation": {
"x": 0,
"y": 0
},
"locationCluster": "string",
"numHeads": 0
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
uid | string | false | none | none |
companyID | number | false | none | none |
modelID | string | false | none | none |
modelName | string | false | none | none |
modelType | string | false | none | none |
geoLocation | object | false | none | none |
» x | number | false | none | none |
» y | number | false | none | none |
locationCluster | string | false | none | none |
numHeads | number | false | none | none |
[
{
"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
}
}
]
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
machineryUID | string | false | none | none |
name | string | false | none | none |
description | string | false | none | none |
unit | string | false | none | none |
thresholdLow | number | false | none | none |
thresholdHigh | number | false | none | none |
internalName | string | false | none | none |
category | string | false | none | none |
type | string | false | none | none |
isHeadMounted | boolean | false | none | none |
bucketingType | string | false | none | none |
imgFilename | number | false | none | none |
imgPointerLocation | object | false | none | none |
» x | number | false | none | none |
» y | number | false | none | none |
{
"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"
}
]
}
}
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 |
{
"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
}
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 |
{
"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"
}
}
}
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 |
{
"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
}
}
}
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 |
{
"oldFileID": "string",
"documentUID": "string",
"newFileName": "string",
"type": "string"
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
oldFileID | string | false | none | none |
documentUID | string | false | none | none |
newFileName | string | false | none | none |
type | string | false | none | none |
{
"folderPath": "string"
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
folderPath | string | false | none | none |
{
"parentFolderPath": "string"
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
parentFolderPath | string | false | none | none |
{
"documentsList": [
{
"id": "string",
"documentUID": "string"
}
]
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
documentsList | [object] | false | none | none |
» id | string | false | none | none |
» documentUID | string | false | none | none |
{
"dashboard": {}
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
dashboard | object | false | none | none |
{
"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": []
}
}
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": [
{
"name": "string",
"isDefault": true,
"machineryUID": "string",
"timestamp": 0,
"numSensorsMonitored": 0,
"numWidgets": 0
}
]
}
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 |
{
"templateDashboards": [
{
"name": "string",
"isDefault": true,
"machineryUID": "string",
"timestamp": 0,
"numSensorsMonitored": 0,
"numWidgets": 0
}
]
}
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 |
{
"id": 0,
"email": "string",
"name": "string",
"surname": "string",
"roles": [
"string"
],
"active": true,
"companyID": 0,
"createdAt": 0,
"createdBy": "string"
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | number | false | none | none |
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 |
[
{
"id": 0,
"email": "string",
"name": "string",
"surname": "string",
"roles": [
"string"
],
"active": true,
"companyID": 0,
"createdAt": 0,
"createdBy": "string"
}
]
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [User] | false | none | none |
{
"id": 0,
"email": "string",
"name": "string",
"surname": "string",
"roles": "string",
"active": true
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | number | false | none | none |
string | false | none | none | |
name | string | false | none | none |
surname | string | false | none | none |
roles | string | false | none | none |
active | boolean | false | none | none |
{
"id": 0,
"password": "string"
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | number | false | none | none |
password | string | false | none | none |
{
"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
}
}
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
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 |
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 |
{
"userID": 0,
"machineryUID": "string",
"dashboardsWrite": true,
"dashboardsModify": true,
"dashboardsRead": true,
"documentsWrite": true,
"documentsModify": true,
"documentsRead": true
}
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
}
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
}
]
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [UserPermissionsResponse] | false | none | none |