Machine classifications ID

Overview
Get machine classifications ID request
Get machine classifications ID response
Error Message
Sample code


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.


Get machine classifications ID request

Pre steps

  1. Get Token
  2. Get Machines Info

API Method

Method Name
MachineClassification
URLhttps://developers.3dsignals.io/api/v1/machineClassification
HTTP MethodGET
Query string parametermachineId – as defined by 3d Signals

Get machine classifications ID response 

Response code 200 will contain a JSON file with a list of the machines’ classifications. Each object contains the following fields:

Field nameData TypeField description
reasonsArray of objectsList of objects for every state

Where each object contains the following fields:

Field nameData TypeField description
namestringDisplay name of the Reason
codestringreason code

Example of response:


Error Message

Error codeReason
403- ForbiddenUnauthorized scope request
422- Unprocessable EntityMissing Machine ID
404 – Not FoundMachine Id not found
204- No ContentResult 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)