Machine Info
Provides the developer with unique machine IDs. The unique IDs have to be used to retrieve/submit information about specific machines.
Machine info request
Pre steps
API Method
Method Name | getMachineInfo |
URL | https://developers.3dsignals.io/api/v1/mahcineInfo |
HTTP Method | GET |
Machine info response
Provides the developer with unique machine IDs. The unique IDs have to be used to retrieve/submit information Response code 200 will contain a JSON file with a list of the machine objects with the following fields.
Field name | Data Type | Field description |
machineDisplayName | object | The machine’s display name in dView |
machineUniqueId | string | The machine’s ID as defined in the 3d Signals cloud |
factoryId | string | The factory ID to which the machine belongs |
factoryName | string | Factory Name |
Error Message
Error code | Reason |
403- Forbidden | Unauthorized scope request |
Sample Code
Postman
CURL
curl --location --request GET 'https://developers.3dsignals.io/api/v1/MahcineInfo' \ --header 'Authorization: Bearer "YOUR TOKEN" \'
Python
import requests url = "https://developers.3dsignals.io/api/v1/MahcineInfo" payload={} headers = { 'Authorization': 'Bearer "YOUR TOKEN" \\' } response = requests.request("GET", url, headers=headers, data=payload) print(response.text)
Machine status
Overview
This method allows the user to get the current state and state duration of a specific machine by providing the machine Id.
3d Signals provides a continuous machine state, this state is calculated within a one minute interval, hence the current state reflects the state within a range of 1 – 2 minutes.
Get Machine state request
Pre Steps
- Get Machine Info
API Method
Method Name | getMachineState |
URL | https://developers.3dsignals.io/api/v1/machineState?machineId={id} |
HTTP Method | GET |
Query string parameter | machineId – as defined by 3d Signals |
Get machine state response
Response code 200, contains a JSON file with the current machine state and state start time following fields.
Field name | Data Type | Field description |
machineState | string | “OPERATING”/ ”IDLE”/ “OFF” |
durationInMinutes | integer | Duration from the beginning of the current state |
astUpdateTime | timestamp (sec’) | The timestamp of the latest state update |
Error Message
Error code | Reason |
403- Forbidden | Unauthorized scope request |
422- Unprocessable Entity | Missing Machine ID |
204- No Content | No Data |
Sample Code
Postman
CURL
curl --location --request GET 'https://developers.3dsignals.io/api/v1/machineState?machineId= MACHINE ID \ --header 'Authorization: Bearer "YOUR TOKEN" '
Python
import requests url = "https://developers.3dsignals.io/api/v1/machineState?machineId= MACHINE ID " payload={} headers = { 'Authorization': YOUR TOKEN ' } response = requests.request("GET", url, headers=headers, data=payload) print(response.text)
Machine activity Log
Overview
This method provides the user with the ability to get the machine’s activity data for specific machines in a time frame.
The request has the following limitations per each request:
The maximum period of 30 days.
Get Machine activity Log request
Pre Steps
- Get Machine Info
API Method
Method Name | MachineActivityLog |
URL | https://developers.3dsignals.io/api/v1/machineActivity |
HTTP Method | POST |
Accepted content types | application/json |
Data struct | TBD:: add subTable |
JSON sample |
Data Structure
Field name | Data Type | Field description |
startTime | epoch timestamp in seconds | The beginning time |
endTime | epoch timestamp in seconds | The ending time |
machineId | string | The request machine ID |
Get Machine activity Log response
Response code 200 will contain a JSON file with a list of objects with the following fields.
Field name | Data Type | Field description |
startTime | epoch timestamp in seconds | The beginning state time |
endTime | epoch timestamp in seconds | The ending state time |
machineState | string | “OPERATING”/ ”IDLE”/ “OFF” |
durationInMinutes | integer | Duration of the current state |
Error Message
Error code | Reason |
403- Forbidden | Unauthorized scope request |
422- Unprocessable Entity | Missing Machine ID |
422- Unprocessable Entity | Start time > End Time |
422- Unprocessable Entity | Request times > maximum times |
204- No Content | No Data |
Sample Code
Postman
CURL
curl --location --request POST 'https://developers.3dsignals.io/api/v1/machineActivity' \ --header 'Authorization: Bearer YOUR TOKEN' \ --header 'Content-Type: application/json' \ --data-raw '{ "startTime":1234, "endTime":1234, "machineId":"MACHINE_ID" }'
Python
import requests import json url = "https://developers.3dsignals.io/api/v1/machineActivity" payload = json.dumps({ "startTime": 1234, "endTime": 1234, "machineId": "MACHINE ID" }) headers = { 'Authorization': 'Bearer TOUR_TOKEN', 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
Machine classification Values
Overview
Provides the developer with a list of machine states, as a set of unique IDs.The “Query string parameter” code returns the list of reasons per machine, as unique IDs.
Machine classifications values request
Pre steps
- Get Machine Info
API Method
Method Name | MachineClassification |
URL | https://developers.3dsignals.io/api/v1/machineClassifications?machineId={machineId} |
HTTP Method | GET |
Query string paramete | machineId – as defined by 3d Signals |
Machine classifications values response
Response code 200 will contain a JSON file with a list of the machines classifications with the following fields.
Field name | Data Type | Field description |
reasons | Array[object] | Tuple list of display names and codes for every state |
name | string | Display name if the Reason |
code | string | reason code |
Error Message
Error code | Reason |
403- Forbidden | Unauthorized scope request |
422- Unprocessable Entity | Missing Machine ID |
404 – Not Found | machine Id not found |
204- No Content | result list is empty |
Sample Code
Postman
CURL
curl --location -g --request POST 'https://developers.3dsignals.io/api/v1/machineClassifications?machineId={machineId}' \ --header 'Authorization: Bearer Your_Token' \ --header 'Content-Type: application/json' \ --data-raw ' '
Python
import requests import json url = "https://developers.3dsignals.io/api/v1/machineClassifications?machineId={machineId}" payload = "\n" headers = { 'Authorization': 'Bearer Your_Token', 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
Machine classification
Overview
This method allows the developer to classify machine states, as ongoing or predefined times.
The desired classification is selected by the key from the list obtained in Get Machine classifications Values
In order to set machine classification, The developer must fill in the reason id, machine id, and times period for the predefined case. In case the end time is empty, the application will classify the machine states up to a maximum of the end of the current shift at most or until new calls with end time are entered into the system.
Machine classifications request
Pre steps
- Get Machine Info
- Get Machine Classification Values
API Method
Method Name | setMachineClassification |
URL | https://developers.3dsignals.io/api/v1/machineClassification |
HTTP Method | POST |
Accepted content types | application/json |
JSON sample |
Data Structure
Field name | Data Type | Field description |
machineId | string | The request machine ID |
startTime | epoch timestamp in seconds | The beginning time |
endTime | epoch timestamp in seconds | The ending time |
reasonId | string | The request reason ID |
Machine classifications reaponse
Response code 200 for success.
Error Message
Error code | Reason |
403- Forbidden | Unauthorized scope request |
422- Unprocessable Entity | Machine/reason ID not exist |
422- Unprocessable Entity | Start time > End Time |
422- Unprocessable Entity | Future start time |
422- Unprocessable Entity | Message without start and end times |
Sample Code
Postman
CURL
curl --location --request POST 'https://developers.3dsignals.io/api/v1/machineClassification' \ --header 'Authorization: Bearer YOUR_TOKEN \ --header 'Content-Type: application/json' \ --data-raw '{ "machineId": "string", "startTime": 1614273208, "endTime": 1614273314, "reason": "string" }'
Python
import requests import json url = "https://developers.3dsignals.io/api/v1/machineClassification" payload = json.dumps({ "machineId": "string", "startTime": 1614273208, "endTime": 1614273314, "reason": "string" }) headers = { 'Authorization': 'Bearer Your_Token', 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)