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
API Method
Method Name | MachineClassification |
URL | https://developers.3dsignals.io/api/v1/machineClassification |
HTTP Method | GET |
Query string parameter | machineId – 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 name | Data Type | Field description |
reasons | Array of objects | List of objects for every state |
Where each object contains the following fields:
Field name | Data Type | Field description |
name | string | Display name of the Reason |
code | string | reason code |
Example of response:
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 ' '
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)