Machine status

Overview
Get machine state request
Get machine state response
Error Message
Code sample


Overview

This method allows the user to get the current state and state duration of a specific machine. 3d Signals provides a continuous machine state, which is calculated within a one-minute interval.


Get machine state request

Pre steps:

  1. Get Token
  2. Get Machines Info

Method API

Method NamegetMachineState
URLhttps://developers.3dsignals.io/api/v1/machineState?machineId={id}
HTTP MethodGET
Query string parametermachineId – 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 nameData TypeField description
machineStatestring“OPERATING” / ”IDLE” / “OFF”
durationInMinutesintegerDuration from the beginning of the current state
lastUpdateTimetimestamp (sec)The timestamp of the latest state update

Example of response:


Error Message

Error codeReason
403- ForbiddenUnauthorized scope request
422- Unprocessable EntityMissing Machine ID
204- No ContentNo data available

Code sample

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)