ThingsPro Edge RESTful API Reference API Reference
Welcome to the ThingsPro Edge RESTful API reference. This is a live document of how you can use ThingsPro Edge APIs. The ThingsPro Edge API is organized around the REST methodology, and it uses resource-oriented URLs, and common HTTP response codes to indicate API errors.
API Endpoint
https://localhost/api/v1
Response Content-Types: application/json
Schemes: http, https
Version: 1.0.0
Paths
Schema Definitions
DeleteTemplateList: object
- list: object[]
-
object - template_name: string
- protocol_name: string
Example
{
"list": [
{
"template_name": "temp1",
"protocol_name": "EthernetIP"
}
]
}
TemplateList: object
- list: object[]
-
object - template_name: string
- tag_list: object[]
-
object - op: string
- polling_period_ms: integer
- request_timeout_ms: integer
- address: integer
- type: string
- id: string
- quantity: integer
Example
{
"list": [
{
"template_name": "temp1",
"protocol_name": "EthernetIP",
"tag_list": [
{
"op": "write",
"polling_period_ms": 100,
"request_timeout_ms": 10,
"address": 0,
"type": "uint16",
"id": "do0",
"quantity": 2
},
{
"op": "write",
"polling_period_ms": 100,
"request_timeout_ms": 10,
"address": 2,
"type": "uint16",
"id": "do1",
"quantity": 2
}
]
}
]
}
Template: object
- template_name: string
- tag_list: object[]
-
object - op: string
- polling_period_ms: integer
- request_timeout_ms: integer
- address: integer
- type: string
- id: string
- quantity: integer
Example
{
"template_name": "temp1",
"protocol_name": "EthernetIP",
"tag_list": [
{
"op": "write",
"polling_period_ms": 100,
"request_timeout_ms": 10,
"address": 0,
"type": "uint16",
"id": "do0",
"quantity": 2
},
{
"op": "write",
"polling_period_ms": 100,
"request_timeout_ms": 10,
"address": 2,
"type": "uint16",
"id": "do1",
"quantity": 2
}
]
}
Tag: object
- srcName: string
- tagName: string
- dataType: string uint8, uint16, uint32, uint64, int16, int32, int64, float32, float64, string, boolean, bytearray
- duration: integer (int32)
- dataUnit: string
- access: string ro, wo, rw
Example
{
"srcName": "string",
"tagName": "string",
"dataType": "string",
"duration": "integer (int32)",
"dataUnit": "string",
"access": "string"
}
TagList: object
- tag_list: object[]
-
object - srcName: string
- tagName: string
- dataType: string uint8, uint16, uint32, uint64, int16, int32, int64, float32, float64, string, boolean, bytearray
- duration: integer (int32)
- dataUnit: string
- access: string ro, wo, rw
Example
{
"tag_list": [
{
"srcName": "device0",
"tagName": "di0",
"dataType": "uint16",
"duration": 100,
"dataUnit": "",
"access": "ro"
},
{
"srcName": "device0",
"tagName": "di1",
"dataType": "uint16",
"duration": 100,
"dataUnit": "",
"access": "ro"
}
]
}
ModbusTag: object
- op: string
- polling_period_ms: integer
- request_timeout_ms: integer
- address: integer
- type: string
- id: string
- quantity: integer
Example
{
"op": "string",
"polling_period_ms": "integer",
"request_timeout_ms": "integer",
"address": "integer",
"type": "string",
"id": "string",
"quantity": "integer"
}
Device: object
- name: string
- interface: string
- template_name: string
Example
{
"name": "adapter_device0",
"interface": "eth0",
"template_name": "temp4",
"total_tags": 20,
"success_tags": 16,
"t_to_o_packet_rate": 100,
"o_to_t_data_size": 496,
"connection_type": 0,
"o_to_t_real_time_format": 1,
"o_to_t_instance": 100,
"encapsulation_timeout": 0,
"configuration_instance": 1,
"adapter_port": 44818,
"t_to_o_data_size": 496,
"adapter_ip": "10.144.33.155",
"t_to_o_real_time_format": 0,
"o_to_t_packet_rate": 100,
"timeout_multiplier": 2,
"t_to_o_instance": 200
}
DeviceList: object
- device_list: object[]
-
object - name: string
- interface: string
- template_name: string
Example
{
"device_list": [
{
"name": "adapter_device0",
"interface": "eth0",
"template_name": "temp4",
"total_tags": 20,
"success_tags": 16,
"t_to_o_packet_rate": 100,
"o_to_t_data_size": 496,
"connection_type": 0,
"o_to_t_real_time_format": 1,
"o_to_t_instance": 100,
"encapsulation_timeout": 0,
"configuration_instance": 1,
"adapter_port": 44818,
"t_to_o_data_size": 496,
"adapter_ip": "10.144.33.155",
"t_to_o_real_time_format": 0,
"o_to_t_packet_rate": 100,
"timeout_multiplier": 2,
"t_to_o_instance": 200
}
]
}