BOCHU IoT Api
  1. Real-time Data
BOCHU IoT Api
  • 0. Introduction
  • a. Use our demo to quickly generate request headers
  • b. Manually create the request header
  • 1. Machine Quota
  • 2. API Quota & API Rate Limit
  • Global Error Code
  • Cutting Machine API
    • Machine Management
      • Machine List
      • Machine Detailed Information
      • Machine Status Change Records
    • Real-time Data
      • Machine Operating Status
      • Machine Current Alarm List
      • Machine Ongoing Processing Task
      • Real-time Status of the Cutting System
    • Historical Data
      • Paged Processing Records
    • Statistics Information
      • Summary of Statistical Data for a Period of Time
      • Daily Alarm Duration
      • Daily Piercing Count
      • Daily Idle Time
      • Daily Laser-On Time
      • Daily Gas-On Time
      • Daily Cutting Length
      • Daily Traveling Distance
      • Daily Processing Time v2
    • Task Management
      • Upload Cut Task
  • Welding Machine API
    • Machine Management
      • Machine List
      • Machine Detailed Information
      • Machine Status Change Records
    • Real-time Data
      • Machine Operating Status
        POST
    • Historical Data
      • Paged Welding Processing Records
    • Statistics Information
      • Summary of Welding Statistical Data for a Period of Time
      • Daily Flat-Weld Length
      • Daily Flat-Weld Time
      • Daily Vertical-Weld Length
      • Daily Vertical-Weld Time
      • Daily Weld Length
      • Daily Weld Time
      • Daily Weld-Pass Count
      • Daily Idle Time
      • Daily Processing Time
    • Task Management
      • Upload Weld Task
  1. Real-time Data

Machine Operating Status

POST
https://mcs-gateway.fscut.com/api/user_devices/current_state

Function Introduction#

This function is used to query the current status overview of authenticated machines owned by the user.

Important Notes#

The cardId should be for an authenticated machine.
The cardId must be within the user's device quota. Devices exceeding the quota will not be allowed for querying.

Request

Header Params
zoneId
string 
optional
The query time-zone can be specified by header 'zoneId'. If 'zoneId' is not set, Asia/Shanghai will be used as default.
The time-zone ID must be from IANA Time Zone Database(TZDB). If 'zoneId' cannot be recognized, Asia/Shanghai will be used as default.
ref: https://docs.oracle.com/javase/8/docs/api/java/time/ZoneId.html
Example:
America/Chicago
Body Params application/json
cardIds
array[string]
List of control card IDs
required
Example
{
  "cardIds": [
    "123456789100",
    "123456789101"
  ]
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://mcs-gateway.fscut.com/api/user_devices/current_state' \
--header 'zoneId: America/Chicago' \
--header 'Content-Type: application/json' \
--data-raw '{
    "cardIds": [
        "123456789100",
        "123456789101"
    ]
}'

Responses

🟢200成功
application/json
Body
status
integer 
Status code
required
0 for successful response, non-zero for error codes
msg
string 
Response message
required
Ok for successful response, or an error message for non-successful responses
data
array [object {2}] 
required
cardId
string 
Control card ID
required
deviceState
string 
Machine state
required
OFFLINE(Machine is offline)
WORKING(Machine is processing)
ALARMING(Machine is in an alarm state)
IDLE(Machine is idle)
UNKNOWN(Machine state is unknown)
CLOSE(Cutting software is closed)
PAUSE(Processing is paused)
STOP(Processing is stopped)
Example
{
  "status": 0,
  "msg": "OK",
  "data": [
    {
      "cardId": "123456789100",
      "deviceState": "ALARMING"
    },
    {
      "cardId": "123456789101",
      "deviceState": "STOP"
    }
  ]
}
Modified at 2024-10-09 01:59:36
Previous
Machine Status Change Records
Next
Paged Welding Processing Records
Built with