C.1 HTTP API

C.1.0.1 Grundlegende Informationen

  • BASEURL: /api

C.1.0.3 Rückgabecode

code Beschreibung
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
{
    "password":"password",
    "username":"admin"
}
  • Rückgabebeispiel
{
    "token":"12599b49f6ab6b3abec7d32b3922e9d9"
}

C.1.1.2 Abmelden

Element Inhalt Hinweis
URL /user/login
Method DELETE

C.1.1.3 Abmelden

Element Inhalt Hinweis
URL /user/login
Method DELETE

C.1.1.4 INFO

Element Inhalt Hinweis
URL /user/info
Method GET
  • Rückgabebeispiel
{
    "fingerprint": "3f7d0134a560d0393008b984fef2b936",
    "hardware": "DEVDEVICE",
    "id": 2,
    "lisence": {
        "count": {
            "all": 11
        },
        "exp": 4100688000,
        "fingerprint": "3f7d0134a560d0393008b984fef2b936",
        "vpn": false
    },
    "role": 2,
    "software": "2.0.20220509",
    "username": "admin"
}

C.1.1.5 Passwort ändern

Element Inhalt Hinweis
URL /user/change_password
Method PUT
  • Anfrageparameter
{
    "password":"password",
    "new_password":"new_password"
}

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.5 Gerät löschen

Element Inhalt Hinweis
URL /device/<id> id ist die Geräte-ID
Method DELETE

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

    {
        "cnc_type": {
            "id": 8,
            "ts": 1652085617619,
            "value": "FANUC 0i MF"
        },
        "cnc_actfspeed": {
            "id": 27,
            "ts": 1652085617763,
            "value": 0
        },
    }

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`

    [
        {
            "id": 20,
            "name": "cnc_tooloffsetnum",
            "ts": 1652085597698,
            "value": 0
        },
        {
            "id": 8,
            "name": "cnc_type",
            "ts": 1652085597615,
            "value": "FANUC 0i MF"
        }
    ]

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`

    [
        {
            "code": 90200,
            "important": false,
            "state": 0
        },
        {
            "code": 40000,
            "important": false,
            "state": 0
        },
        {
            "code": 10000,
            "important": false,
            "state": 0
        }
    ]

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`

    [
        {
            "calc": "",
            "config": {
                "builtin": true
            },
            "id": 34,
            "name": "cnc_stemper",
            "readable": true,
            "writable": false
        }
    ]

C.1.2.10 Gerätevariable hinzufügen

Element Inhalt Hinweis
URL /device/<id>/variable id ist die Geräte-ID
Method POST
  • Anfrageparameter

    {
        "calc": "",
        "config": {
            "builtin": true
        },
        "name": "cnc_stemper",
        "readable": true,
        "writable": false
    }
  • Rückgabebeispiel`

    {
        "calc": "",
        "config": {
            "builtin": true
        },
        "id": 34,
        "name": "cnc_stemper",
        "readable": true,
        "writable": false
    }

C.1.2.11 Variable ändern

Element Inhalt Hinweis
URL /variable/<id> id ist die Variablen-ID
Method PUT
  • Anfrageparameter`

    {
        "calc": "",
        "config": {
            "builtin": true
        },
        "name": "cnc_stemper",
        "readable": true,
        "writable": false
    }
  • Rückgabebeispiel`

    {
        "calc": "",
        "config": {
            "builtin": true
        },
        "id": 34,
        "name": "cnc_stemper",
        "readable": true,
        "writable": false
    }

C.1.2.12 Variable abrufen

Element Inhalt Hinweis
URL /variable/<id> id ist die Variablen-ID
Method GET
  • Rückgabebeispiel`

    {
        "calc": "",
        "config": {
            "builtin": true
        },
        "id": 34,
        "name": "cnc_stemper",
        "readable": true,
        "writable": false
    }

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`

    {
        "ts": 1652086215825,
        "value": 123
    }

C.1.2.15 Variablenwert schreiben

Element Inhalt Hinweis
URL /variable/<id>/value id ist die Variablen-ID
Method PUT
  • Anfragebeispiel

    {
        "value": 123
    }

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": "Bereitschaft"
                },
                {
                    "alarm_no": 204,
                    "alarm_type": "XXX",
                    "alarm_msg": "Not-Halt"
                }
            ]
        },
        "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`

    {
        "cnc_alarm_1_msg": "Bereitschaft",
        "cnc_alarm_1_no": 1,
        "cnc_alarm_1_type": "T01",
        "cnc_alarm_2_msg": "Not-Halt",
        "cnc_alarm_2_no": 204,
        "cnc_alarm_2_type": "XXX"
    }

C.1.2.17 Variablen-Edge-Berechnungstest

Element Inhalt Hinweis
URL /variable/<id>/edge_test id ist die Variablen-ID
Method PUT
  • Anfrageparameter`

    {
        "current": "abc",
        "last": "def",
        "calc": "function calc(current,last)\n    current=current .. \"imok\"\n    return current\nend"
    }
  • Rückgabebeispiel`

    {
        "result": "abcimok"
    }

C.1.2.18 Variablen-Edge-Berechnungstest

Element Inhalt Hinweis
URL /variable/<id>/edge_test
Method PUT
  • Anfrageparameter`

    {
        "current": "abc",
        "last": "def",
        "calc": "function calc(current,last)\n    current=current .. \"imok\"\n    return current\nend"
    }
  • Rückgabebeispiel`

    {
        "result": "abcimok"
    }

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`

    {
        "value":123,
        "ts": 1725878881541
    }

C.1.2.20 Variablenwert nach Gerätename und Variablenname schreiben

Element Inhalt Hinweis
URL /device/<device_name>/variable/<variable_name> device_name: Gerätename
variable_name:Variablenname
Method PUT
  • Rückgabebeispiel`

    {
        "value":123,
    }

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

    [
        {
            "name": "O1234",
            "kind": 1, //1 ist Ordner, 2 ist Datei
            "time": "2019-08-29 20:13:14"
            "size": 0
        }
    ]

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`

    [
        {
            "name": "O1234",
            "kind": 1, //1 ist Ordner, 2 ist Datei
            "time": "2019-08-29 20:13:14"
            "size": 0
        }
    ]

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`

    {
        "src": "O1234", //Lokaler Dateiname
        "dst": "/test/path/O1234.nc"  //Cloud-Dateiname
    }

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`

    {
        "dst": "O1234", //Lokaler Dateiname
        "src": "/test/path/O1234.nc"  //Cloud-Dateiname
    }

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`

    [
        {
            "name": "O1234",
            "kind": 1, //1 ist Ordner, 2 ist Datei
            "time": "2019-08-29 20:13:14"
            "size": 0
        }
    ]

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`

    {
        "src": "/test/path/O1234", //Werkzeugmaschinen-Dateiname
        "dst": "O1234"  //**IoTBoX**-Dateiname
    }

C.1.3.9 Programm von IoTBoX zur Werkzeugmaschine herunterladen

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 POST
  • Anfragebeispiel`

    {
        "src": "O1234", //**IoTBoX**-Dateiname
        "dst": "/test/path/O1234.nc"  //Werkzeugmaschinen-Dateiname
    }

C.1.3.10 Werkzeugmaschinenprogramm löschen

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<br>path: Programmpfad
Method DELETE

C.1.4 Sicherung

C.1.4.1 Sicherung exportieren

Element Inhalt Hinweis
URL /system/backup
Method GET
  • Sicherungsdatei zurückgeben

C.1.4.2 Sicherung wiederherstellen

Element Inhalt Hinweis
URL /system/backup
Method POST
Body Dateiinhalt

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`

    [
        {
            "id": 1,
            "key": "test_key",
            "meta": {},
            "name": "Testschlüssel",
            "public": false,
            "type": "system",
            "value": "test"
        }
    ]

C.1.5.2 Konfiguration hinzufügen

Element Inhalt Hinweis
URL /manager/config
Method POST
  • Anfragebeispiel`

    {
        "key": "test_key",
        "meta": {},
        "name": "Testschlüssel",
        "public": false,
        "type": "system",
        "value": "test"
    }
  • Rückgabebeispiel`

    {
        "id": 1,
        "key": "test_key",
        "meta": {},
        "name": "Testschlüssel",
        "public": false,
        "type": "system",
        "value": "test"
    }

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`

    {
        "key": "test_key",
        "meta": {},
        "name": "Testschlüssel",
        "public": false,
        "type": "system",
        "value": "test"
    }

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`

    {
        "key": "test_key",
        "meta": {},
        "name": "Testschlüssel",
        "public": false,
        "type": "system",
        "value": "test"
    }

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`

    {
        "key": "test_key",
        "meta": {},
        "name": "Testschlüssel",
        "public": false,
        "type": "system",
        "value": "test"
    }
  • Rückgabebeispiel`

    {
        "id": 1,
        "key": "test_key",
        "meta": {},
        "name": "Testschlüssel",
        "public": false,
        "type": "system",
        "value": "test"
    }

C.1.5.6 Konfiguration löschen

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 DELETE

C.1.6 Debug

C.1.6.1 Debug-Befehl

Element Inhalt Hinweis
URL /system/cmd
Method PUT
  • Anfrageparameter`

    {
        "cmd": "ping", //Verfügbare Befehle: ping,getip,telnet,route,reboot,restart
        "parameter": "192.168.1.3", //Für ping ist der Parameter eine IP-Adresse oder ein Domainname; für telnet ist er host:port
        "interface": "192.168.1.3" //Für ping ist der Parameter die Netzwerkschnittstelle; darf leer sein
    }

C.1.6.2 Systemprotokoll

Element Inhalt Hinweis
URL /log/debug
Method WEBSOCKET

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`

    {
        "id": "8ea29081b4c78e7bfa539622eb0038c4"
    }

C.1.7.3 Cloud-Speicherinformationen abrufen

Element Inhalt Hinweis
URL /dnc_config
Method GET
  • Rückgabebeispiel`

    {
    
        "enable": true,
        "interval": 1,
        "type": "aws_s3",
        "secret_key": "SECRET_KEY", // Diese Konfiguration hängt von type ab
        "access_key": "ACCESS_KEY", // Diese Konfiguration hängt von type ab
        "api": "https:://minio.woody.vip/api" // Diese Konfiguration hängt von type ab
    }

C.1.7.4 Cloud-Speicherinformationen übermitteln

Element Inhalt Hinweis
URL /dnc_config
Method PUT
  • Anfragebeispiel`

    {
    
        "enable": true,
        "interval": 1,
        "type": "aws_s3",
        "secret_key": "SECRET_KEY", // Diese Konfiguration hängt von type ab
        "access_key": "ACCESS_KEY", // Diese Konfiguration hängt von type ab
        "api": "https:://minio.woody.vip/api" // Diese Konfiguration hängt von type ab
    }

C.1.8 IoTBoX-Lizenz

C.1.8.1 Lizenzinformationen abrufen

Element Inhalt Hinweis
URL /lisence
Method GET
Query type: temp ist temporäre Lizenz, andernfalls ist es formelle Lizenz
  • Rückgabebeispiel`

    {
        "count": {
            "fanuc": 3
        },
        "exp": 4100688000,
        "fingerprint": "8ea29081b4c78e7bfa539622eb0038c4",
        "vpn": true
    }

C.1.8.2 Lizenzinformationen übermitteln

Element Inhalt Hinweis
URL /lisence
Method PUT
Query type: temp ist temporäre Lizenz, andernfalls ist es formelle Lizenz
  • Anfragebeispiel`

    {
        "lisence": "xxxxx"
    }

C.1.9 Netzwerkinformationen

C.1.9.1 Schnittstelleninformationen abrufen

Element Inhalt Hinweis
URL /network/interface
Method GET
  • Rückgabebeispiel`

    [
        {
            "dhcp": 0,
            "gateway": "192.168.9.1",
            "id": 1,
            "ip": [
                "192.168.9.107/24"
            ],
            "name": "eth0",
            "password": "",
            "ssid": "",
            "type": 1
        }
    ]

C.1.9.2 Schnittstelleninformationen ändern

Element Inhalt Hinweis
URL /network/interface
Method PUT
  • Anfragebeispiel`

    [
        {
            "dhcp": 0,
            "gateway": "192.168.9.1",
            "id": 1,
            "ip": [
                "192.168.9.107/24"
            ],
            "name": "eth0",
            "password": "",
            "ssid": "",
            "type": 1
        }
    ]

C.1.9.3 Schnittstelle hinzufügen

Element Inhalt Hinweis
URL /network/interface
Method POST
  • Anfragebeispiel`

    {
        "dhcp": 0,
        "gateway": "192.168.9.1",
        "id": 1,
        "ip": [
            "192.168.9.107/24"
        ],
        "name": "eth0",
        "password": "",
        "ssid": "",
        "type": 1
    }

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`

    [
        "114.114.114.114",
        "8.8.8.8"
    ]

C.1.9.6 DNS-Informationen ändern

Element Inhalt Hinweis
URL /network/dns
Method PUT
  • Anfragebeispiel`

    [
        "114.114.114.114",
        "8.8.8.8"
    ]

C.1.9.7 4G-Konfiguration abrufen

Element Inhalt Hinweis
URL /network/4g
Method GET
  • Rückgabebeispiel`

    {
        "apn": "test_apn",
        "password": "pass",
        "pincode": "1234",
        "username": "testuser"
    }

C.1.9.8 4G-Konfiguration ändern

Element Inhalt Hinweis
URL /network/4g
Method PUT
  • Anfragebeispiel`

    {
        "apn": "test_apn",
        "password": "pass",
        "pincode": "1234",
        "username": "testuser"
    }

C.1.9.9 Router-Aktivierungsstatus abrufen

Element Inhalt Hinweis
URL /network/router
Method GET
  • Rückgabebeispiel`

    {
        "enable": true
    }

C.1.9.10 Aktivierungsstatus ändern

Element Inhalt Hinweis
URL /network/router
Method PUT
  • Anfragebeispiel`

    {
        "enable": true
    }

C.1.9.11 Routeninformationen abrufen

Element Inhalt Hinweis
URL /network/custom_route
Method GET
  • Rückgabebeispiel`

    [
        {
            "net": "192.168.3.1/24",
            "via": "192.168.9.1"
        }
    ]

C.1.9.12 Routeninformationen ändern

Element Inhalt Hinweis
URL /network/custom_route
Method PUT
  • Anfragebeispiel`

    [
        {
            "net": "192.168.3.1/24",
            "via": "192.168.9.1"
        }
    ]

C.1.9.13 Testnetzwerkinformationen abrufen

Element Inhalt Hinweis
URL /network/test_resource
Method GET
  • Rückgabebeispiel`

    {
        "host": "www.jd.com",
        "ip": "114.114.114.114"
    }

C.1.9.14 Testnetzwerkinformationen ändern

Element Inhalt Hinweis
URL /network/test_resource
Method PUT
  • Anfragebeispiel`

    {
        "host": "www.jd.com",
        "ip": "114.114.114.114"
    }

C.1.10 Portweiterleitung

C.1.10.1 Portweiterleitungsliste abrufen

Element Inhalt Hinweis
URL /proxy
Method GET
  • Rückgabebeispiel`

    [
        {
            "id": 1,
            "id_in_server": 24,
            "ip": "192.168.9.33",
            "name": "Bürocomputer",
            "port": 3389,
            "proxy_port": 9081,
            "type": ""
        }
    ]

C.1.10.2 Portweiterleitung hinzufügen

Element Inhalt Hinweis
URL /proxy
Method POST
  • Anfragebeispiel`

    {
        "name": "Bürocomputer",
        "ip": "192.168.9.33",
        "port": 3389
    }

C.1.10.3 Portweiterleitung abrufen

Element Inhalt Hinweis
URL /proxy/<id> id ist die Portweiterleitungs-ID
Method GET
  • Rückgabebeispiel`

    {
        "id": 1,
        "id_in_server": 24,
        "ip": "192.168.9.33",
        "name": "Bürocomputer",
        "port": 3389,
        "proxy_port": 9081,
        "type": ""
    }

C.1.10.4 Portweiterleitung ändern

Element Inhalt Hinweis
URL /proxy/<id> id ist die Portweiterleitungs-ID
Method PUT
  • Anfragebeispiel`

    {
        "name": "Bürocomputer",
        "ip": "192.168.9.33",
        "port": 3389
    }

C.1.10.5 Portweiterleitung löschen

Element Inhalt Hinweis
URL /proxy/<id> id ist die Portweiterleitungs-ID
Method DELETE

C.1.11 Push-Konfiguration

C.1.11.1 Push-Liste abrufen

Element Inhalt Hinweis
URL /publish
Method GET
  • Rückgabebeispiel`

    [
        {
            "config": {
                "host": "111",
                "port": 222,
                "publisher_ssl_enable": false,
                "publisher_ssl_version": "default",
                "version": "v2"
            },
            "enable": true,
            "enable_control": true,
            "enable_publish": true,
            "id": 1,
            "interval": 1,
            "name": "aaaa",
            "type": "mqtt_common"
        }
    ]

C.1.11.2 Push hinzufügen

Element Inhalt Hinweis
URL /publish
Method POST
  • Anfragebeispiel`

    {
        "type": "mqtt_common",
        "enable_publish": true,
        "enable_control": true,
        "offline_cache": false,
        "config": {
            "publisher_ssl_enable": false,
            "publisher_ssl_version": "default",
            "version": "v2",
            "host": "192.168.9.33",
            "port": 1883
        },
        "interval": 1,
        "offlineCache": true,
        "name": "aaaa"
    }

C.1.11.3 Push abrufen

Element Inhalt Hinweis
URL /publish/<id> id ist die Push-ID
Method GET
  • Rückgabebeispiel`

    {
        "config": {
            "host": "111",
            "port": 222,
            "publisher_ssl_enable": false,
            "publisher_ssl_version": "default",
            "version": "v2"
        },
        "enable": true,
        "enable_control": true,
        "enable_publish": true,
        "id": 1,
        "interval": 1,
        "name": "aaaa",
        "type": "mqtt_common"
    }

C.1.11.4 Push ändern

Element Inhalt Hinweis
URL /publish/<id> id ist die Push-ID
Method PUT
  • Anfragebeispiel`

    {
        "config": {
            "host": "111",
            "port": 222,
            "publisher_ssl_enable": false,
            "publisher_ssl_version": "default",
            "version": "v2"
        },
        "enable": true,
        "enable_control": true,
        "enable_publish": true,
        "id": 1,
        "interval": 1,
        "name": "aaaa",
        "type": "mqtt_common"
    }

C.1.11.5 Push löschen

Element Inhalt Hinweis
URL /publish/<id> id ist die Push-ID
Method DELETE

C.1.12 Benutzerdefinierte Push-Plattform

C.1.12.1 Push-Plattform-Liste abrufen

Element Inhalt Hinweis
URL /publish_type
Method GET
  • Rückgabebeispiel`

    [
        {
            "id": 1,
            "builtin": 0,
            "rank": 100,
            "schema": "xxxx", 
            "script": ",
            "name": "Allgemeines MQTT V2"
        }
    ]

C.1.12.2 Push-Plattform hinzufügen

Element Inhalt Hinweis
URL /publish_type
Method POST
  • Anfragebeispiel`

    {
        "builtin": 0,
        "rank": 100,
        "schema": "xxxx", 
        "script": ",
        "name": "Allgemeines MQTT V2"
    }

C.1.12.3 Push-Plattform abrufen

Element Inhalt Hinweis
URL /publish_type/<id> id ist die Push-Plattform-ID
Method GET
  • Rückgabebeispiel`

    {
        "id": 1,
        "builtin": 0,
        "rank": 100,
        "schema": "xxxx", 
        "script": ",
        "name": "Allgemeines MQTT V2"
    }

C.1.12.4 Push-Plattform ändern

Element Inhalt Hinweis
URL /publish_type/<id> id ist die Push-Plattform-ID
Method PUT
  • Anfragebeispiel`

    {
        "id": 1,
        "builtin": 0,
        "rank": 100,
        "schema": "xxxx", 
        "script": ",
        "name": "Allgemeines MQTT V2"
    }

C.1.12.5 Push-Plattform löschen

Element Inhalt Hinweis
URL /publish_type/<id> id ist die Push-Plattform-ID
Method DELETE

C.1.12.6 Push-Plattform testen

Element Inhalt Hinweis
URL /publish_type/<id>/test id ist die Push-ID
Method PUT

C.1.13 Systemaktualisierung

C.1.13.1 Aktualisierung prüfen

Element Inhalt Hinweis
URL /system/update
Method GET
  • Rückgabebeispiel`

    {
        "id": 1,
        "builtin": 0,
        "rank": 100,
        "schema": "xxxx", 
        "script": ",
        "name": "Allgemeines MQTT V2"
    }

C.1.13.2 Aktualisierung bestätigen

Element Inhalt Hinweis
URL /system/update
Method PUT
  • Anfragebeispiel`

    {
        "id": 1,
        "builtin": 0,
        "rank": 100,
        "schema": "xxxx", 
        "script": ",
        "name": "Allgemeines MQTT V2"
    }

C.1.13.3 Aktualisierungs-Firmware hochladen

Element Inhalt Hinweis
URL /system/update
Method POST

C.1.14 VPN-Konfiguration

C.1.14.1 VPN-Informationen abrufen

Element Inhalt Hinweis
URL /vpn
Method GET
  • Rückgabebeispiel`

    {
        "enable": true,
        "password": "woody",
        "type": 1,
        "username": "8ea29081b4c78e7bfa539622eb0038c4"
    }

C.1.14.2 VPN-Informationen ändern

Element Inhalt Hinweis
URL /vpn
Method PUT
  • Anfragebeispiel`

    {
        "enable": true,
        "password": "woody",
        "type": 1,
        "username": "8ea29081b4c78e7bfa539622eb0038c4"
    }