PLC-X Datix API Documentation

🔤 Abbreviations

  • wd = Write Device Data
  • rd = Read Device Data
  • rdl = Read User Device List
  • wc = Write Cloud Data
  • rc = Read Cloud Data (FOR + FROM Data)
  • rcfo = Read Cloud For Data only
  • cfo = Cloud Data For Device (Device is fetching)
  • cfr = Cloud Data From Device (Device is pushing)

📊 Variables

  • USER_KEY / uky = String (Unique user key)
  • READ-KEY / WRITE-KEY = String (Keys for reading/writing)
  • F1 .. Fn = Integer (Numeric values / registers)
  • FromDate = DateOnly (Format: YYYY-MM-DD)
  • Days = Integer (Number of days history)
  • json = String (JSON) (Data for/from device)

🌐 API Requests

Method Function URL Example
GET Read Device List
Retrieves the user's device list.
https://iot.plc-x.com/api/data/rdl?uk=USER-KEY
GET Read Device Data by Date
Returns device data based on the start date and the specified number of days.
https://plc-x.com
GET Read Cloud Data
Returns cloud data for the respective device. The response contains both "FOR" and "FROM" data fields.
https://iot.plc-x.com/api/data/rc?uk=USERKEY&rk=READ-KEY
GET Read Cloud FOR Data
Returns cloud data for the respective device. The response contains only "FOR" data. This is recommended to use for fetching data on smaller devices to save mermory.
https://iot.plc-x.com/api/data/rcfo?uk=USERKEY&rk=READ-KEY
GET Write Device Data
Writes data for a single device. Up to 8 fields (f1...f8) are supported. The write status will be returned in the response.
https://iot.plc-x.com/api/data/wd?uk=USER_KEY&wk=WRITE_KEY&f1=0
GET Write Cloud Data FOR Device
You application os server stores JSON data in this field for your desitation device to fetch
https://iot.plc-x.com/api/data/cfo?uk=USER-KEY&wk=WRITE-KEY&json=DATA-FOR-DEVICE
JSON Example for PLC-X IOT device
* Mode : 0 (off), 1 (on)
* Number : Available output port number
* State : 0 (off), 1 (on)
{
   "Mode": 1,
   "Message": "*Max_20_ASCII_chars_",
   "MessageDelay": 5,
   "SetPort": [
      {
         "number": 2,
         "state": 1
      },
      {
         "number": 15,
         "state": 1
      }
   ]
}
GET Write Data FROM Device
The device stores JSON data in this field for your application or server to fetch
https://iot.plc-x.com/api/data/cfr?uky=USER-KEY&wk=WRITE-KEY&json=DATA-FROM-DEVICE