BOCHU IoT Api
  1. Machine Management
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
        POST
      • Machine Detailed Information
        POST
      • Machine Status Change Records
        POST
    • Real-time Data
      • Machine Operating Status
    • 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. Machine Management

Machine Status Change Records

POST
/api/user_devices/time_periods

Function Introduction#

Used to query the status change records of authenticated machines within a specified time period.

Notes#

cardId ① Needs to be the control card ID of the authenticated machine; ② Needs to be the control card ID within the user device quota.
The difference between startTime and endTime should not exceed one day and must be within the same day.
Only saves records of the machine for the last 100 days.

Request

Header Params

Body Params application/json

Example
{
    "cardId": "1234567890",
    "startTime": "2023-11-17 00:00:00",
    "endTime": "2023-11-17 23:59:59"
}

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 '/api/user_devices/time_periods' \
--header 'app-id: op188b25734a433a79' \
--header 'time-stamp: 1701055999133' \
--header 'app-sign: 6829d50c9e68138b109d5ae040d48166' \
--header 'zoneId: America/Chicago' \
--header 'Content-Type: application/json' \
--data-raw '{
    "cardId": "1234567890",
    "startTime": "2023-11-17 00:00:00",
    "endTime": "2023-11-17 23:59:59"
}'

Responses

🟢200Success
application/json
Body

Example
{
    "status": 0,
    "msg": "OK",
    "data": [
        {
            "time": 21600,
            "timeStart": "2023-11-17 00:00:00",
            "timeEnd": "2023-11-17 06:00:00",
            "status": "OFFLINE"
        },
        {
            "time": 21600,
            "timeStart": "2023-11-17 06:00:00",
            "timeEnd": "2023-11-17 12:00:00",
            "status": "IDLE"
        },
        {
            "time": 21600,
            "timeStart": "2023-11-17 12:00:00",
            "timeEnd": "2023-11-17 18:00:00",
            "status": "WORK"
        },
        {
            "time": 3600,
            "timeStart": "2023-11-17 18:00:00",
            "timeEnd": "2023-11-17 19:00:00",
            "status": "PAUSE"
        },
        {
            "time": 3600,
            "timeStart": "2023-11-17 19:00:00",
            "timeEnd": "2023-11-17 20:00:00",
            "status": "ALARM"
        },
        {
            "time": 3600,
            "timeStart": "2023-11-17 20:00:00",
            "timeEnd": "2023-11-17 21:00:00",
            "status": "PLC"
        },
        {
            "time": 10799,
            "timeStart": "2023-11-17 21:00:00",
            "timeEnd": "2023-11-17 23:59:59",
            "status": "UNKNOWN"
        }
    ]
}
Modified at 2024-10-09 01:59:09
Previous
Machine Detailed Information
Next
Machine Operating Status
Built with