C.1 HTTP API
C.1.0.3 Rückgabecode
| code | 説明 |
|---|---|
| 200 | Erfolgreiche Rückgabe mit Inhalt |
| 204 | Erfolgreiche Rückgabe ohne Inhalt |
| 499 | Erfassungsfehler |
| 498 | Lesefehler |
| 497 | Schreibfehler |
| 496 | Datei nicht gefunden |
| 496 | Fehler beim Wiederherstellen der Konfiguration |
| 494 | Aktualisierungsfehler |
| 493 | Passwortfehler |
| 492 | Benutzer deaktiviert |
| 491 | Datensatz dupliziert |
| 490 | Skriptprüfungsfehler |
| 489 | JSON-Formatfehler |
| 450 | Sonstiger Fehler |
| 404 | Ressource nicht gefunden |
| 401 | Nicht angemeldet |
| 400 | Parameterfehler |
C.1.1 Benutzer
C.1.1.1 Anmelden
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /user/login | |
| Method | POST |
- Anfrageparameter
- Rückgabebeispiel
C.1.2 Gerät
C.1.2.1 Geräteliste
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /device | |
| Method | GET | |
| Query | keywords: Gerät nach Name abfragen |
Rückgabebeispiel
[ { "calc": "function calc(value)\n for i, v in ipairs(value.cnc_alarm) do\n value['cnc_alarm_' .. i .. '_msg'] = v.alarm_msg\n value['cnc_alarm_' .. i .. '_no'] = v.alarm_no\n value['cnc_alarm_' .. i .. '_type'] = v.alarm_type\n end\n value.cnc_alarm = nil\n return value\nend", "config": { "host": "192.168.9.207", "port": 8193 }, "enable": true, "id": 1, "interval": 20, "model": "default", "name": "D001", "state": 0, "type": "fanuc" } ]
C.1.2.2 Gerät hinzufügen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /device | |
| Method | POST |
Anfrageparameter
{ "calc": "function calc(value)\n for i, v in ipairs(value.cnc_alarm) do\n value['cnc_alarm_' .. i .. '_msg'] = v.alarm_msg\n value['cnc_alarm_' .. i .. '_no'] = v.alarm_no\n value['cnc_alarm_' .. i .. '_type'] = v.alarm_type\n end\n value.cnc_alarm = nil\n return value\nend", "config": { "host": "192.168.9.207", "port": 8193 }, "enable": true, "interval": 20, "model": "default", "name": "D001", "state": 0, "type": "fanuc" }Rückgabebeispiel`
{ "calc": "function calc(value)\n for i, v in ipairs(value.cnc_alarm) do\n value['cnc_alarm_' .. i .. '_msg'] = v.alarm_msg\n value['cnc_alarm_' .. i .. '_no'] = v.alarm_no\n value['cnc_alarm_' .. i .. '_type'] = v.alarm_type\n end\n value.cnc_alarm = nil\n return value\nend", "config": { "host": "192.168.9.207", "port": 8193 }, "enable": true, "id": 1, "interval": 20, "model": "default", "name": "D001", "state": 0, "type": "fanuc" }
C.1.2.3 Gerät abrufen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /device/<id> | id ist die Geräte-ID |
| Method | GET |
Rückgabebeispiel`
{ "calc": "function calc(value)\n for i, v in ipairs(value.cnc_alarm) do\n value['cnc_alarm_' .. i .. '_msg'] = v.alarm_msg\n value['cnc_alarm_' .. i .. '_no'] = v.alarm_no\n value['cnc_alarm_' .. i .. '_type'] = v.alarm_type\n end\n value.cnc_alarm = nil\n return value\nend", "config": { "host": "192.168.9.207", "port": 8193 }, "enable": true, "id": 1, "interval": 20, "model": "default", "name": "D001", "type": "fanuc", "variables": [ { "calc": "", "config": { "builtin": true }, "id": 8, "name": "cnc_type", "readable": true, "writable": false } ] }
C.1.2.4 Gerät ändern
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /device/<id> | id ist die Geräte-ID |
| Method | PUT |
Anfrageparameter`
{ "calc": "function calc(value)\n for i, v in ipairs(value.cnc_alarm) do\n value['cnc_alarm_' .. i .. '_msg'] = v.alarm_msg\n value['cnc_alarm_' .. i .. '_no'] = v.alarm_no\n value['cnc_alarm_' .. i .. '_type'] = v.alarm_type\n end\n value.cnc_alarm = nil\n return value\nend", "config": { "host": "192.168.9.207", "port": 8193 }, "enable": true, "id": 1, "interval": 20, "model": "default", "name": "D001", "type": "fanuc", "variables": [ { "calc": "", "config": { "builtin": true }, "id": 8, "name": "cnc_type", "readable": true, "writable": false } ] }Rückgabebeispiel`
{ "calc": "function calc(value)\n for i, v in ipairs(value.cnc_alarm) do\n value['cnc_alarm_' .. i .. '_msg'] = v.alarm_msg\n value['cnc_alarm_' .. i .. '_no'] = v.alarm_no\n value['cnc_alarm_' .. i .. '_type'] = v.alarm_type\n end\n value.cnc_alarm = nil\n return value\nend", "config": { "host": "192.168.9.207", "port": 8193 }, "enable": true, "id": 1, "interval": 20, "model": "default", "name": "D001", "type": "fanuc", "variables": [ { "calc": "", "config": { "builtin": true }, "id": 8, "name": "cnc_type", "readable": true, "writable": false } ] }
C.1.2.6 Gerätedaten OBJECT abrufen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /device/<id>/info | Wenn der Abfrageschlüssel code ist, ist id die Gerätenummer, andernfalls ist id die Geräte-ID |
| Method | GET | |
| Query | key:ID-Typ type: Datentyp auswählen before_item_calc Vor der Variablenberechnung before_device_calc Vor der Geräteberechnung |
Rückgabebeispiel
C.1.2.7 Gerätedaten LIST abrufen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /device/<id>/info_array | Wenn der Abfrageschlüssel code ist, ist id die Gerätenummer, andernfalls ist id die Geräte-ID |
| Method | GET | |
| Query | key:ID-Typ type: Datentyp auswählen before_item_calc Vor der Variablenberechnung before_device_calc Vor der Geräteberechnung |
Rückgabebeispiel`
C.1.2.8 Gerätegesundheit prüfen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /device/<id>/check_health | id ist die Geräte-ID |
| Method | GET |
Rückgabebeispiel`
C.1.2.9 Gerätevariable abrufen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /device/<id>/variable | id ist die Geräte-ID |
| Method | GET | |
| Query | start: Anzahl der Versätze zurückgeben limit: Anzahl pro Anfrage zurückgeben |
Rückgabebeispiel`
C.1.2.10 Gerätevariable hinzufügen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /device/<id>/variable | id ist die Geräte-ID |
| Method | POST |
Anfrageparameter
Rückgabebeispiel`
C.1.2.11 Variable ändern
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /variable/<id> | id ist die Variablen-ID |
| Method | PUT |
Anfrageparameter`
Rückgabebeispiel`
C.1.2.12 Variable abrufen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /variable/<id> | id ist die Variablen-ID |
| Method | GET |
Rückgabebeispiel`
C.1.2.13 Variable löschen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /variable/<id> | id ist die Variablen-ID |
| Method | DELETE |
C.1.2.14 Variablenwert abrufen
| Element | Beschreibung | |
|---|---|---|
| URL | /variable/<id>/value | id ist die Variablen-ID |
| Method | GET |
Rückgabebeispiel`
C.1.2.15 Variablenwert schreiben
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /variable/<id>/value | id ist die Variablen-ID |
| Method | PUT |
Anfragebeispiel
C.1.2.16 Geräte-Edge-Berechnungstest
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /device/<id>/edge_test | id ist die Geräte-ID |
| Method | PUT |
Anfrageparameter`
{ "current": { "cnc_alarm": [ { "alarm_no": 1, "alarm_type": "T01", "alarm_msg": "待机中" }, { "alarm_no": 204, "alarm_type": "XXX", "alarm_msg": "急停" } ] }, "last": "", "calc": "function calc(value)\n for i, v in ipairs(value.cnc_alarm) do\n value['cnc_alarm_' .. i .. '_msg'] = v.alarm_msg\n value['cnc_alarm_' .. i .. '_no'] = v.alarm_no\n value['cnc_alarm_' .. i .. '_type'] = v.alarm_type\n end\n value.cnc_alarm = nil\n return value\nend" }Rückgabebeispiel`
C.1.2.17 Variablen-Edge-Berechnungstest
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /variable/<id>/edge_test | id ist die Variablen-ID |
| Method | PUT |
Anfrageparameter`
Rückgabebeispiel`
C.1.2.18 Variablen-Edge-Berechnungstest
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /variable/<id>/edge_test | |
| Method | PUT |
Anfrageparameter`
Rückgabebeispiel`
C.1.2.19 Wert nach Gerätename und Variablenname abrufen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /device/<device_name>/variable/<variable_name> | device_name: Gerätename variable_name:Variablenname |
| Method | GET | |
| Query | type: Datentyp auswählen, optional before_calc Vor der Variablenberechnung force: Datenaktualisierung erzwingen |
Rückgabebeispiel`
C.1.3 DNC
C.1.3.1 Cloud-Programmliste abrufen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /device/<id>/dnc/cloudend | Wenn der Abfrageschlüssel code ist, ist id die Gerätenummer, andernfalls ist id die Geräte-ID |
| Query | key: ID-Typ path: Übergeordneter Pfad, leer für / |
|
| Method | GET |
Rückgabebeispiel
C.1.3.2 Cloud-Programm löschen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /device/<id>/dnc/cloudend | Wenn der Abfrageschlüssel code ist, ist id die Gerätenummer, andernfalls ist id die Geräte-ID |
| Query | key: ID-Typ<br>path: Programmpfad | |
| Method | DELETE |
C.1.3.3 IoTBoX-Programmliste abrufen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /device/<id>/dnc/boxend | Wenn der Abfrageschlüssel code ist, ist id die Gerätenummer, andernfalls ist id die Geräte-ID |
| Query | key: ID-Typ | |
| Method | GET |
Rückgabebeispiel`
C.1.3.4 IoTBoX-Programm in die Cloud hochladen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /device/<id>/dnc/boxend | Wenn der Abfrageschlüssel code ist, ist id die Gerätenummer, andernfalls ist id die Geräte-ID |
| Query | key: ID-Typ | |
| Method | PUT |
Anfragebeispiel`
C.1.3.5 Programm aus der Cloud nach IoTBoX herunterladen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /device/<id>/dnc/boxend | Wenn der Abfrageschlüssel code ist, ist id die Gerätenummer, andernfalls ist id die Geräte-ID |
| Query | key: ID-Typ | |
| Method | POST |
Anfragebeispiel`
C.1.3.6 IoTBoX-Programm löschen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /device/<id>/dnc/boxend | Wenn der Abfrageschlüssel code ist, ist id die Gerätenummer, andernfalls ist id die Geräte-ID |
| Query | key: ID-Typ<br>path: Programmpfad | |
| Method | DELETE |
C.1.3.7 Werkzeugmaschinen-Programmliste abrufen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /device/<id>/dnc/toolend | Wenn der Abfrageschlüssel code ist, ist id die Gerätenummer, andernfalls ist id die Geräte-ID |
| Query | key: ID-Typ path: Übergeordneter Pfad, leer für / |
|
| Method | GET |
Rückgabebeispiel`
C.1.3.8 Werkzeugmaschinenprogramm nach IoTBoX hochladen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /device/<id>/dnc/toolend | Wenn der Abfrageschlüssel code ist, ist id die Gerätenummer, andernfalls ist id die Geräte-ID |
| Query | key: ID-Typ | |
| Method | PUT |
Anfragebeispiel`
C.1.4 Sicherung
C.1.5 Konfiguration
C.1.5.1 Konfigurationsliste abrufen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /manager/config | |
| Method | GET | |
| Query | keywords: Nach Name suchen type: Nach Typ suchen start: Anzahl der Versätze zurückgeben limit: Anzahl pro Anfrage zurückgeben |
Rückgabebeispiel`
C.1.5.2 Konfiguration hinzufügen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /manager/config | |
| Method | POST |
Anfragebeispiel`
Rückgabebeispiel`
C.1.5.3 Einzelne Konfiguration abrufen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /manager/config/<id> | Wenn der Abfrageschlüssel 1 ist, ist id der Konfigurationsname, andernfalls ist id die Konfigurations-ID |
| Query | key: Ob Schlüssel zum Abrufen der Konfiguration verwendet werden soll | |
| Method | GET |
Rückgabebeispiel`
C.1.5.4 Einzelne Konfiguration abrufen (Unauthentifizierte öffentliche Konfiguration)
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /public/config/<id> | Wenn der Abfrageschlüssel 1 ist, ist id der Konfigurationsname, andernfalls ist id die Konfigurations-ID |
| Query | key: Ob Schlüssel zum Abrufen der Konfiguration verwendet werden soll | |
| Method | GET |
Rückgabebeispiel`
C.1.5.5 Konfiguration ändern
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /manager/config/<id> | Wenn der Abfrageschlüssel 1 ist, ist id der Konfigurationsname, andernfalls ist id die Konfigurations-ID |
| Query | key: Ob Schlüssel zum Abrufen der Konfiguration verwendet werden soll | |
| Method | PUT |
Anfragebeispiel`
Rückgabebeispiel`
C.1.6 Debug
C.1.7 IoTBoX-Konfiguration
C.1.7.1 IoTBoX-Informationen abrufen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /gateway | |
| Method | GET |
Rückgabebeispiel`
{ "fingerprint": "8ea29081b4c78e7bfa539622eb0038c4", "hardware": "WD1ECS", "id": "8ea29081b4c78e7bfa539622eb0038c4", "ports": [ { "comment": "", "device": "eth0", "enable": true, "name": "Ethernet", "type": 3 }, { "comment": "", "device": "/dev/ttyS1", "enable": true, "name": "COM1", "type": 2 } ], "software": "2.0.09090429" }
C.1.7.2 IoTBoX-Informationen konfigurieren
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /gateway | |
| Method | PUT |
Anfragebeispiel`
C.1.7.3 Cloud-Speicherinformationen abrufen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /dnc_config | |
| Method | GET |
Rückgabebeispiel`
C.1.8 IoTBoX-Lizenz
C.1.9 Netzwerkinformationen
C.1.9.1 Schnittstelleninformationen abrufen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /network/interface | |
| Method | GET |
Rückgabebeispiel`
C.1.9.2 Schnittstelleninformationen ändern
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /network/interface | |
| Method | PUT |
Anfragebeispiel`
C.1.9.3 Schnittstelle hinzufügen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /network/interface | |
| Method | POST |
Anfragebeispiel`
C.1.9.4 Schnittstelle löschen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /network/interface/<id> | id ist die Schnittstellen-ID |
| Method | DELETE |
C.1.9.5 DNS-Informationen abrufen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /network/dns | |
| Method | GET |
Rückgabebeispiel`
C.1.9.6 DNS-Informationen ändern
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /network/dns | |
| Method | PUT |
Anfragebeispiel`
C.1.9.7 4G-Konfiguration abrufen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /network/4g | |
| Method | GET |
Rückgabebeispiel`
C.1.9.9 Router-Aktivierungsstatus abrufen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /network/router | |
| Method | GET |
Rückgabebeispiel`
C.1.9.10 Aktivierungsstatus ändern
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /network/router | |
| Method | PUT |
Anfragebeispiel`
C.1.9.11 Routeninformationen abrufen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /network/custom_route | |
| Method | GET |
Rückgabebeispiel`
C.1.9.12 Routeninformationen ändern
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /network/custom_route | |
| Method | PUT |
Anfragebeispiel`
C.1.10 Portweiterleitung
C.1.10.1 Portweiterleitungsliste abrufen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /proxy | |
| Method | GET |
Rückgabebeispiel`
C.1.10.2 Portweiterleitung hinzufügen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /proxy | |
| Method | POST |
Anfragebeispiel`
C.1.10.3 Portweiterleitung abrufen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /proxy/<id> | id ist die Portweiterleitungs-ID |
| Method | GET |
Rückgabebeispiel`
C.1.11 Push-Konfiguration
C.1.11.3 Push abrufen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /publish/<id> | id ist die Push-ID |
| Method | GET |
Rückgabebeispiel`
C.1.12 Benutzerdefinierte Push-Plattform
C.1.12.1 Push-Plattform-Liste abrufen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /publish_type | |
| Method | GET |
Rückgabebeispiel`
C.1.12.2 Push-Plattform hinzufügen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /publish_type | |
| Method | POST |
Anfragebeispiel`
C.1.12.3 Push-Plattform abrufen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /publish_type/<id> | id ist die Push-Plattform-ID |
| Method | GET |
Rückgabebeispiel`
C.1.12.4 Push-Plattform ändern
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /publish_type/<id> | id ist die Push-Plattform-ID |
| Method | PUT |
Anfragebeispiel`
C.1.13 Systemaktualisierung
C.1.13.1 Aktualisierung prüfen
| Element | Inhalt | Hinweis |
|---|---|---|
| URL | /system/update | |
| Method | GET |
Rückgabebeispiel`