Domotz Public API v0.6.0
+Domotz Public API v1.0.0-dev
- -Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
The Domotz Public API.
- -Get your API Key and Base URL from the Domotz Portal or contact us.
+The Domotz Public API
+Use the "API Key Endpoint" which you can retrieve from the Domotz Portal as the Base URL for your API calls.
The Domotz Public API uses standard HTTP response codes, authentication, and verbs. JSON format is used in responses and accepted for request bodies. All date-time formats are expressed as yyyy-mm-ddThh:mm:ss. Date-time must be expressed in UTC. Specification of different TimeZones are not allowed.
+Domotz Webhook
+It is possible to subscribe to events happening on the Domotz platform, both at an Agent level and Device level, through the usage of Webhooks.
-Base URLs:
- - +Please refer to the user-guide on the usage of the Webhook as a possible contact channel to receive notification of events and how to create a Shared Alert Profile. Moreover, refer to getAlertProfiles, bindAlertProfileToAgent and bindAlertProfileToDevice on how to retrieve the list of Shared Alert Profiles and bind to Agents and Devices respectively. In those same sections you also have the list of all the possible Webhook events and references to the Schemas.
Terms of service -Email: API Support
+API Support
Authentication
- API Key (api_key)
@@ -523,7 +666,7 @@
listAgents
-Code samples
curl -X GET your-domotz-api-endpoint/public-api/v1/agent \ +
-curl -X GET http://172.17.0.1:9080/public-api/v1/agent \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -534,7 +677,7 @@listAgents
}; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent', + url: 'http://172.17.0.1:9080/public-api/v1/agent', method: 'get', headers: headers, @@ -551,7 +694,7 @@listAgents
}; -fetch('your-domotz-api-endpoint/public-api/v1/agent', +fetch('http://172.17.0.1:9080/public-api/v1/agent', { method: 'GET', @@ -569,7 +712,7 @@listAgents
'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/agent', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent', params={ }, headers = headers) @@ -583,7 +726,7 @@listAgents
'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/agent', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent', params: { }, headers: headers @@ -605,7 +748,7 @@listAgents
} data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/agent", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent", data) req.Header = headers client := &http.Client{} @@ -622,7 +765,7 @@Curl
func main() { headers := map[string][]string{ - "Accept": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}", data) + req, err := http.NewRequest("DELETE", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}", data) req.Header = headers client := &http.Client{} @@ -1211,23 +1370,22 @@-curl -X GET your-domotz-api-endpoint/public-api/v1/agent \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -646,14 +789,14 @@Parameters
query integer(int32) false -The maximum number of items to return +The maximum number of items to return. Min value is 1. Max value is 100. Default value is 10 page_number query integer(int32) false -The requested page number, 0-indexed +The requested page number, 0-indexed. Default value is 0 display_name @@ -685,18 +828,22 @@Parameters
}, "status": "OWNED" }, - "creation_time": "2019-06-11T09:08:10Z", + "creation_time": "2019-08-24T14:15:22Z", "display_name": "string", "id": 0, "licence": { - "activation_time": "2019-06-11T09:08:10Z", + "activation_time": "2019-08-24T14:15:22Z", "bound_mac_address": "string", "code": "string", - "expiration_time": "2019-06-11T09:08:10Z", + "expiration_time": "2019-08-24T14:15:22Z", "id": 0 }, + "location": { + "latitude": "string", + "longitude": "string" + }, "status": { - "last_change": "2019-06-11T09:08:10Z", + "last_change": "2019-08-24T14:15:22Z", "value": "ONLINE" }, "team": { @@ -836,6 +983,24 @@Response Schema
none + +» location +object +false +none ++ +»» latitude +string +false +none ++ +»» longitude +string +false +none + -» status object false @@ -952,7 +1117,7 @@countAgents
-Code samples
curl -X HEAD your-domotz-api-endpoint/public-api/v1/agent \ +curl -X HEAD http://172.17.0.1:9080/public-api/v1/agent \ -H 'X-Api-Key: API_KEY'var headers = { @@ -961,7 +1126,7 @@countAgents
}; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent', + url: 'http://172.17.0.1:9080/public-api/v1/agent', method: 'head', headers: headers, @@ -977,7 +1142,7 @@countAgents
}; -fetch('your-domotz-api-endpoint/public-api/v1/agent', +fetch('http://172.17.0.1:9080/public-api/v1/agent', { method: 'HEAD', @@ -994,7 +1159,7 @@countAgents
'X-Api-Key': 'API_KEY' } -r = requests.head('your-domotz-api-endpoint/public-api/v1/agent', params={ +r = requests.head('http://172.17.0.1:9080/public-api/v1/agent', params={ }, headers = headers) @@ -1007,7 +1172,7 @@countAgents
'X-Api-Key' => 'API_KEY' } -result = RestClient.head 'your-domotz-api-endpoint/public-api/v1/agent', +result = RestClient.head 'http://172.17.0.1:9080/public-api/v1/agent', params: { }, headers: headers @@ -1028,7 +1193,7 @@countAgents
} data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("HEAD", "your-domotz-api-endpoint/public-api/v1/agent", data) + req, err := http.NewRequest("HEAD", "http://172.17.0.1:9080/public-api/v1/agent", data) req.Header = headers client := &http.Client{} @@ -1045,7 +1210,7 @@Curl
-curl -X HEAD your-domotz-api-endpoint/public-api/v1/agent \ +curl -X HEAD http://172.17.0.1:9080/public-api/v1/agent \ -H 'X-Api-Key: API_KEY' @@ -1114,25 +1279,23 @@Response Headers
The number of agents matching the filtering criteria getAgent
- +deleteAgent
+
-Code samples
curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id} \ - -H 'Accept: application/json' \ +curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id} \ -H 'X-Api-Key: API_KEY'var headers = { - 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}', - method: 'get', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}', + method: 'delete', headers: headers, success: function(data) { @@ -1143,14 +1306,13 @@getAgent
const fetch = require('node-fetch'); const headers = { - 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}', { - method: 'GET', + method: 'DELETE', headers: headers }) @@ -1162,11 +1324,10 @@getAgent
import requests headers = { - 'Accept': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}', params={ +r = requests.delete('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}', params={ }, headers = headers) @@ -1176,11 +1337,10 @@getAgent
require 'json' headers = { - 'Accept' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}', +result = RestClient.delete 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}', params: { }, headers: headers @@ -1196,13 +1356,12 @@getAgent
getAgent
}
+GET /agent/{agent_id}
-DELETE /agent/{agent_id}Returns the details of an agent
+Deletes an agent
Curl
--curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id} \ - -H 'Accept: application/json' \ +curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id} \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
-@@ -1247,54 +1405,7 @@ Parameters
-
-Example responses
- -200 Response
-
-{ - "access_right": { - "api_enabled": true, - "granting_user": { - "name": "user@example.com" - }, - "status": "OWNED" - }, - "creation_time": "2019-06-11T09:08:10Z", - "display_name": "string", - "id": 0, - "licence": { - "activation_time": "2019-06-11T09:08:10Z", - "bound_mac_address": "string", - "code": "string", - "expiration_time": "2019-06-11T09:08:10Z", - "id": 0 - }, - "status": { - "last_change": "2019-06-11T09:08:10Z", - "value": "ONLINE" - }, - "team": { - "area": { - "id": 0 - }, - "id": 0, - "leader_id": 0, - "name": "string" - }, - "timezone": "string", - "version": { - "agent": "string", - "package": "string" - }, - "listen_on": "string", - "location": { - "latitude": "string", - "longitude": "string" - } -} -Responses
+Responses
- -@@ -1305,31 +1416,31 @@ Responses
- 200 -OK -The agent -AgentDetail +204 +No Content +none +None device
-deleteDownDevices
- +getAgent
+
-Code samples
curl -X DELETE your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id} \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'var headers = { + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device', - method: 'delete', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}', + method: 'get', headers: headers, success: function(data) { @@ -1340,13 +1451,14 @@deleteDownDevices
const fetch = require('node-fetch'); const headers = { + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}', { - method: 'DELETE', + method: 'GET', headers: headers }) @@ -1358,10 +1470,11 @@deleteDownDevices
-import requests headers = { + 'Accept': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.delete('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}', params={ }, headers = headers) @@ -1371,10 +1484,11 @@deleteDownDevices
require 'json' headers = { + 'Accept' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.delete 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}', params: { }, headers: headers @@ -1390,12 +1504,13 @@deleteDownDevices
func main() { headers := map[string][]string{ + "Accept": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("DELETE", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}", data) req.Header = headers client := &http.Client{} @@ -1404,22 +1519,23 @@deleteDownDevices
}
+DELETE /agent/{agent_id}/device
-GET /agent/{agent_id}Deletes all the DOWN devices of IP protocol
+Returns the details of an agent
Curl
--curl -X DELETE your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id} \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
-@@ -1439,41 +1555,88 @@ Parameters
Responses
- --
-- - -Status -Meaning -Description -Schema -- -204 -No Content -none -None -listDevices
- --
-Code samples
-curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device \ - -H 'Accept: application/json' \ - -H 'X-Api-Key: API_KEY' - -var headers = { - 'Accept':'application/json', - 'X-Api-Key':'API_KEY' - -}; +Example responses
-$.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device', +200 Response
+ +
+{ + "access_right": { + "api_enabled": true, + "granting_user": { + "name": "user@example.com" + }, + "status": "OWNED" + }, + "creation_time": "2019-08-24T14:15:22Z", + "display_name": "string", + "id": 0, + "licence": { + "activation_time": "2019-08-24T14:15:22Z", + "bound_mac_address": "string", + "code": "string", + "expiration_time": "2019-08-24T14:15:22Z", + "id": 0 + }, + "location": { + "latitude": "string", + "longitude": "string" + }, + "status": { + "last_change": "2019-08-24T14:15:22Z", + "value": "ONLINE" + }, + "team": { + "area": { + "id": 0 + }, + "id": 0, + "leader_id": 0, + "name": "string" + }, + "timezone": "string", + "version": { + "agent": "string", + "package": "string" + }, + "listen_on": "string" +} +Responses
+ ++
++ + +Status +Meaning +Description +Schema ++ +200 +OK +The agent +AgentDetail +getConnectionConsumption
+ + ++
+Code samples
+curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/consumption \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +
-var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/consumption', method: 'get', headers: headers, @@ -1490,7 +1653,7 @@listDevices
}; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/consumption', { method: 'GET', @@ -1508,7 +1671,7 @@listDevices
'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/consumption', params={ }, headers = headers) @@ -1522,7 +1685,7 @@listDevices
'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/consumption', params: { }, headers: headers @@ -1544,7 +1707,7 @@listDevices
} data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/consumption", data) req.Header = headers client := &http.Client{} @@ -1553,15 +1716,15 @@listDevices
}
+GET /agent/{agent_id}/device
-GET /agent/{agent_id}/connection/consumptionReturns all the devices of an agent
+Get the connection consumption on the given agent
Curl
--curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/consumption \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -1569,7 +1732,7 @@Curl
Parameters
+Parameters
@@ -1587,13 +1750,6 @@ -Parameters
true Agent ID - show_hidden -query -boolean -false -Whether to include hidden devices in the returned list -@@ -1601,35 +1757,12 @@
-Parameters
200 Response
-[ - { - "authentication_status": "AUTHENTICATED", - "details": { - "room": "string", - "snmp_read_community": "string", - "snmp_write_community": "string", - "zone": "string" - }, - "display_name": "string", - "first_seen_on": "2019-06-11T09:08:10Z", - "id": 0, - "importance": "VITAL", - "main_id": 0, - "protocol": "IP", - "type": { - "detected_id": 0, - "id": 0 - }, - "user_data": { - "model": "string", - "name": "string", - "type": 0, - "vendor": "string" - } - } -] +
-{ + "current": 0, + "limit": 0 +}Responses
+Responses
- -@@ -1642,93 +1775,29 @@ Responses
-200 OK -The list of all devices in the Agent's monitored networks -Inline -Response Schema
-Enumerated Values
--
-- - -Property -Value -- -authentication_status -AUTHENTICATED -- -authentication_status -NO_AUTHENTICATION -- -authentication_status -PENDING -- -authentication_status -REQUIRED -- -authentication_status -WRONG_CREDENTIALS -- -importance -VITAL -- -importance -FLOATING -- -protocol -IP -- -protocol -DUMMY -- -protocol -IP_EXTERNAL -- -status -ONLINE -- -status -OFFLINE -- -status -DOWN -- status -HIDDEN +none +ConnectionConsumption deleteDevice
- +getAgentVPNActiveConnections
+
-Code samples
func main() { headers := map[string][]string{ + "Accept": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("DELETE", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session", data) req.Header = headers client := &http.Client{} @@ -1803,22 +1876,23 @@curl -X DELETE your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id} \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'var headers = { + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}', - method: 'delete', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session', + method: 'get', headers: headers, success: function(data) { @@ -1739,13 +1808,14 @@deleteDevice
const fetch = require('node-fetch'); const headers = { + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session', { - method: 'DELETE', + method: 'GET', headers: headers }) @@ -1757,10 +1827,11 @@deleteDevice
import requests headers = { + 'Accept': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.delete('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session', params={ }, headers = headers) @@ -1770,10 +1841,11 @@deleteDevice
require 'json' headers = { + 'Accept' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.delete 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session', params: { }, headers: headers @@ -1789,12 +1861,13 @@deleteDevice
deleteDevice
}
+DELETE /agent/{agent_id}/device/{device_id}
-GET /agent/{agent_id}/connection/vpn-sessionDeletes a device, whether ONLINE, OFFLINE or DOWN . If a device is deleted while online, it may reappear when rediscovered automatically
+Get the Active VPN connections for the
agentCurl
--curl -X DELETE your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id} \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
-@@ -1836,16 +1910,25 @@ -Parameters
true Agent ID - device_id -path -integer(int32) -true -Device ID -Responses
++
+Example responses
+ +200 Response
+
+[ + { + "bytes": 0, + "creation_time": "2019-08-24T14:15:22Z", + "expiration_time": "2019-08-24T14:15:22Z", + "id": 0, + "name": "string", + "status": "ACTIVE" + } +] +Responses
-@@ -1856,52 +1939,136 @@ Responses
- 204 -No Content -none -None +200 +OK +Agent VPN Connection information +Inline getDevice
- - --
-Code samples
-curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id} \ - -H 'Accept: application/json' \ - -H 'X-Api-Key: API_KEY' - -var headers = { - 'Accept':'application/json', - 'X-Api-Key':'API_KEY' - -}; - -$.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}', - method: 'get', - - headers: headers, - success: function(data) { - console.log(JSON.stringify(data)); - } -}) - -const fetch = require('node-fetch'); - -const headers = { - 'Accept':'application/json', - 'X-Api-Key':'API_KEY' -}; +Response Schema
-fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}', -{ - method: 'GET', +Status Code 200
- headers: headers -}) ++
++ + +Name +Type +Required +Description ++ +anonymous +[AgentVPNActiveConnection] +false +none ++ +» bytes +integer(int32) +true +Current VPN connection consumption (bytes) ++ +» creation_time +string(date-time) +true +none ++ +» expiration_time +string(date-time) +true +none ++ +» id +integer(int32) +true +The ID of the VPN connection ++ +» name +string +true +The user that started the VPN connection ++ +» status +string +true +The status of the vpn connection +Enumerated Values
++
+ ++ + +Property +Value ++ +status +ACTIVE ++ +status +INACTIVE ++ +status +EXPIRED +actions
+createAgentVPNConnection
+ + ++
+Code samples
+curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session \ + -H 'Content-Type: application/json' \ + -H 'Accept: text/plain' \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'Content-Type':'application/json', + 'Accept':'text/plain', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session', + method: 'post', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); +const inputBody = '{ + "allowed_ip": "string", + "routing_policy": "global" +}'; +const headers = { + 'Content-Type':'application/json', + 'Accept':'text/plain', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session', +{ + method: 'POST', + body: inputBody, + headers: headers +}) .then(function(res) { return res.json(); }).then(function(body) { @@ -1910,11 +2077,12 @@getDevice
-import requests headers = { - 'Accept': 'application/json', + 'Content-Type': 'application/json', + 'Accept': 'text/plain', 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}', params={ +r = requests.post('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session', params={ }, headers = headers) @@ -1924,11 +2092,12 @@getDevice
require 'json' headers = { - 'Accept' => 'application/json', + 'Content-Type' => 'application/json', + 'Accept' => 'text/plain', 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}', +result = RestClient.post 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session', params: { }, headers: headers @@ -1944,13 +2113,14 @@getDevice
func main() { headers := map[string][]string{ - "Accept": []string{"application/json"}, + "Content-Type": []string{"application/json"}, + "Accept": []string{"text/plain"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}", data) + req, err := http.NewRequest("POST", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session", data) req.Header = headers client := &http.Client{} @@ -1959,23 +2129,32 @@getDevice
}
+GET /agent/{agent_id}/device/{device_id}
-POST /agent/{agent_id}/connection/vpn-sessionReturns the details of a device
+Creates a temporary VPN server on the
+agentand returns the vpn configuration file content. Current consumption and consumption limits can be retrieved with a call to getConnectionConsumption endpoint+
+Body parameter
+{ + "allowed_ip": "string", + "routing_policy": "global" +} +Curl
--curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id} \ - -H 'Accept: application/json' \ +curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session \ + -H 'Content-Type: application/json' \ + -H 'Accept: text/plain' \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
@@ -1994,46 +2173,21 @@ Parameters
Agent ID - device_id -path -integer(int32) +body +body +AgentVPNConnection true -Device ID +none
-Example responses
-200 Response
+201 Response
-{ - "authentication_status": "AUTHENTICATED", - "details": { - "room": "string", - "snmp_read_community": "string", - "snmp_write_community": "string", - "zone": "string" - }, - "display_name": "string", - "first_seen_on": "2019-06-11T09:08:10Z", - "id": 0, - "importance": "VITAL", - "main_id": 0, - "protocol": "IP", - "type": { - "detected_id": 0, - "id": 0 - }, - "user_data": { - "model": "string", - "name": "string", - "type": 0, - "vendor": "string" - } -} -Responses
+ +Responses
- -@@ -2044,97 +2198,29 @@ Responses
- -200 -OK -An object containing the device details -Inline -Response Schema
-Enumerated Values
--
-- - -Property -Value -- -authentication_status -AUTHENTICATED -- -authentication_status -NO_AUTHENTICATION -- -authentication_status -PENDING -- -authentication_status -REQUIRED -- -authentication_status -WRONG_CREDENTIALS -- -importance -VITAL -- -importance -FLOATING -- -protocol -IP -- -protocol -DUMMY -- -protocol -IP_EXTERNAL -- -status -ONLINE -- -status -OFFLINE -- -status -DOWN -- status -HIDDEN +201 +Created +OpenVPN Configuration file content +string getDevicePowerActions
- +deleteAgentVPNConnection
+
-Code samples
curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power \ - -H 'Accept: application/json' \ +curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session/{vpn_session_id} \ -H 'X-Api-Key: API_KEY'var headers = { - 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power', - method: 'get', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session/{vpn_session_id}', + method: 'delete', headers: headers, success: function(data) { @@ -2145,14 +2231,13 @@getDevicePowerActions
const fetch = require('node-fetch'); const headers = { - 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session/{vpn_session_id}', { - method: 'GET', + method: 'DELETE', headers: headers }) @@ -2164,11 +2249,10 @@getDevicePowerActions
-import requests headers = { - 'Accept': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power', params={ +r = requests.delete('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session/{vpn_session_id}', params={ }, headers = headers) @@ -2178,11 +2262,10 @@getDevicePowerActions
require 'json' headers = { - 'Accept' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power', +result = RestClient.delete 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session/{vpn_session_id}', params: { }, headers: headers @@ -2198,13 +2281,12 @@getDevicePowerActions
func main() { headers := map[string][]string{ - "Accept": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power", data) + req, err := http.NewRequest("DELETE", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session/{vpn_session_id}", data) req.Header = headers client := &http.Client{} @@ -2213,23 +2295,22 @@getDevicePowerActions
}
+GET /agent/{agent_id}/device/{device_id}/action/power
-DELETE /agent/{agent_id}/connection/vpn-session/{vpn_session_id}Returns the power management actions available on the device at the current moment. See DevicePowerAction schema for further details.
+Closes an active VPN connection session for the
agentCurl
--curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power \ - -H 'Accept: application/json' \ +curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session/{vpn_session_id} \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
-@@ -2248,27 +2329,15 @@ Parameters
Agent ID - device_id +session_id path integer(int32) true -Device ID +Session ID -
-Example responses
- -200 Response
-
-{ - "cycle": true, - "off": true, - "on": true, - "software_reboot": true -} -Responses
+Responses
-@@ -2279,28 +2348,32 @@ Responses
- 200 -OK -Returns a JSON object indicating the current availability of each power action on the device -DevicePowerAction +204 +No Content +none +None powerActionOnDevice
- +connectToDevice
+
-Code samples
curl -X POST your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field} \ +curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/connection \ + -H 'Content-Type: application/json' \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'var headers = { + 'Content-Type':'application/json', + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field}', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/connection', method: 'post', headers: headers, @@ -2310,16 +2383,22 @@powerActionOnDevice
})const fetch = require('node-fetch'); - +const inputBody = '{ + "allowed_ip": "string", + "port": 0, + "protocol": "http" +}'; const headers = { + 'Content-Type':'application/json', + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field}', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/connection', { method: 'POST', - + body: inputBody, headers: headers }) .then(function(res) { @@ -2330,10 +2409,12 @@powerActionOnDevice
-import requests headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.post('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field}', params={ +r = requests.post('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/connection', params={ }, headers = headers) @@ -2343,10 +2424,12 @@powerActionOnDevice
require 'json' headers = { + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.post 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field}', +result = RestClient.post 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/connection', params: { }, headers: headers @@ -2362,12 +2445,14 @@powerActionOnDevice
func main() { headers := map[string][]string{ + "Content-Type": []string{"application/json"}, + "Accept": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("POST", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field}", data) + req, err := http.NewRequest("POST", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/connection", data) req.Header = headers client := &http.Client{} @@ -2376,22 +2461,33 @@powerActionOnDevice
}
+POST /agent/{agent_id}/device/{device_id}/action/power/{field}
-POST /agent/{agent_id}/device/{device_id}/connectionPerforms the action on the device, according to the specified { field } value. The availability of such operations can be determined with a call to getDevicePowerActions operation
+Establishes a direct secure connection to the
+deviceCurrent consumption and consumption limits can be retrieved with a call to getConnectionConsumption endpoint+
+Body parameter
+{ + "allowed_ip": "string", + "port": 0, + "protocol": "http" +} +Curl
--curl -X POST your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field} \ +curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/connection \ + -H 'Content-Type: application/json' \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
-@@ -2417,39 +2513,29 @@ Parameters
Device ID - -field -path -string +body +body +DeviceConnection true -Specifies the power action to perform -Enumerated Values
--
-- - -Parameter -Value -- -field -on -- -field -off -- -field -software-reboot -- field -cycle +none Responses
++
+Example responses
+ +201 Response
+
+{ + "allowed_ip": "string", + "expiration": "2019-08-24T14:15:22Z", + "id": 0, + "link": "string", + "port": 0, + "protocol": "http" +} +Responses
-@@ -2460,31 +2546,31 @@ Responses
- 204 -No Content +201 +Created none -None +ConnectionSession setCredentials
- + +device
+deleteDownDevices
+
-Code samples
curl -X PUT your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/credentials \ - -H 'Content-Type: application/json' \ +curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device \ -H 'X-Api-Key: API_KEY'var headers = { - 'Content-Type':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/credentials', - method: 'put', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device', + method: 'delete', headers: headers, success: function(data) { @@ -2493,20 +2579,16 @@setCredentials
})const fetch = require('node-fetch'); -const inputBody = '{ - "password": "string", - "username": "string" -}'; + const headers = { - 'Content-Type':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/credentials', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device', { - method: 'PUT', - body: inputBody, + method: 'DELETE', + headers: headers }) .then(function(res) { @@ -2517,11 +2599,10 @@setCredentials
-import requests headers = { - 'Content-Type': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.put('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/credentials', params={ +r = requests.delete('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device', params={ }, headers = headers) @@ -2531,11 +2612,10 @@setCredentials
require 'json' headers = { - 'Content-Type' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.put 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/credentials', +result = RestClient.delete 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device', params: { }, headers: headers @@ -2551,13 +2631,12 @@setCredentials
func main() { headers := map[string][]string{ - "Content-Type": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("PUT", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/credentials", data) + req, err := http.NewRequest("DELETE", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device", data) req.Header = headers client := &http.Client{} @@ -2566,31 +2645,22 @@setCredentials
}
+PUT /agent/{agent_id}/device/{device_id}/credentials
-DELETE /agent/{agent_id}/deviceSets the device credentials to perform extended discovery. This operation will affect the authentication_status of the device
+Deletes all the DOWN devices of IP protocol
--
-Body parameter
-{ - "password": "string", - "username": "string" -} -Curl
--curl -X PUT your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/credentials \ - -H 'Content-Type: application/json' \ +curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
-@@ -2608,23 +2678,9 @@ -Parameters
true Agent ID - -device_id -path -integer(int32) -true -Device ID -- body -body -DeviceCredentials -true -device credentials payload -Responses
+Responses
-@@ -2641,25 +2697,25 @@ Responses
None setSnmpCommunity
- +listDevices
+
-Code samples
curl -X PUT your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community \ - -H 'Content-Type: application/json' \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'var headers = { - 'Content-Type':'application/json', + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community', - method: 'put', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device', + method: 'get', headers: headers, success: function(data) { @@ -2668,20 +2724,17 @@setSnmpCommunity
})const fetch = require('node-fetch'); -const inputBody = '{ - "read": "string", - "write": "string" -}'; + const headers = { - 'Content-Type':'application/json', + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device', { - method: 'PUT', - body: inputBody, + method: 'GET', + headers: headers }) .then(function(res) { @@ -2692,11 +2745,11 @@setSnmpCommunity
-import requests headers = { - 'Content-Type': 'application/json', + 'Accept': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.put('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device', params={ }, headers = headers) @@ -2706,11 +2759,11 @@setSnmpCommunity
require 'json' headers = { - 'Content-Type' => 'application/json', + 'Accept' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.put 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device', params: { }, headers: headers @@ -2726,13 +2779,13 @@setSnmpCommunity
func main() { headers := map[string][]string{ - "Content-Type": []string{"application/json"}, + "Accept": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("PUT", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device", data) req.Header = headers client := &http.Client{} @@ -2741,31 +2794,23 @@setSnmpCommunity
}
+PUT /agent/{agent_id}/device/{device_id}/snmp-community
-GET /agent/{agent_id}/deviceSaves a snmp community (read, optionally write) on device
+Returns all the devices of an agent
--
-Body parameter
-{ - "read": "string", - "write": "string" -} -Curl
--curl -X PUT your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community \ - -H 'Content-Type: application/json' \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
-@@ -2784,22 +2829,48 @@ Parameters
Agent ID - -device_id -path -integer(int32) -true -Device ID -- body -body -DeviceSnmpCommunity -true -The value that the snmp community entries will change to +show_hidden +query +boolean +false +Whether to include hidden devices in the returned list Responses
++
+Example responses
+ +200 Response
+
+[ + { + "authentication_status": "AUTHENTICATED", + "details": { + "room": "string", + "snmp_read_community": "string", + "snmp_write_community": "string", + "zone": "string" + }, + "display_name": "string", + "first_seen_on": "2019-08-24T14:15:22Z", + "id": 0, + "importance": "VITAL", + "main_id": 0, + "protocol": "IP", + "type": { + "detected_id": 0, + "id": 0 + }, + "user_data": { + "model": "string", + "name": "string", + "type": 0, + "vendor": "string" + } + } +] +Responses
-@@ -2810,19 +2881,85 @@ Responses
- -204 -No Content -none -None -hideDevice
- +200 +OK +The list of all devices in the Agent's monitored networks +Inline + + + +Response Schema
+Enumerated Values
++
++ + +Property +Value ++ +authentication_status +AUTHENTICATED ++ +authentication_status +NO_AUTHENTICATION ++ +authentication_status +PENDING ++ +authentication_status +REQUIRED ++ +authentication_status +WRONG_CREDENTIALS ++ +importance +VITAL ++ +importance +FLOATING ++ +protocol +IP ++ +protocol +DUMMY ++ +protocol +IP_EXTERNAL ++ +status +ONLINE ++ +status +OFFLINE ++ +status +DOWN ++ +status +HIDDEN +deleteDevice
+
-Code samples
curl -X DELETE your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/visibility \ +curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id} \ -H 'X-Api-Key: API_KEY'
-var headers = { @@ -2831,7 +2968,7 @@hideDevice
}; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/visibility', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}', method: 'delete', headers: headers, @@ -2847,7 +2984,7 @@hideDevice
}; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/visibility', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}', { method: 'DELETE', @@ -2864,7 +3001,7 @@hideDevice
'X-Api-Key': 'API_KEY' } -r = requests.delete('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/visibility', params={ +r = requests.delete('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}', params={ }, headers = headers) @@ -2877,7 +3014,7 @@hideDevice
'X-Api-Key' => 'API_KEY' } -result = RestClient.delete 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/visibility', +result = RestClient.delete 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}', params: { }, headers: headers @@ -2898,7 +3035,7 @@hideDevice
} data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("DELETE", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/visibility", data) + req, err := http.NewRequest("DELETE", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}", data) req.Header = headers client := &http.Client{} @@ -2907,22 +3044,22 @@hideDevice
}
+DELETE /agent/{agent_id}/device/{device_id}/visibility
-DELETE /agent/{agent_id}/device/{device_id}Hides a device (available only on DOWN devices)
+Deletes a device, whether ONLINE, OFFLINE or DOWN . If a device is deleted while online, it may reappear when rediscovered automatically
Curl
--curl -X DELETE your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/visibility \ +curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id} \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
-@@ -2949,7 +3086,7 @@ Parameters
Responses
+Responses
-@@ -2966,25 +3103,25 @@ Responses
None editDevice
- +getDevice
+
-Code samples
curl -X PUT your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/{field} \ - -H 'Content-Type: application/json' \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id} \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'var headers = { - 'Content-Type':'application/json', + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/{field}', - method: 'put', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}', + method: 'get', headers: headers, success: function(data) { @@ -2993,17 +3130,17 @@editDevice
})const fetch = require('node-fetch'); -const inputBody = 'string'; + const headers = { - 'Content-Type':'application/json', + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/{field}', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}', { - method: 'PUT', - body: inputBody, + method: 'GET', + headers: headers }) .then(function(res) { @@ -3014,11 +3151,11 @@editDevice
-import requests headers = { - 'Content-Type': 'application/json', + 'Accept': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.put('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/{field}', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}', params={ }, headers = headers) @@ -3028,11 +3165,11 @@editDevice
require 'json' headers = { - 'Content-Type' => 'application/json', + 'Accept' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.put 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/{field}', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}', params: { }, headers: headers @@ -3048,13 +3185,13 @@editDevice
func main() { headers := map[string][]string{ - "Content-Type": []string{"application/json"}, + "Accept": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("PUT", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/{field}", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}", data) req.Header = headers client := &http.Client{} @@ -3063,28 +3200,23 @@editDevice
}
+PUT /agent/{agent_id}/device/{device_id}/{field}
-GET /agent/{agent_id}/device/{device_id}Changes a field of the device or one of its details
+Returns the details of a device
--
-Body parameter
-"string" -Curl
--curl -X PUT your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/{field} \ - -H 'Content-Type: application/json' \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id} \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
+ +@@ -3109,84 +3241,129 @@ +Parameters
true Device ID +
+Example responses
+ +200 Response
+
+{ + "authentication_status": "AUTHENTICATED", + "details": { + "room": "string", + "snmp_read_community": "string", + "snmp_write_community": "string", + "zone": "string" + }, + "display_name": "string", + "first_seen_on": "2019-08-24T14:15:22Z", + "id": 0, + "importance": "VITAL", + "main_id": 0, + "protocol": "IP", + "type": { + "detected_id": 0, + "id": 0 + }, + "user_data": { + "model": "string", + "name": "string", + "type": 0, + "vendor": "string" + } +} +Responses
+ +
-- +field -path -string -true -The field to update - for the type and valid values see the description of the corresponding output parameter +Status +Meaning +Description +Schema - body -body -string -true -The value that the field will change to +200 +OK +An object containing the device details +Inline Enumerated Values
+ +Response Schema
+Enumerated Values
- -- Parameter +Property Value - field -user_data/vendor +authentication_status +AUTHENTICATED - +field -details/zone +authentication_status +NO_AUTHENTICATION ++ +authentication_status +PENDING ++ +authentication_status +REQUIRED ++ authentication_status +WRONG_CREDENTIALS - field importance +VITAL - field -details/room +importance +FLOATING - field -user_data/name +protocol +IP - field -user_data/type +protocol +DUMMY - -field -user_data/model +protocol +IP_EXTERNAL Responses
- -
- -- -Status -Meaning -Description -Schema +status +ONLINE - +204 -No Content -none -None +status +OFFLINE ++ +status +DOWN ++ status +HIDDEN metrics
-getAgentRTDStats
- +getDevicePowerActions
+
-Code samples
curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/rtd \ +
-curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -3197,7 +3374,7 @@getAgentRTDStats
}; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/rtd', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power', method: 'get', headers: headers, @@ -3214,7 +3391,7 @@getAgentRTDStats
}; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/rtd', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power', { method: 'GET', @@ -3232,7 +3409,7 @@getAgentRTDStats
'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/rtd', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power', params={ }, headers = headers) @@ -3246,7 +3423,7 @@getAgentRTDStats
'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/rtd', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power', params: { }, headers: headers @@ -3268,7 +3445,7 @@getAgentRTDStats
} data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/rtd", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power", data) req.Header = headers client := &http.Client{} @@ -3277,15 +3454,15 @@getAgentRTDStats
}
+GET /agent/{agent_id}/device/rtd
-GET /agent/{agent_id}/device/{device_id}/action/powerReturns the Round Trip Delay statistics for all devices monitored by the agent. The aggregate values of avg_min, avg_max, avg_median help to understand the baseline response time of a device in a weekly time frame, while latest_median helps detecting a possible deviation from the baseline
+Returns the power management actions available on the device at the current moment.See DevicePowerAction schema for further details.
Curl
--curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/rtd \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -3293,7 +3470,7 @@Curl
Parameters
+Parameters
@@ -3311,6 +3488,13 @@ +Parameters
true Agent ID + device_id +path +integer(int32) +true +Device ID +@@ -3318,20 +3502,14 @@
-Parameters
200 Response
-[ - { - "avg_max": "string", - "avg_median": "string", - "avg_min": "string", - "device_id": 0, - "latest_lost_packet_count": 0, - "latest_median": "string", - "latest_sent_packet_count": 0, - "timestamp": "2019-06-11T09:08:10Z" - } -] +
-{ + "cycle": true, + "off": true, + "on": true, + "software_reboot": true +}Responses
+Responses
- -@@ -3344,97 +3522,27 @@ Responses
-200 OK -Devices RTD Statistics -Inline -Response Schema
- -Status Code 200
- --
-- - -Name -Type -Required -Description -- -anonymous -[DeviceRTDStatistics] -false -none -- -» avg_max -string -false -none -- -» avg_median -string -false -none -- -» avg_min -string -false -none -- -» device_id -integer(int32) -true -none -- -» latest_lost_packet_count -integer(int32) -false -The number of lost packets of the latest collection sample -- -» latest_median -string -false -The median value of the latest collection sample -- -» latest_sent_packet_count -integer(int32) -false -The number of sent packets of the latest collection sample -- » timestamp -string(date-time) -true -The timestamp of the latest update +Returns a JSON object indicating the current availability of each power action on the device +DevicePowerAction getDeviceStatusHistory
- +powerActionOnDevice
+
-Code samples
func main() { headers := map[string][]string{ - "Accept": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event", data) + req, err := http.NewRequest("POST", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field}", data) req.Header = headers client := &http.Client{} @@ -3513,23 +3617,22 @@curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event \ - -H 'Accept: application/json' \ +curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field} \ -H 'X-Api-Key: API_KEY'var headers = { - 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event', - method: 'get', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field}', + method: 'post', headers: headers, success: function(data) { @@ -3445,14 +3553,13 @@getDeviceStatusHistory
const fetch = require('node-fetch'); const headers = { - 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field}', { - method: 'GET', + method: 'POST', headers: headers }) @@ -3464,11 +3571,10 @@getDeviceStatusHistory
import requests headers = { - 'Accept': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event', params={ +r = requests.post('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field}', params={ }, headers = headers) @@ -3478,11 +3584,10 @@getDeviceStatusHistory
require 'json' headers = { - 'Accept' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event', +result = RestClient.post 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field}', params: { }, headers: headers @@ -3498,13 +3603,12 @@getDeviceStatusHistory
getDeviceStatusHistory
}
+GET /agent/{agent_id}/device/{device_id}/history/network/event
-POST /agent/{agent_id}/device/{device_id}/action/power/{field}Returns the time series of the state changes of the device
+Performs the action on the device, according to the specified { field } value. The availability of such operations can be determined with a call to getDevicePowerActions operation
Curl
--curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event \ - -H 'Accept: application/json' \ +curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field} \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
- -@@ -3555,151 +3658,74 @@ Parameters
Device ID - -from -query -string(date-time) -false -The start time of the time series. Default value is one week -- -to -query -string(date-time) -false -The end time of the time series. Default value is now --
-Example responses
- -200 Response
-
-[ - { - "details": { - "new_ip": [ - "string" - ], - "old_ip": [ - "string" - ] - }, - "timestamp": "2019-06-11T09:08:10Z", - "type": "IP_CHANGE" - } -] -Responses
- --
- -- - -Status -Meaning -Description -Schema -- 200 -OK -A time series -Inline +field +path +string +true +Specifies the power action to perform Response Schema
- -Status Code 200
- +Enumerated Values
-- Name -Type -Required -Description +Parameter +Value - -anonymous -[DeviceHistory] -false -none -- -» details -object -false -none -- »» new_ip -[string] -false -The new IP addresses +field +on - »» old_ip -[string] -false -The old IP addresses +field +off - » timestamp -string(date-time) -true -The time the sample was reported to Domotz +field +cycle - » type -string -true -The device event type +field +software-reboot Enumerated Values
+ +Responses
+
-- Property -Value +Status +Meaning +Description +Schema - -type -IP_CHANGE -- -type -CREATED -- -type -UP -- type -DOWN +204 +No Content +none +None getDeviceRTDHistory
- +setCredentials
+
-Code samples
curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd \ - -H 'Accept: application/json' \ +curl -X PUT http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/credentials \ + -H 'Content-Type: application/json' \ -H 'X-Api-Key: API_KEY'var headers = { - 'Accept':'application/json', + 'Content-Type':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd', - method: 'get', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/credentials', + method: 'put', headers: headers, success: function(data) { @@ -3708,17 +3734,20 @@getDeviceRTDHistory
})const fetch = require('node-fetch'); - +const inputBody = '{ + "password": "string", + "username": "string" +}'; const headers = { - 'Accept':'application/json', + 'Content-Type':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/credentials', { - method: 'GET', - + method: 'PUT', + body: inputBody, headers: headers }) .then(function(res) { @@ -3729,11 +3758,11 @@getDeviceRTDHistory
-import requests headers = { - 'Accept': 'application/json', + 'Content-Type': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd', params={ +r = requests.put('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/credentials', params={ }, headers = headers) @@ -3743,11 +3772,11 @@getDeviceRTDHistory
require 'json' headers = { - 'Accept' => 'application/json', + 'Content-Type' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd', +result = RestClient.put 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/credentials', params: { }, headers: headers @@ -3763,13 +3792,13 @@getDeviceRTDHistory
func main() { headers := map[string][]string{ - "Accept": []string{"application/json"}, + "Content-Type": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd", data) + req, err := http.NewRequest("PUT", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/credentials", data) req.Header = headers client := &http.Client{} @@ -3778,23 +3807,31 @@getDeviceRTDHistory
}
+GET /agent/{agent_id}/device/{device_id}/history/rtd
-PUT /agent/{agent_id}/device/{device_id}/credentialsReturns the Round Trip Delay history for the device. Each item represents the statistical aggregate of a set of Round Trip Delay measurements
+Sets the device credentials to perform extended discovery. This operation will affect the authentication_status of the device
++
+Body parameter
+{ + "password": "string", + "username": "string" +} +Curl
--curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd \ - -H 'Accept: application/json' \ +curl -X PUT http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/credentials \ + -H 'Content-Type: application/json' \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
-@@ -3820,38 +3857,15 @@ Parameters
Device ID - -from -query -string(date-time) -false -The start time of the time series. Default value is one week -- to -query -string(date-time) -false -The end time of the time series. Default value is now +body +body +DeviceCredentials +true +device credentials payload -
-Example responses
- -200 Response
-
-[ - { - "lost_packet_count": 0, - "max": "string", - "median": "string", - "min": "string", - "sent_packet_count": 0, - "timestamp": "2019-06-11T09:08:10Z" - } -] -Responses
+Responses
- -@@ -3862,75 +3876,19 @@ Responses
- -200 -OK -Device RTD History -Inline -Response Schema
- -Status Code 200
- --
-- - -Name -Type -Required -Description -- -anonymous -[DeviceRTDHistorySample] -false -none -- -» lost_packet_count -integer(int32) -false -none -- -» max -string -false -none -- -» median -string -false -none -- -» min -string -false -none -- -» sent_packet_count -integer(int32) -false +204 +No Content none -- » timestamp -string(date-time) -true -The time the sample was reported to Domotz +None getAgentStatusHistory
- +getSNMPAuthentication
+
-Code samples
curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/event \ +
-curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -3941,7 +3899,7 @@getAgentStatusHistory
}; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/event', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication', method: 'get', headers: headers, @@ -3958,7 +3916,7 @@getAgentStatusHistory
}; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/event', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication', { method: 'GET', @@ -3976,7 +3934,7 @@getAgentStatusHistory
'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/event', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication', params={ }, headers = headers) @@ -3990,7 +3948,7 @@getAgentStatusHistory
'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/event', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication', params: { }, headers: headers @@ -4012,7 +3970,7 @@getAgentStatusHistory
} data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/event", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication", data) req.Header = headers client := &http.Client{} @@ -4021,15 +3979,15 @@getAgentStatusHistory
}
+GET /agent/{agent_id}/history/network/event
-GET /agent/{agent_id}/device/{device_id}/snmp-authenticationReturns the time series of the state changes of the agent
+Retrieves the SNMP authentication info
Curl
--curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/event \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -4037,7 +3995,7 @@Curl
Parameters
+Parameters
@@ -4076,14 +4027,18 @@@@ -4056,18 +4014,11 @@ Parameters
Agent ID - -from -query -string(date-time) -false -The start time of the time series. Default value is one week -- to -query -string(date-time) -false -The end time of the time series. Default value is now +device_id +path +integer(int32) +true +Device ID Parameters
200 Response
-
-[ - { - "timestamp": "2019-06-11T09:08:10Z", - "type": "CONNECTION_RECOVERED" - } -] +
-{ + "authentication_key": "string", + "authentication_protocol": "MD5", + "encryption_key": "string", + "encryption_protocol": "DES", + "snmp_read_community": "string", + "snmp_write_community": "string", + "username": "string", + "version": "V2" +}Responses
+Responses
- -@@ -4096,85 +4051,29 @@ Responses
-200 OK -A time series -Inline -Response Schema
- -Status Code 200
- --
-- - -Name -Type -Required -Description -- -anonymous -[AgentHistory] -false -none -- -» timestamp -string(date-time) -true -The time the sample was reported to Domotz -- -» type -string -true -The agent event type -Enumerated Values
--
-- - -Property -Value -- -type -CONNECTION_RECOVERED -- -type -CONNECTION_LOST -- -type -UP -- type -DOWN +The SNMP authentication info for the device +SNMPDomotzAuthentication getSpeedTestHistory
- +setSNMPAuthentication
+
-Code samples
func main() { headers := map[string][]string{ - "Accept": []string{"application/json"}, + "Content-Type": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/speed", data) + req, err := http.NewRequest("PUT", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication", data) req.Header = headers client := &http.Client{} @@ -4253,24 +4161,37 @@curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/speed \ - -H 'Accept: application/json' \ +curl -X PUT http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication \ + -H 'Content-Type: application/json' \ -H 'X-Api-Key: API_KEY'var headers = { - 'Accept':'application/json', + 'Content-Type':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/speed', - method: 'get', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication', + method: 'put', headers: headers, success: function(data) { @@ -4183,17 +4082,26 @@getSpeedTestHistory
})const fetch = require('node-fetch'); - +const inputBody = '{ + "authentication_key": "string", + "authentication_protocol": "MD5", + "encryption_key": "string", + "encryption_protocol": "DES", + "snmp_read_community": "string", + "snmp_write_community": "string", + "username": "string", + "version": "V2" +}'; const headers = { - 'Accept':'application/json', + 'Content-Type':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/speed', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication', { - method: 'GET', - + method: 'PUT', + body: inputBody, headers: headers }) .then(function(res) { @@ -4204,11 +4112,11 @@getSpeedTestHistory
import requests headers = { - 'Accept': 'application/json', + 'Content-Type': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/speed', params={ +r = requests.put('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication', params={ }, headers = headers) @@ -4218,11 +4126,11 @@getSpeedTestHistory
require 'json' headers = { - 'Accept' => 'application/json', + 'Content-Type' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/speed', +result = RestClient.put 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication', params: { }, headers: headers @@ -4238,13 +4146,13 @@getSpeedTestHistory
getSpeedTestHistory
}
+GET /agent/{agent_id}/history/network/speed
-PUT /agent/{agent_id}/device/{device_id}/snmp-authenticationReturns the time series of the Internet Speed measurements taken from the agent, both in -download and in upload.
+Sets the SNMP authentication info.
- snmp_read_community and snmp_write_community are relevant only for V1 and V2.
- V3_NO_AUTH requires a valid username.
- V3_AUTH_NO_PRIV requires username, authentication_protocol and authentication_key.
- V3_AUTH_PRIV requires username, authentication_protocol, authentication_key, encryption_protocol and encryption_key.
+
+Body parameter
+{ + "authentication_key": "string", + "authentication_protocol": "MD5", + "encryption_key": "string", + "encryption_protocol": "DES", + "snmp_read_community": "string", + "snmp_write_community": "string", + "username": "string", + "version": "V2" +} +Curl
--curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/speed \ - -H 'Accept: application/json' \ +curl -X PUT http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication \ + -H 'Content-Type: application/json' \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
-@@ -4289,36 +4210,22 @@ Parameters
Agent ID - from -query -string(date-time) -false -The start time of the time series. Default value is one week +device_id +path +integer(int32) +true +Device ID - to -query -string(date-time) -false -The end time of the time series. Default value is now +body +body +SNMPDomotzAuthentication +true +none -
-Example responses
- -200 Response
-
-[ - { - "timestamp": "2019-06-11T09:08:10Z", - "values": [ - 0 - ] - } -] -Responses
+Responses
- -@@ -4329,67 +4236,31 @@ Responses
- -200 -OK -A time series -Inline -Response Schema
- -Status Code 200
- --
- -- - -Name -Type -Required -Description -- -anonymous -[NetworkSpeedSample] -false -[A Network Speed Sample is the result of the measurement of the Internet download and upload speed, in bits per second, taken by the Agent] -- -» timestamp -string(date-time) -false -The time the sample was reported to Domotz -- » values -[integer] -false -A pair of values: the download and upload speed, in Bit Per Seconds (bps), as measured by the Agent +204 +No Content +none +None actions
-connectToDevice
- +setSnmpCommunity
+
-Code samples
curl -X POST your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/connection \ +curl -X PUT http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community \ -H 'Content-Type: application/json' \ - -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'var headers = { 'Content-Type':'application/json', - 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/connection', - method: 'post', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community', + method: 'put', headers: headers, success: function(data) { @@ -4399,20 +4270,18 @@connectToDevice
const fetch = require('node-fetch'); const inputBody = '{ - "allowed_ip": "string", - "port": 0, - "protocol": "http" + "read": "string", + "write": "string" }'; const headers = { 'Content-Type':'application/json', - 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/connection', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community', { - method: 'POST', + method: 'PUT', body: inputBody, headers: headers }) @@ -4425,11 +4294,10 @@connectToDevice
-import requests headers = { 'Content-Type': 'application/json', - 'Accept': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.post('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/connection', params={ +r = requests.put('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community', params={ }, headers = headers) @@ -4440,11 +4308,10 @@connectToDevice
headers = { 'Content-Type' => 'application/json', - 'Accept' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.post 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/connection', +result = RestClient.put 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community', params: { }, headers: headers @@ -4461,13 +4328,12 @@connectToDevice
headers := map[string][]string{ "Content-Type": []string{"application/json"}, - "Accept": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("POST", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/connection", data) + req, err := http.NewRequest("PUT", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community", data) req.Header = headers client := &http.Client{} @@ -4476,33 +4342,31 @@connectToDevice
}
+POST /agent/{agent_id}/device/{device_id}/connection
-PUT /agent/{agent_id}/device/{device_id}/snmp-communityEstablishes a direct secure connection to the
+deviceSaves a snmp community (read, optionally write) on device. Deprecated, please use setSNMPAuthentication
Body parameter
{ - "allowed_ip": "string", - "port": 0, - "protocol": "http" + "read": "string", + "write": "string" }Curl
--curl -X POST your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/connection \ +curl -X PUT http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community \ -H 'Content-Type: application/json' \ - -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
-@@ -4530,27 +4394,13 @@ Parameters
body body -DeviceConnection +DeviceSnmpCommunity true -none +The value that the snmp community entries will change to -
-Example responses
- -201 Response
-
-{ - "allowed_ip": "string", - "expiration": "2019-06-11T09:08:10Z", - "id": 0, - "link": "string", - "port": 0, - "protocol": "http" -} -Responses
+Responses
- -@@ -4561,33 +4411,29 @@ Responses
- 201 -Created +204 +No Content none -ConnectionSession +None multimedia
-onvifSnapshot
- +hideDevice
+
-Code samples
curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot \ - -H 'Accept: image/*' \ +curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/visibility \ -H 'X-Api-Key: API_KEY'var headers = { - 'Accept':'image/*', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot', - method: 'get', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/visibility', + method: 'delete', headers: headers, success: function(data) { @@ -4598,14 +4444,13 @@onvifSnapshot
const fetch = require('node-fetch'); const headers = { - 'Accept':'image/*', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/visibility', { - method: 'GET', + method: 'DELETE', headers: headers }) @@ -4617,11 +4462,10 @@onvifSnapshot
-import requests headers = { - 'Accept': 'image/*', 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot', params={ +r = requests.delete('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/visibility', params={ }, headers = headers) @@ -4631,11 +4475,10 @@onvifSnapshot
require 'json' headers = { - 'Accept' => 'image/*', 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot', +result = RestClient.delete 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/visibility', params: { }, headers: headers @@ -4651,13 +4494,12 @@onvifSnapshot
func main() { headers := map[string][]string{ - "Accept": []string{"image/*"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot", data) + req, err := http.NewRequest("DELETE", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/visibility", data) req.Header = headers client := &http.Client{} @@ -4666,23 +4508,22 @@onvifSnapshot
}
+GET /agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot
-DELETE /agent/{agent_id}/device/{device_id}/visibilityTake a snapshot of the camera.
+Hides a device (available only on DOWN devices)
Curl
--curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot \ - -H 'Accept: image/*' \ +curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/visibility \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
-@@ -4709,13 +4550,7 @@ Parameters
-
- -Example responses
- -200 Response
-Responses
+Responses
- -@@ -4726,33 +4561,31 @@ Responses
- 200 -OK -A binary image -string +204 +No Content +none +None alert profiles
-getAlertProfiles
- +editDevice
+
-Code samples
curl -X GET your-domotz-api-endpoint/public-api/v1/user/{user_id}/alert-profile \ - -H 'Accept: application/json' \ +curl -X PUT http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/{field} \ + -H 'Content-Type: application/json' \ -H 'X-Api-Key: API_KEY'var headers = { - 'Accept':'application/json', + 'Content-Type':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/user/{user_id}/alert-profile', - method: 'get', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/{field}', + method: 'put', headers: headers, success: function(data) { @@ -4761,17 +4594,17 @@getAlertProfiles
})const fetch = require('node-fetch'); - +const inputBody = 'string'; const headers = { - 'Accept':'application/json', + 'Content-Type':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/user/{user_id}/alert-profile', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/{field}', { - method: 'GET', - + method: 'PUT', + body: inputBody, headers: headers }) .then(function(res) { @@ -4782,11 +4615,11 @@getAlertProfiles
-import requests headers = { - 'Accept': 'application/json', + 'Content-Type': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/user/{user_id}/alert-profile', params={ +r = requests.put('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/{field}', params={ }, headers = headers) @@ -4796,11 +4629,11 @@getAlertProfiles
require 'json' headers = { - 'Accept' => 'application/json', + 'Content-Type' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/user/{user_id}/alert-profile', +result = RestClient.put 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/{field}', params: { }, headers: headers @@ -4816,13 +4649,13 @@getAlertProfiles
func main() { headers := map[string][]string{ - "Accept": []string{"application/json"}, + "Content-Type": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/user/{user_id}/alert-profile", data) + req, err := http.NewRequest("PUT", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/{field}", data) req.Header = headers client := &http.Client{} @@ -4831,23 +4664,28 @@getAlertProfiles
}
+GET /user/{user_id}/alert-profile
-PUT /agent/{agent_id}/device/{device_id}/{field}Returns the list of configured alert profiles. You can configure alert profiles on the Domotz Portal. Alert profiles define the association between a list of events and a notification channel (email, webhook or slack)
+Changes a field of the device or one of its details
++
+Body parameter
+"string" +Curl
--curl -X GET your-domotz-api-endpoint/public-api/v1/user/{user_id}/alert-profile \ - -H 'Accept: application/json' \ +curl -X PUT http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/{field} \ + -H 'Content-Type: application/json' \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
- -@@ -4859,112 +4697,97 @@ Parameters
- -user_id +agent_id path integer(int32) true -User ID +Agent ID -
-Example responses
- -200 Response
-
-[ - { - "description": "string", - "events": [ - "device_status" - ], - "id": 0, - "is_enabled": true, - "name": "string", - "tag": "string" - } -] -Responses
- -
- -- -Status -Meaning -Description -Schema +device_id +path +integer(int32) +true +Device ID - -200 -OK -The list of configured alert profiles -Inline +field +path +string +true +The field to update - for the type and valid values see the description of the corresponding output parameter Response Schema
- -Status Code 200
- ++ + +body +body +string +true +The value that the field will change to +Enumerated Values
-- Name -Type -Required -Description +Parameter +Value - anonymous -[AlertProfile] -false -none +field +importance - » description -string -false -The description of the alert profile +field +user_data/model - » events -[string] -false -The list of events associated to the profile +field +user_data/type - » id -integer(int32) -true -The id of the event profile +field +user_data/name - » is_enabled -boolean -false -true if the event profile is enabled, false otherwise +field +user_data/vendor - » name -string -false -The symbolic name associated to the profile +field +details/room - » tag -string -false -A label associated to the profile +field +details/zone getAgentAlertProfile
- + +Responses
+ ++
+ ++ + +Status +Meaning +Description +Schema ++ +204 +No Content +none +None +metrics
+getAgentRTDStats
+
-Code samples
curl -X GET your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id} \ +
-curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/rtd \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -4975,7 +4798,7 @@getAgentAlertProfile
}; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id}', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/rtd', method: 'get', headers: headers, @@ -4992,7 +4815,7 @@getAgentAlertProfile
}; -fetch('your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id}', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/rtd', { method: 'GET', @@ -5010,7 +4833,7 @@getAgentAlertProfile
'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id}', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/rtd', params={ }, headers = headers) @@ -5024,7 +4847,7 @@getAgentAlertProfile
'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id}', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/rtd', params: { }, headers: headers @@ -5046,7 +4869,7 @@getAgentAlertProfile
} data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id}", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/rtd", data) req.Header = headers client := &http.Client{} @@ -5055,15 +4878,15 @@getAgentAlertProfile
}
+GET /alert-profile/binding/agent/{agent_id}
-GET /agent/{agent_id}/device/rtdGet the alert profile bindings of an agent
+Returns the Round Trip Delay statistics for all devices monitored by the agent. The aggregate values of avg_min, avg_max, avg_median help to understand the baseline response time of a device in a weekly time frame, while latest_median helps detecting a possible deviation from the baseline
Curl
--curl -X GET your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id} \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/rtd \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -5071,7 +4894,7 @@Curl
Parameters
+Parameters
@@ -5089,13 +4912,6 @@ -Parameters
true Agent ID - alert_profile_id -path -integer(int32) -true -Profile ID -@@ -5105,11 +4921,18 @@
Parameters
-[ { - "alert_profile_id": 0 + "avg_max": "string", + "avg_median": "string", + "avg_min": "string", + "device_id": 0, + "latest_lost_packet_count": 0, + "latest_median": "string", + "latest_sent_packet_count": 0, + "timestamp": "2019-08-24T14:15:22Z" } ]Responses
+Responses
-@@ -5122,12 +4945,12 @@ Responses
200 OK -The alert profile bindings of an agent +Devices RTD Statistics Inline Response Schema
+Response Schema
Status Code 200
@@ -5141,24 +4964,66 @@Response Schema
anonymous -[AlertProfileAgentBinding] +[DeviceRTDStatistics] false none - +» alert_profile_id +» avg_max +string +false +none ++ +» avg_median +string +false +none ++ +» avg_min +string +false +none ++ +» device_id integer(int32) true -The id of the alert profile +none ++ +» latest_lost_packet_count +integer(int32) +false +The number of lost packets of the latest collection sample ++ +» latest_median +string +false +The median value of the latest collection sample ++ +» latest_sent_packet_count +integer(int32) +false +The number of sent packets of the latest collection sample ++ -» timestamp +string(date-time) +true +The timestamp of the latest update getDevicesAlertProfile
- +getDeviceStatusHistory
+
-Code samples
curl -X GET your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id}/device \ +
-curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -5169,7 +5034,7 @@getDevicesAlertProfile
}; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id}/device', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event', method: 'get', headers: headers, @@ -5186,7 +5051,7 @@getDevicesAlertProfile
}; -fetch('your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id}/device', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event', { method: 'GET', @@ -5204,7 +5069,7 @@getDevicesAlertProfile
'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id}/device', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event', params={ }, headers = headers) @@ -5218,7 +5083,7 @@getDevicesAlertProfile
'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id}/device', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event', params: { }, headers: headers @@ -5240,7 +5105,7 @@getDevicesAlertProfile
} data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id}/device", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event", data) req.Header = headers client := &http.Client{} @@ -5249,15 +5114,15 @@getDevicesAlertProfile
}
+GET /alert-profile/binding/agent/{agent_id}/device
-GET /agent/{agent_id}/device/{device_id}/history/network/eventGet the alert profile bindings of the devices of an agent
+Returns the time series of the state changes of the device
Curl
--curl -X GET your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id}/device \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -5265,7 +5130,7 @@Curl
Parameters
+Parameters
@@ -5299,12 +5178,20 @@@@ -5284,11 +5149,25 @@ Parameters
Agent ID - +alert_profile_id +device_id path integer(int32) true -Profile ID +Device ID ++ +from +query +string(date-time) +false +The start time of the time series. Default value is one week ++ to +query +string(date-time) +false +The end time of the time series. Default value is now Parameters
-[ { - "alert_profile_id": 0, - "device_id": 0 + "details": { + "new_ip": [ + "string" + ], + "old_ip": [ + "string" + ] + }, + "timestamp": "2019-08-24T14:15:22Z", + "type": "IP_CHANGE" } ]Responses
+Responses
-@@ -5317,12 +5204,12 @@ Responses
200 OK -The alert profile bindings for all devices of the agent +A time series Inline Response Schema
+Response Schema
Status Code 200
@@ -5336,43 +5223,87 @@Response Schema
anonymous -[AlertProfileDeviceBinding] +[DeviceHistory] false none - +» alert_profile_id -integer(int32) +» details +object +false +none ++ +»» new_ip +[string] +false +The new IP addresses ++ +»» old_ip +[string] +false +The old IP addresses ++ » timestamp +string(date-time) true -The id of the alert profile +The time the sample was reported to Domotz - -» device_id -integer(int32) +» type +string true -none +The device event type unbindAlertProfileFromAgent
- - --
-Code samples
-curl -X DELETE your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id} \ - -H 'X-Api-Key: API_KEY' - -var headers = { - 'X-Api-Key':'API_KEY' - -}; - -$.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', - method: 'delete', - - headers: headers, - success: function(data) { +Enumerated Values
++
++ + +Property +Value ++ +type +IP_CHANGE ++ +type +CREATED ++ +type +UP ++ +type +DOWN +getDeviceRTDHistory
+ + ++
+Code samples
+curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd', + method: 'get', + + headers: headers, + success: function(data) { console.log(JSON.stringify(data)); } }) @@ -5380,13 +5311,14 @@unbindAlertProfileFromAgent
const fetch = require('node-fetch'); const headers = { + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd', { - method: 'DELETE', + method: 'GET', headers: headers }) @@ -5398,10 +5330,11 @@unbindAlertProfileFromAgent
-import requests headers = { + 'Accept': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.delete('your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd', params={ }, headers = headers) @@ -5411,10 +5344,11 @@unbindAlertProfileFromAgent
require 'json' headers = { + 'Accept' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.delete 'your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd', params: { }, headers: headers @@ -5430,12 +5364,13 @@unbindAlertProfileFromAgent
func main() { headers := map[string][]string{ + "Accept": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("DELETE", "your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd", data) req.Header = headers client := &http.Client{} @@ -5444,22 +5379,23 @@unbindAlertProfileFromAgent
}
+DELETE /alert-profile/{alert_profile_id}/binding/agent/{agent_id}
-GET /agent/{agent_id}/device/{device_id}/history/rtdUnbind an alert profile from an agent.
+Returns the Round Trip Delay history for the device. Each item represents the statistical aggregate of a set of Round Trip Delay measurements
Curl
--curl -X DELETE your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id} \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
-@@ -5478,15 +5414,45 @@ Parameters
Agent ID - +alert_profile_id +device_id path integer(int32) true -Profile ID +Device ID ++ +from +query +string(date-time) +false +The start time of the time series. Default value is one week ++ to +query +string(date-time) +false +The end time of the time series. Default value is now Responses
++
+Example responses
+ +200 Response
+
+[ + { + "lost_packet_count": 0, + "max": "string", + "median": "string", + "min": "string", + "sent_packet_count": 0, + "timestamp": "2019-08-24T14:15:22Z" + } +] +Responses
+ +@@ -5497,29 +5463,87 @@ Responses
- +204 -No Content +200 +OK +Device RTD History +Inline +Response Schema
+ +Status Code 200
+ ++
-+ + +Name +Type +Required +Description ++ +anonymous +[DeviceRTDHistorySample] +false none -None ++ +» lost_packet_count +integer(int32) +false +none ++ +» max +string +false +none ++ +» median +string +false +none ++ +» min +string +false +none ++ +» sent_packet_count +integer(int32) +false +none ++ » timestamp +string(date-time) +true +The time the sample was reported to Domotz bindAlertProfileToAgent
- +getAgentStatusHistory
+
-Code samples
curl -X POST your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id} \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/event \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'var headers = { + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', - method: 'post', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/event', + method: 'get', headers: headers, success: function(data) { @@ -5530,13 +5554,14 @@bindAlertProfileToAgent
const fetch = require('node-fetch'); const headers = { + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/event', { - method: 'POST', + method: 'GET', headers: headers }) @@ -5548,10 +5573,11 @@bindAlertProfileToAgent
-import requests headers = { + 'Accept': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.post('your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/event', params={ }, headers = headers) @@ -5561,10 +5587,11 @@bindAlertProfileToAgent
require 'json' headers = { + 'Accept' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.post 'your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/event', params: { }, headers: headers @@ -5580,12 +5607,13 @@bindAlertProfileToAgent
func main() { headers := map[string][]string{ + "Accept": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("POST", "your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/event", data) req.Header = headers client := &http.Client{} @@ -5594,22 +5622,23 @@bindAlertProfileToAgent
}
+POST /alert-profile/{alert_profile_id}/binding/agent/{agent_id}
-GET /agent/{agent_id}/history/network/eventBind an alert profile to an agent. After binding, a webhook will be sent to the configured service when one of the events associated to the profile occurs. You can configure the profile and the webhook endpoint on the Domotz Portal
+Returns the time series of the state changes of the agent
Curl
--curl -X POST your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id} \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/event \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
-@@ -5628,15 +5657,34 @@ Parameters
Agent ID - +alert_profile_id -path -integer(int32) -true -Profile ID +from +query +string(date-time) +false +The start time of the time series. Default value is one week ++ to +query +string(date-time) +false +The end time of the time series. Default value is now Responses
++
+Example responses
+ +200 Response
+
+[ + { + "timestamp": "2019-08-24T14:15:22Z", + "type": "CONNECTION_RECOVERED" + } +] +Responses
-@@ -5647,77 +5695,87 @@ Responses
- 204 -No Content -none -None +200 +OK +A time series +Inline - -Webhook Events
+Response Schema
-- -
+- - - +Event Name -Method -Schema -Expected Reply -Status Code 200
+
- - -- - +agent_device_discovery -POST -DeviceDiscoveryEvent -201 +Name +Type +Required +Description - -agent_security_issue -POST -AgentSecurityIssueEvent -201 +anonymous +[AgentHistory] +false +none - -agent_speed_test -POST -AgentSpeedTestEvent -201 +» timestamp +string(date-time) +true +The time the sample was reported to Domotz - - - -agent_status -POST -AgentStatusEvent -201 +» type +string +true +The agent event type unbindAlertProfileFromDevice
- +Enumerated Values
++
++ + +Property +Value ++ +type +CONNECTION_RECOVERED ++ +type +CONNECTION_LOST ++ +type +UP ++ +type +DOWN +getSpeedTestHistory
+
-Code samples
curl -X DELETE your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id} \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/speed \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'var headers = { + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', - method: 'delete', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/speed', + method: 'get', headers: headers, success: function(data) { @@ -5728,13 +5786,14 @@unbindAlertProfileFromDevice
const fetch = require('node-fetch'); const headers = { + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/speed', { - method: 'DELETE', + method: 'GET', headers: headers }) @@ -5746,10 +5805,11 @@unbindAlertProfileFromDevice
-import requests headers = { + 'Accept': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.delete('your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/speed', params={ }, headers = headers) @@ -5759,10 +5819,11 @@unbindAlertProfileFromDevice
require 'json' headers = { + 'Accept' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.delete 'your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/speed', params: { }, headers: headers @@ -5778,12 +5839,13 @@unbindAlertProfileFromDevice
func main() { headers := map[string][]string{ + "Accept": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("DELETE", "your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/speed", data) req.Header = headers client := &http.Client{} @@ -5792,22 +5854,24 @@unbindAlertProfileFromDevice
}
+DELETE /alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}
-GET /agent/{agent_id}/history/network/speedUnbind an alert profile from a device
+Returns the time series of the Internet Speed measurements taken from the agent, both in +download and in upload.
Curl
--curl -X DELETE your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id} \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/speed \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
-@@ -5826,22 +5890,36 @@ Parameters
Agent ID - alert_profile_id -path -integer(int32) -true -Profile ID +from +query +string(date-time) +false +The start time of the time series. Default value is one week - device_id -path -integer(int32) -true -Device ID +to +query +string(date-time) +false +The end time of the time series. Default value is now Responses
++
+Example responses
+ +200 Response
+
+[ + { + "timestamp": "2019-08-24T14:15:22Z", + "values": [ + 0 + ] + } +] +Responses
+ +@@ -5852,29 +5930,65 @@ Responses
- +204 -No Content -none -None +200 +OK +A time series +Inline +Response Schema
+ +Status Code 200
+ ++
-+ + +Name +Type +Required +Description ++ +anonymous +[NetworkSpeedSample] +false +[A Network Speed Sample is the result of the measurement of the Internet download and upload speed, in bits per second, taken by the Agent] ++ +» timestamp +string(date-time) +false +The time the sample was reported to Domotz ++ » values +[integer] +false +A pair of values: the download and upload speed, in Bit Per Seconds (bps), as measured by the Agent bindAlertProfileToDevice
- + +SNMP/TCP SENSORS
+listEyesSNMP
+
-Code samples
+curl -X POST your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id} \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'var headers = { + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', - method: 'post', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp', + method: 'get', headers: headers, success: function(data) { @@ -5885,13 +5999,14 @@bindAlertProfileToDevice
const fetch = require('node-fetch'); const headers = { + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp', { - method: 'POST', + method: 'GET', headers: headers }) @@ -5903,10 +6018,11 @@bindAlertProfileToDevice
-import requests headers = { + 'Accept': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.post('your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp', params={ }, headers = headers) @@ -5916,10 +6032,11 @@bindAlertProfileToDevice
require 'json' headers = { + 'Accept' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.post 'your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp', params: { }, headers: headers @@ -5935,12 +6052,13 @@bindAlertProfileToDevice
func main() { headers := map[string][]string{ + "Accept": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("POST", "your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp", data) req.Header = headers client := &http.Client{} @@ -5949,22 +6067,23 @@bindAlertProfileToDevice
}
+POST /alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}
-GET /agent/{agent_id}/device/{device_id}/eye/snmpBind an alert profile to a device. After binding, a webhook will be sent to the configured service when one of the events associated to the profile occurs. You can configure the profile and the webhook endpoint on the Domotz Portal
+Retrieves the list of configured SNMP Domotz Eyes
Curl
--curl -X POST your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id} \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
-@@ -5983,13 +6102,6 @@ Parameters
Agent ID - -alert_profile_id -path -integer(int32) -true -Profile ID -device_id path integer(int32) @@ -5998,7 +6110,24 @@Parameters
Responses
++
+Example responses
+ +200 Response
+
+[ + { + "category": "OTHER", + "id": 0, + "last_update": "2019-08-24T14:15:22Z", + "latest_value": "string", + "name": "string", + "oid": "string", + "value_type": "STRING" + } +] +Responses
-@@ -6009,95 +6138,137 @@ Responses
- 204 -No Content -none -None +200 +OK +The list of configured SNMP Domotz Eyes for the device and their latest values +Inline - -- -Webhook Events
+Response Schema
-- -
- -- - - +Event Name -Method -Schema -Expected Reply -Status Code 200
+
+- - +device_heartbeat_lost -POST -DeviceHeartbeatLostEvent -201 +Name +Type +Required +Description - -device_ip_change -POST -DeviceIPChangeEvent -201 +anonymous +[SNMPDomotzEye] +false +[Information about a configured SNMP Domotz Eye] - -device_rtd -POST -DeviceTCPEvent -201 +» category +string +true +The category of the OID - -device_snmp -POST -DeviceSNMPEvent -201 +» id +integer(int32) +true +The unique identifier of the SNMP Domotz Eye - -device_status -POST -DeviceStatusChangeEvent -201 +» last_update +string(date-time) +true +The timestamp of the latest update - +device_tcp -POST -DeviceTCPEvent -201 +» latest_value +string +true +The value retrieved on the OID + +» name +string +true +The name of the Domotz Eyes ++ +» oid +string +true +The OID string ++ +» value_type +string +true +The type of the OID +Enumerated Values
++
++ + +Property +Value ++ +category +OTHER ++ +category +CONSUMABLE ++ +category +CPU ++ +category +DISK_SPACE ++ +category +MEMORY ++ +category +NETWORK_TRAFFIC ++ +category +TEMPERATURE ++ +value_type +STRING ++ +value_type +NUMERIC +createEyeSNMP
+ + ++
+Code samples
+
-curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp \ + -H 'Content-Type: application/json' \ + -H 'X-Api-Key: API_KEY' -meta
-apiUsageInfo
- - --
-Code samples
-curl -X GET your-domotz-api-endpoint/public-api/v1/meta/usage \ - -H 'Accept: application/json' \ - -H 'X-Api-Key: API_KEY' -var headers = { - 'Accept':'application/json', + 'Content-Type':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/meta/usage', - method: 'get', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp', + method: 'post', headers: headers, success: function(data) { @@ -6106,17 +6277,22 @@apiUsageInfo
})const fetch = require('node-fetch'); - +const inputBody = '{ + "category": "OTHER", + "name": "string", + "oid": "string", + "value_type": "STRING" +}'; const headers = { - 'Accept':'application/json', + 'Content-Type':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/meta/usage', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp', { - method: 'GET', - + method: 'POST', + body: inputBody, headers: headers }) .then(function(res) { @@ -6127,11 +6303,11 @@apiUsageInfo
-import requests headers = { - 'Accept': 'application/json', + 'Content-Type': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/meta/usage', params={ +r = requests.post('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp', params={ }, headers = headers) @@ -6141,11 +6317,11 @@apiUsageInfo
require 'json' headers = { - 'Accept' => 'application/json', + 'Content-Type' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/meta/usage', +result = RestClient.post 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp', params: { }, headers: headers @@ -6161,13 +6337,13 @@apiUsageInfo
func main() { headers := map[string][]string{ - "Accept": []string{"application/json"}, + "Content-Type": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/meta/usage", data) + req, err := http.NewRequest("POST", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp", data) req.Header = headers client := &http.Client{} @@ -6176,41 +6352,67 @@apiUsageInfo
}
+GET /meta/usage
-POST /agent/{agent_id}/device/{device_id}/eye/snmpRetrieves information about API usage and limits
+Creates a new SNMP Domotz Eyes
-
Example responses
- -200 Response
+Body parameter
-{ - "by_ip": [ - { - "count": 0, - "name": "string" - } - ], - "by_key": [ - { - "count": 0, - "id": 0, - "name": "string" - } - ], - "by_resource": [ - { - "count": 0, - "name": "string" - } - ], - "concurrent_allowed": 0, - "daily_limit": 0, - "daily_usage": 0 + "category": "OTHER", + "name": "string", + "oid": "string", + "value_type": "STRING" }Responses
+Curl
+ ++
+ ++curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp \ + -H 'Content-Type: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ ++
+ ++ + +Parameter +In +Type +Required +Description ++ +agent_id +path +integer(int32) +true +Agent ID ++ +device_id +path +integer(int32) +true +Device ID ++ +body +body +SNMPDomotzEyeCreation +true +none +Responses
- -@@ -6221,33 +6423,29 @@ Responses
- 200 -OK -A data structure containing information about current API usage and usage limits -APIUsageInformation +201 +Created +none +None assets
-listDeviceBaseTypes
- +deleteEyeSNMP
+
-Code samples
curl -X GET your-domotz-api-endpoint/public-api/v1/type/device/base \ - -H 'Accept: application/json' \ +curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id} \ -H 'X-Api-Key: API_KEY'var headers = { - 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/type/device/base', - method: 'get', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}', + method: 'delete', headers: headers, success: function(data) { @@ -6258,14 +6456,13 @@listDeviceBaseTypes
const fetch = require('node-fetch'); const headers = { - 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/type/device/base', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}', { - method: 'GET', + method: 'DELETE', headers: headers }) @@ -6277,11 +6474,10 @@listDeviceBaseTypes
-import requests headers = { - 'Accept': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/type/device/base', params={ +r = requests.delete('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}', params={ }, headers = headers) @@ -6291,11 +6487,10 @@listDeviceBaseTypes
require 'json' headers = { - 'Accept' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/type/device/base', +result = RestClient.delete 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}', params: { }, headers: headers @@ -6311,13 +6506,12 @@listDeviceBaseTypes
func main() { headers := map[string][]string{ - "Accept": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/type/device/base", data) + req, err := http.NewRequest("DELETE", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}", data) req.Header = headers client := &http.Client{} @@ -6326,92 +6520,79 @@listDeviceBaseTypes
}
- -GET /type/device/baseReturns the device types list
+
-DELETE /agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}-
-Example responses
+Deletes the SNMP Domotz Eye
-200 Response
-
-[ - { - "id": 0, - "identifier": "string", - "label": "string", - "vital": true - } -] -Responses
+Curl
--
+- - -Status -Meaning -Description -Schema -- -200 -OK -The types list -Inline -+
-+curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id} \ + -H 'X-Api-Key: API_KEY' -+Response Schema
+ +Status Code 200
+Parameters
+ +- Name +Parameter +In Type Required Description - anonymous -[DeviceBaseType] -false -[A device type, either set by the user or as identified by the Domotz system] +agent_id +path +integer(int32) +true +Agent ID - » id +device_id +path integer(int32) -false -An unique identifier of the type, referred in the +Deviceentitytrue +Device ID - +» identifier -string -false -The name of the type +sensor_id +path +integer(int32) +true +SNMP Eye ID Responses
+ +
-- +» label -string -false -A human-readable short description of the type +Status +Meaning +Description +Schema - » vital -boolean -false -Whether a device of this type will be marked as +VITALas soon as recognised204 +No Content +none +None listDeviceDetectedTypes
- +listEyesSNMPTriggerFunction
+
-Code samples
curl -X GET your-domotz-api-endpoint/public-api/v1/type/device/detected \ +
-curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/function \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -6422,7 +6603,7 @@listDeviceDetectedTypes
}; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/type/device/detected', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/function', method: 'get', headers: headers, @@ -6439,7 +6620,7 @@listDeviceDetectedTypes
}; -fetch('your-domotz-api-endpoint/public-api/v1/type/device/detected', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/function', { method: 'GET', @@ -6457,7 +6638,7 @@listDeviceDetectedTypes
'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/type/device/detected', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/function', params={ }, headers = headers) @@ -6471,7 +6652,7 @@listDeviceDetectedTypes
'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/type/device/detected', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/function', params: { }, headers: headers @@ -6493,7 +6674,7 @@listDeviceDetectedTypes
} data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/type/device/detected", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/function", data) req.Header = headers client := &http.Client{} @@ -6502,28 +6683,71 @@listDeviceDetectedTypes
}
+GET /type/device/detected
-GET /agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/functionReturns the detected device types list
+Retrieves the list of functions for the SNMP trigger Domotz Eyes
--
Example responses
+Curl
-200 Response
++
+ ++curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/function \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ ++
+ ++ + +Parameter +In +Type +Required +Description ++ +agent_id +path +integer(int32) +true +Agent ID ++ +device_id +path +integer(int32) +true +Device ID ++ +sensor_id +path +integer(int32) +true +SNMP Eye ID ++
Example responses
+ +200 Response
-[ { - "capabilities": [ - "string" - ], + "cardinality": 0, "id": 0, - "identifier": "string", - "label": "string", - "type_id": 0 + "name": "string", + "value_types": "STRING" } ]Responses
+Responses
-@@ -6536,12 +6760,12 @@ Responses
200 OK -The types list +The list of functions that can be used by the trigger Inline Response Schema
+Response Schema
Status Code 200
@@ -6555,50 +6779,58 @@Response Schema
anonymous -[DetectedDeviceType] +[SNMPDomotzEyeTriggerFunction] false -[A device type, detected by the Domotz device identification feature] +[Information about a trigger function] - » capabilities -[string] -false -The features of the device +» cardinality +integer(int32) +true +The number of arguments of the function » id integer(int32) -false -An unique identifier of the type, referred in the +Deviceentitytrue +The unique identifier of the SNMP Trigger function - » identifier +» name string -false -The name of the type +true +The name of the function - + +» label +» value_types string -false -A human-readable short description of the type +true +The type of the operands Enumerated Values
+
- -- + +» type_id -integer(int32) -false -The corresponding +device typeProperty +Value ++ +value_types +STRING ++ value_types +NUMERIC user
-getUser
- +getEyesSNMPHistory
+
-Code samples
+curl -X GET your-domotz-api-endpoint/public-api/v1/user \ +
-curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/history \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -6609,7 +6841,7 @@getUser
}; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/user', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/history', method: 'get', headers: headers, @@ -6626,7 +6858,7 @@getUser
}; -fetch('your-domotz-api-endpoint/public-api/v1/user', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/history', { method: 'GET', @@ -6644,7 +6876,7 @@getUser
'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/user', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/history', params={ }, headers = headers) @@ -6658,7 +6890,7 @@getUser
'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/user', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/history', params: { }, headers: headers @@ -6680,7 +6912,7 @@getUser
} data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/user", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/history", data) req.Header = headers client := &http.Client{} @@ -6689,21 +6921,83 @@getUser
}
+GET /user
-GET /agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/historyReturns the User information
+Returns the time series of the SNMP Domotz Eyes collected samples
+ +Curl
+ ++
+ ++curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/history \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ ++
+ + +Parameter +In +Type +Required +Description ++ +agent_id +path +integer(int32) +true +Agent ID ++ +device_id +path +integer(int32) +true +Device ID ++ +sensor_id +path +integer(int32) +true +SNMP Eye ID ++ +from +query +string(date-time) +false +The start time of the time series. Default value is one week ++ +to +query +string(date-time) +false +The end time of the time series. Default value is now +
-Example responses
200 Response
+{ - "id": 0, - "name": "string" -} +
-[ + { + "timestamp": "2019-08-24T14:15:22Z", + "value": "string" + } +]Responses
+Responses
-@@ -6716,42 +7010,15 @@ Responses
200 OK -The user -User +The list of SNMP Domotz Eyes samples +Inline Schemas
-APIUsageInformation
- -
-{ - "by_ip": [ - { - "count": 0, - "name": "string" - } - ], - "by_key": [ - { - "count": 0, - "id": 0, - "name": "string" - } - ], - "by_resource": [ - { - "count": 0, - "name": "string" - } - ], - "concurrent_allowed": 0, - "daily_limit": 0, - "daily_usage": 0 -} +Response Schema
+ +Status Code 200
-Information about Domotz API current usage and usage limits
-Properties
+Name @@ -6761,117 +7028,5469 @@Properties
- -by_ip -[object] -false -none -- -» count -integer(int32) -false -The number of calls originated from that IP address -- -» name -string -false -The IP address -- by_key -[object] +anonymous +[DeviceEyeSNMPHistorySample] false none - -» count -integer(int32) -false -The number of calls done using this key in the last 24 hours -- » id -integer(int32) -false -The ID of the API key +» timestamp +string(date-time) +true +The time the sample was reported to Domotz - -» name +» value string -false -The mnemonic API key name -- -by_resource -[object] -false +true none - -» count -integer(int32) -false -The number of calls for the resource -- -» name -string -false -The base resource name -- concurrent_allowed -integer(int32) -false +listEyesSNMPTrigger
+ + ++
+Code samples
+curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); + +const headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'Accept': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +GET /agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/triggerRetrieves the list of triggers for the SNMP Sensor
+ +Curl
+ ++
+ ++curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ ++
+ ++ + +Parameter +In +Type +Required +Description ++ +agent_id +path +integer(int32) +true +Agent ID ++ +device_id +path +integer(int32) +true +Device ID ++ +sensor_id +path +integer(int32) +true +SNMP Eye ID ++
+Example responses
+ +200 Response
+
+[ + { + "alert": { + "email": true, + "mobile": true + }, + "creation_time": "2019-08-24T14:15:22Z", + "function_id": 0, + "id": 0, + "name": "string", + "operands": [ + "string" + ] + } +] +Responses
+ ++
+ ++ + +Status +Meaning +Description +Schema ++ +200 +OK +The list of triggers associated to the sensor +Inline +Response Schema
+ +Status Code 200
+ ++
++ + +Name +Type +Required +Description ++ +anonymous +[SNMPDomotzEyeTrigger] +false +[Information about a trigger] ++ +» alert +object +false +The alerts details ++ +»» email +boolean +false +True if the email alert is active ++ +»» mobile +boolean +false +True if the mobile alert is active ++ +» creation_time +string(date-time) +false +none ++ +» function_id +integer(int32) +true +The unique identifier of the function assigned to the trigger ++ +» id +integer(int32) +true +The unique identifier of the SNMP Trigger ++ +» name +string +true +The name of the trigger ++ +» operands +[string] +true +The operands for the function +createEyeSNMPTrigger
+ + ++
+Code samples
+curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger \ + -H 'Content-Type: application/json' \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'Content-Type':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger', + method: 'post', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); +const inputBody = '{ + "function_id": 0, + "name": "string", + "operands": [ + "string" + ] +}'; +const headers = { + 'Content-Type':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger', +{ + method: 'POST', + body: inputBody, + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'Content-Type': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.post('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'Content-Type' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.post 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Content-Type": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("POST", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +POST /agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/triggerCreates a new SNMP Trigger for the sensor.
+ +For instance, to receive a notification when the value of the sensor is above a threshold x, it is required to add a trigger specifying the function_id = 2 (is greater than) and the operand value equals to [x]. +The function_id value can be retrieved with the listEyesSNMPTriggerFunction call. +To activate the alert, it is required to call createEyeSNMPTriggerAlert after the trigger creation.
+ ++
+Body parameter
+
+{ + "function_id": 0, + "name": "string", + "operands": [ + "string" + ] +} +Curl
+ ++
+ ++curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger \ + -H 'Content-Type: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ ++
+ ++ + +Parameter +In +Type +Required +Description ++ +agent_id +path +integer(int32) +true +Agent ID ++ +device_id +path +integer(int32) +true +Device ID ++ +sensor_id +path +integer(int32) +true +SNMP Eye ID ++ +body +body +SNMPDomotzSnmpTriggerCreation +true +none +Responses
+ ++
++ + +Status +Meaning +Description +Schema ++ +201 +Created +none +None +deleteEyeSNMPTrigger
+ + ++
+Code samples
+curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id} \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}', + method: 'delete', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); + +const headers = { + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}', +{ + method: 'DELETE', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'X-Api-Key': 'API_KEY' +} + +r = requests.delete('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.delete 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("DELETE", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +DELETE /agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}Deletes the SNMP Trigger for the sensor
+ +Curl
+ ++
+ ++curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id} \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ ++
+ ++ + +Parameter +In +Type +Required +Description ++ +agent_id +path +integer(int32) +true +Agent ID ++ +device_id +path +integer(int32) +true +Device ID ++ +sensor_id +path +integer(int32) +true +SNMP Eye ID ++ +trigger_id +path +integer(int32) +true +SNMP Eye Trigger ID +Responses
+ ++
++ + +Status +Meaning +Description +Schema ++ +204 +No Content +none +None +deleteEyeSNMPTriggerAlert
+ + ++
+Code samples
+curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name} \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name}', + method: 'delete', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); + +const headers = { + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name}', +{ + method: 'DELETE', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'X-Api-Key': 'API_KEY' +} + +r = requests.delete('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name}', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.delete 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name}', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("DELETE", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name}", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +DELETE /agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name}Deletes the alert for thee SNMP Trigger
+ +Curl
+ ++
+ ++curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name} \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ ++
++ + +Parameter +In +Type +Required +Description ++ +agent_id +path +integer(int32) +true +Agent ID ++ +device_id +path +integer(int32) +true +Device ID ++ +sensor_id +path +integer(int32) +true +SNMP Eye ID ++ +trigger_id +path +integer(int32) +true +SNMP Eye Trigger ID ++ +medium_name +path +string +true +the name of the medium +Enumerated Values
++
+ ++ + +Parameter +Value ++ +medium_name +email ++ +medium_name +mobile +Responses
+ ++
++ + +Status +Meaning +Description +Schema ++ +204 +No Content +none +None +createEyeSNMPTriggerAlert
+ + ++
+Code samples
+curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name} \ + -H 'Content-Type: application/json' \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'Content-Type':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name}', + method: 'post', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); +const inputBody = '{}'; +const headers = { + 'Content-Type':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name}', +{ + method: 'POST', + body: inputBody, + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'Content-Type': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.post('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name}', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'Content-Type' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.post 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name}', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Content-Type": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("POST", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name}", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +POST /agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name}Add an alert to a SNMP Trigger
+ ++
+Body parameter
+
+{} +Curl
+ ++
+ ++curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name} \ + -H 'Content-Type: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ ++
++ + +Parameter +In +Type +Required +Description ++ +agent_id +path +integer(int32) +true +Agent ID ++ +device_id +path +integer(int32) +true +Device ID ++ +sensor_id +path +integer(int32) +true +SNMP Eye ID ++ +trigger_id +path +integer(int32) +true +SNMP Eye Trigger ID ++ +medium_name +path +string +true +the name of the medium ++ +body +body +SNMPDomotzSnmpTriggerAlertCreation +true +none +Enumerated Values
++
+ ++ + +Parameter +Value ++ +medium_name +email ++ +medium_name +mobile +Responses
+ ++
++ + +Status +Meaning +Description +Schema ++ +201 +Created +none +None +listEyesTCP
+ + ++
+Code samples
+curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); + +const headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'Accept': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +GET /agent/{agent_id}/device/{device_id}/eye/tcpRetrieves the list of configured TCP Domotz Eyes
+ +Curl
+ ++
+ ++curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ ++
+ ++ + +Parameter +In +Type +Required +Description ++ +agent_id +path +integer(int32) +true +Agent ID ++ +device_id +path +integer(int32) +true +Device ID ++
+Example responses
+ +200 Response
+
+[ + { + "id": 0, + "last_update": "2019-08-24T14:15:22Z", + "port": 0, + "status": "UP" + } +] +Responses
+ ++
+ ++ + +Status +Meaning +Description +Schema ++ +200 +OK +The list of configured TCP Domotz Eyes for the device and their latest values +Inline +Response Schema
+ +Status Code 200
+ ++
++ + +Name +Type +Required +Description ++ +anonymous +[TCPDomotzEye] +false +[Information about a configured TCP Domotz Eye] ++ +» id +integer(int32) +true +The unique identifier of the TCP Domotz Eye ++ +» last_update +string(date-time) +true +The timestamp of the latest update ++ +» port +integer(int32) +true +The port number ++ +» status +string +true +The status of the TCP service +Enumerated Values
++
++ + +Property +Value ++ +status +UP ++ +status +DOWN +createEyeTCP
+ + ++
+Code samples
+curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp \ + -H 'Content-Type: application/json' \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'Content-Type':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp', + method: 'post', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); +const inputBody = '{ + "port": 0 +}'; +const headers = { + 'Content-Type':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp', +{ + method: 'POST', + body: inputBody, + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'Content-Type': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.post('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'Content-Type' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.post 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Content-Type": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("POST", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +POST /agent/{agent_id}/device/{device_id}/eye/tcpCreates a new TCP Domotz Eyes
+ ++
+Body parameter
+
+{ + "port": 0 +} +Curl
+ ++
+ ++curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp \ + -H 'Content-Type: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ ++
+ ++ + +Parameter +In +Type +Required +Description ++ +agent_id +path +integer(int32) +true +Agent ID ++ +device_id +path +integer(int32) +true +Device ID ++ +body +body +TCPDomotzEyeCreation +true +none +Responses
+ ++
++ + +Status +Meaning +Description +Schema ++ +201 +Created +none +None +deleteEyeTCP
+ + ++
+Code samples
+curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp/{service_id} \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp/{service_id}', + method: 'delete', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); + +const headers = { + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp/{service_id}', +{ + method: 'DELETE', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'X-Api-Key': 'API_KEY' +} + +r = requests.delete('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp/{service_id}', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.delete 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp/{service_id}', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("DELETE", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp/{service_id}", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +DELETE /agent/{agent_id}/device/{device_id}/eye/tcp/{service_id}Deletes the TCP Domotz Eye
+ +Curl
+ ++
+ ++curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp/{service_id} \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ ++
+ ++ + +Parameter +In +Type +Required +Description ++ +agent_id +path +integer(int32) +true +Agent ID ++ +device_id +path +integer(int32) +true +Device ID ++ +service_id +path +integer(int32) +true +TCP Eye ID +Responses
+ ++
++ + +Status +Meaning +Description +Schema ++ +204 +No Content +none +None +eyesUsageInfo
+ + ++
+Code samples
+curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/eye-statistics \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/eye-statistics', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); + +const headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/eye-statistics', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'Accept': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/eye-statistics', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/eye-statistics', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/eye-statistics", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +GET /agent/{agent_id}/eye-statisticsRetrieves information about Domotz Eyes usage and limits
+ +Curl
+ ++
+ ++curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/eye-statistics \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ ++
+ ++ + +Parameter +In +Type +Required +Description ++ +agent_id +path +integer(int32) +true +Agent ID ++
+Example responses
+ +200 Response
+
+{ + "limit": 0, + "usage": { + "snmp": 0, + "tcp": 0, + "total": 0 + } +} +Responses
+ ++
+ ++ + +Status +Meaning +Description +Schema ++ +200 +OK +A data structure containing information about current Domotz Eyes usage and limits +DomotzEyesUsageInformation +multimedia
+onvifSnapshot
+ + ++
+Code samples
+curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot \ + -H 'Accept: image/*' \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'Accept':'image/*', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); + +const headers = { + 'Accept':'image/*', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'Accept': 'image/*', + 'X-Api-Key': 'API_KEY' +} + +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'image/*', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"image/*"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +GET /agent/{agent_id}/device/{device_id}/multimedia/camera/snapshotTake a snapshot of the camera. Internally, a device connection is established.Current consumption and consumption limits can be retrieved with a call to getConnectionConsumption endpoint
+ +Curl
+ ++
+ ++curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot \ + -H 'Accept: image/*' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ ++
+ ++ + +Parameter +In +Type +Required +Description ++ +agent_id +path +integer(int32) +true +Agent ID ++ +device_id +path +integer(int32) +true +Device ID ++
+ +Example responses
+ +200 Response
+Responses
+ ++
+ ++ + +Status +Meaning +Description +Schema ++ +200 +OK +A binary image +string +company
+moveAgent
+ + ++
+Code samples
+curl -X PUT http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/ownership/team/{team_id} \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/ownership/team/{team_id}', + method: 'put', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); + +const headers = { + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/ownership/team/{team_id}', +{ + method: 'PUT', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'X-Api-Key': 'API_KEY' +} + +r = requests.put('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/ownership/team/{team_id}', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.put 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/ownership/team/{team_id}', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("PUT", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/ownership/team/{team_id}", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +PUT /agent/{agent_id}/ownership/team/{team_id}Moves an agent under the control of a different team
+ +Curl
+ ++
+ ++curl -X PUT http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/ownership/team/{team_id} \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ ++
+ ++ + +Parameter +In +Type +Required +Description ++ +agent_id +path +integer(int32) +true +Agent ID ++ +team_id +path +integer(int32) +true +Team ID +Responses
+ ++
++ + +Status +Meaning +Description +Schema ++ +204 +No Content +none +None +listAreas
+ + ++
+Code samples
+curl -X GET http://172.17.0.1:9080/public-api/v1/area \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/area', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); + +const headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/area', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'Accept': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.get('http://172.17.0.1:9080/public-api/v1/area', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/area', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/area", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +GET /areaReturns all the areas of a Company
+ ++
+Example responses
+ +200 Response
+
+[ + { + "id": 0, + "name": "string" + } +] +Responses
+ ++
+ ++ + +Status +Meaning +Description +Schema ++ +200 +OK +The list of all the areas in the User's Company +Inline +Response Schema
+ +Status Code 200
+ ++
++ + +Name +Type +Required +Description ++ +anonymous +[Area] +false +[Represents an area of the Company] ++ +» id +integer(int32) +true +The identifier of the Area ++ +» name +string +true +The name of the Area +listTeams
+ + ++
+Code samples
+curl -X GET http://172.17.0.1:9080/public-api/v1/area/{area_id}/team \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/area/{area_id}/team', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); + +const headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/area/{area_id}/team', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'Accept': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.get('http://172.17.0.1:9080/public-api/v1/area/{area_id}/team', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/area/{area_id}/team', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/area/{area_id}/team", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +GET /area/{area_id}/teamReturns all the teams of an Area
+ +Curl
+ ++
+ ++curl -X GET http://172.17.0.1:9080/public-api/v1/area/{area_id}/team \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ ++
+ ++ + +Parameter +In +Type +Required +Description ++ +area_id +path +integer(int32) +true +Area ID ++
+Example responses
+ +200 Response
+
+[ + { + "id": 0, + "name": "string" + } +] +Responses
+ ++
+ ++ + +Status +Meaning +Description +Schema ++ +200 +OK +The list of all the teams in a Company Area's +Inline +Response Schema
+ +Status Code 200
+ ++
++ + +Name +Type +Required +Description ++ +anonymous +[Team] +false +[Represents a team of the Company] ++ +» id +integer(int32) +true +The identifier of the Team ++ +» name +string +true +The name of the Team +createTeam
+ + ++
+Code samples
+curl -X POST http://172.17.0.1:9080/public-api/v1/area/{area_id}/team \ + -H 'Content-Type: application/json' \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'Content-Type':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/area/{area_id}/team', + method: 'post', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); +const inputBody = '{ + "leader": { + "details": { + "display_name": "string" + }, + "name": "string", + "password": "string" + }, + "name": "string" +}'; +const headers = { + 'Content-Type':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/area/{area_id}/team', +{ + method: 'POST', + body: inputBody, + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'Content-Type': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.post('http://172.17.0.1:9080/public-api/v1/area/{area_id}/team', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'Content-Type' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.post 'http://172.17.0.1:9080/public-api/v1/area/{area_id}/team', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Content-Type": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("POST", "http://172.17.0.1:9080/public-api/v1/area/{area_id}/team", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +POST /area/{area_id}/teamCreates a new Team
+ ++
+Body parameter
+
+{ + "leader": { + "details": { + "display_name": "string" + }, + "name": "string", + "password": "string" + }, + "name": "string" +} +Curl
+ ++
+ ++curl -X POST http://172.17.0.1:9080/public-api/v1/area/{area_id}/team \ + -H 'Content-Type: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ ++
+ ++ + +Parameter +In +Type +Required +Description ++ +area_id +path +integer(int32) +true +Area ID ++ +body +body +TeamCreation +true +none +Responses
+ ++
+ ++ + +Status +Meaning +Description +Schema ++ +201 +Created +none +None +alert profiles
+getAgentAlertProfile
+ + ++
+Code samples
+curl -X GET http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id} \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id}', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); + +const headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id}', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'Accept': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.get('http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id}', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id}', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id}", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +GET /alert-profile/binding/agent/{agent_id}Get the alert profile bindings of an agent
+ +Curl
+ ++
+ ++curl -X GET http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id} \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ ++
+ ++ + +Parameter +In +Type +Required +Description ++ +agent_id +path +integer(int32) +true +Agent ID ++
+Example responses
+ +200 Response
+
+[ + { + "alert_profile_id": 0 + } +] +Responses
+ ++
+ ++ + +Status +Meaning +Description +Schema ++ +200 +OK +The alert profile bindings of an agent +Inline +Response Schema
+ +Status Code 200
+ ++
++ + +Name +Type +Required +Description ++ +anonymous +[AlertProfileAgentBinding] +false +none ++ +» alert_profile_id +integer(int32) +true +The id of the alert profile +getDevicesAlertProfile
+ + ++
+Code samples
+curl -X GET http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id}/device \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id}/device', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); + +const headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id}/device', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'Accept': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.get('http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id}/device', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id}/device', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id}/device", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +GET /alert-profile/binding/agent/{agent_id}/deviceGet the alert profile bindings of the devices of an agent
+ +Curl
+ ++
+ ++curl -X GET http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id}/device \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ ++
+ ++ + +Parameter +In +Type +Required +Description ++ +agent_id +path +integer(int32) +true +Agent ID ++
+Example responses
+ +200 Response
+
+[ + { + "alert_profile_id": 0, + "device_id": 0 + } +] +Responses
+ ++
+ ++ + +Status +Meaning +Description +Schema ++ +200 +OK +The alert profile bindings for all devices of the agent +Inline +Response Schema
+ +Status Code 200
+ ++
++ + +Name +Type +Required +Description ++ +anonymous +[AlertProfileDeviceBinding] +false +none ++ +» alert_profile_id +integer(int32) +true +The id of the alert profile ++ +» device_id +integer(int32) +true +none +unbindAlertProfileFromAgent
+ + ++
+Code samples
+curl -X DELETE http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id} \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', + method: 'delete', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); + +const headers = { + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', +{ + method: 'DELETE', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'X-Api-Key': 'API_KEY' +} + +r = requests.delete('http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.delete 'http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("DELETE", "http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +DELETE /alert-profile/{alert_profile_id}/binding/agent/{agent_id}Unbind an alert profile from an agent.
+ +Curl
+ ++
+ ++curl -X DELETE http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id} \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ ++
+ ++ + +Parameter +In +Type +Required +Description ++ +agent_id +path +integer(int32) +true +Agent ID ++ +alert_profile_id +path +integer(int32) +true +Profile ID +Responses
+ ++
++ + +Status +Meaning +Description +Schema ++ +204 +No Content +none +None +bindAlertProfileToAgent
+ + ++
+Code samples
+curl -X POST http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id} \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', + method: 'post', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); + +const headers = { + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', +{ + method: 'POST', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'X-Api-Key': 'API_KEY' +} + +r = requests.post('http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.post 'http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("POST", "http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +POST /alert-profile/{alert_profile_id}/binding/agent/{agent_id}Bind an alert profile to an agent. After binding, a webhook will be sent to the configured service when one of the events associated to the profile occurs. You can configure the profile and the webhook endpoint on the Domotz Portal
+ +Curl
+ ++
+ ++curl -X POST http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id} \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ ++
+ ++ + +Parameter +In +Type +Required +Description ++ +agent_id +path +integer(int32) +true +Agent ID ++ +alert_profile_id +path +integer(int32) +true +Profile ID +Responses
+ ++
+ ++ + +Status +Meaning +Description +Schema ++ +204 +No Content +none +None ++ ++Webhook Events
+ ++ +
+ ++ + + + +Event Name +Method +Schema +Expected Reply ++ + +agent_device_discovery +POST +DeviceDiscoveryEvent +201 ++ + +agent_security_issue +POST +AgentSecurityIssueEvent +201 ++ + +agent_speed_test +POST +AgentSpeedTestEvent +201 ++ + + +agent_status +POST +AgentStatusEvent +201 +unbindAlertProfileFromDevice
+ + ++
+Code samples
+curl -X DELETE http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id} \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', + method: 'delete', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); + +const headers = { + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', +{ + method: 'DELETE', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'X-Api-Key': 'API_KEY' +} + +r = requests.delete('http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.delete 'http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("DELETE", "http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +DELETE /alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}Unbind an alert profile from a device
+ +Curl
+ ++
+ ++curl -X DELETE http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id} \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ ++
+ ++ + +Parameter +In +Type +Required +Description ++ +agent_id +path +integer(int32) +true +Agent ID ++ +alert_profile_id +path +integer(int32) +true +Profile ID ++ +device_id +path +integer(int32) +true +Device ID +Responses
+ ++
++ + +Status +Meaning +Description +Schema ++ +204 +No Content +none +None +bindAlertProfileToDevice
+ + ++
+Code samples
+curl -X POST http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id} \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', + method: 'post', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); + +const headers = { + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', +{ + method: 'POST', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'X-Api-Key': 'API_KEY' +} + +r = requests.post('http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.post 'http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("POST", "http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +POST /alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}Bind an alert profile to a device. After binding, a webhook will be sent to the configured service when one of the events associated to the profile occurs. You can configure the profile and the webhook endpoint on the Domotz Portal
+ +Curl
+ ++
+ ++curl -X POST http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id} \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ ++
+ ++ + +Parameter +In +Type +Required +Description ++ +agent_id +path +integer(int32) +true +Agent ID ++ +alert_profile_id +path +integer(int32) +true +Profile ID ++ +device_id +path +integer(int32) +true +Device ID +Responses
+ ++
+ ++ + +Status +Meaning +Description +Schema ++ +204 +No Content +none +None ++ ++Webhook Events
+ ++ +
+ ++ + + + +Event Name +Method +Schema +Expected Reply ++ + +device_configuration_change +POST +DeviceConfigurationChangeEvent +201 ++ + +device_configuration_misalignment +POST +DeviceConfigurationMisalignmentEvent +201 ++ + +device_heartbeat_lost +POST +DeviceHeartbeatLostEvent +201 ++ + +device_ip_change +POST +DeviceIPChangeEvent +201 ++ + +device_rtd +POST +DeviceRTDIssueEvent +201 ++ + +device_snmp +POST +DeviceSNMPEvent +201 ++ + +device_status +POST +DeviceStatusChangeEvent +201 ++ + + +device_tcp +POST +DeviceTCPEvent +201 +getAlertProfiles
+ + ++
+Code samples
+curl -X GET http://172.17.0.1:9080/public-api/v1/user/{user_id}/alert-profile \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/user/{user_id}/alert-profile', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); + +const headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/user/{user_id}/alert-profile', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'Accept': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.get('http://172.17.0.1:9080/public-api/v1/user/{user_id}/alert-profile', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/user/{user_id}/alert-profile', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/user/{user_id}/alert-profile", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +GET /user/{user_id}/alert-profileReturns the list of configured alert profiles. You can configure alert profiles on the Domotz Portal. Alert profiles define the association between a list of events and a notification channel (email, webhook or slack)
+ +Curl
+ ++
+ ++curl -X GET http://172.17.0.1:9080/public-api/v1/user/{user_id}/alert-profile \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ ++
+ ++ + +Parameter +In +Type +Required +Description ++ +user_id +path +integer(int32) +true +User ID ++
+Example responses
+ +200 Response
+
+[ + { + "description": "string", + "events": [ + "device_status" + ], + "id": 0, + "is_enabled": true, + "name": "string", + "tag": "string" + } +] +Responses
+ ++
+ ++ + +Status +Meaning +Description +Schema ++ +200 +OK +The list of configured alert profiles +Inline +Response Schema
+ +Status Code 200
+ ++
+ ++ + +Name +Type +Required +Description ++ +anonymous +[AlertProfile] +false +none ++ +» description +string +false +The description of the alert profile ++ +» events +[string] +false +The list of events associated to the profile ++ +» id +integer(int32) +true +The id of the event profile ++ +» is_enabled +boolean +false +true if the event profile is enabled, false otherwise ++ +» name +string +false +The symbolic name associated to the profile ++ +» tag +string +false +A label associated to the profile +meta
+apiUsageInfo
+ + ++
+Code samples
+curl -X GET http://172.17.0.1:9080/public-api/v1/meta/usage \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/meta/usage', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); + +const headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/meta/usage', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'Accept': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.get('http://172.17.0.1:9080/public-api/v1/meta/usage', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/meta/usage', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/meta/usage", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +GET /meta/usageRetrieves information about API usage and limits
+ ++
+Example responses
+ +200 Response
+
+{ + "by_ip": [ + { + "count": 0, + "name": "string" + } + ], + "by_key": [ + { + "count": 0, + "id": 0, + "name": "string" + } + ], + "by_resource": [ + { + "count": 0, + "name": "string" + } + ], + "concurrent_allowed": 0, + "daily_limit": 0, + "daily_usage": 0 +} +Responses
+ ++
+ ++ + +Status +Meaning +Description +Schema ++ +200 +OK +A data structure containing information about current API usage and usage limits +APIUsageInformation +assets
+listDeviceBaseTypes
+ + ++
+Code samples
+curl -X GET http://172.17.0.1:9080/public-api/v1/type/device/base \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/type/device/base', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); + +const headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/type/device/base', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'Accept': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.get('http://172.17.0.1:9080/public-api/v1/type/device/base', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/type/device/base', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/type/device/base", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +GET /type/device/baseReturns the device types list
+ ++
+Example responses
+ +200 Response
+
+[ + { + "id": 0, + "identifier": "string", + "label": "string", + "vital": true + } +] +Responses
+ ++
+ ++ + +Status +Meaning +Description +Schema ++ +200 +OK +The types list +Inline +Response Schema
+ +Status Code 200
+ ++
++ + +Name +Type +Required +Description ++ +anonymous +[DeviceBaseType] +false +[A device type, either set by the user or as identified by the Domotz system] ++ +» id +integer(int32) +false +An unique identifier of the type, referred in the +Deviceentity+ +» identifier +string +false +The name of the type ++ +» label +string +false +A human-readable short description of the type ++ +» vital +boolean +false +Whether a device of this type will be marked as +VITALas soon as recognisedlistDeviceDetectedTypes
+ + ++
+Code samples
+curl -X GET http://172.17.0.1:9080/public-api/v1/type/device/detected \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/type/device/detected', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); + +const headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/type/device/detected', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'Accept': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.get('http://172.17.0.1:9080/public-api/v1/type/device/detected', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/type/device/detected', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/type/device/detected", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +GET /type/device/detectedReturns the detected device types list
+ ++
+Example responses
+ +200 Response
+
+[ + { + "capabilities": [ + "string" + ], + "id": 0, + "identifier": "string", + "label": "string", + "type_id": 0 + } +] +Responses
+ ++
+ ++ + +Status +Meaning +Description +Schema ++ +200 +OK +The types list +Inline +Response Schema
+ +Status Code 200
+ ++
+ ++ + +Name +Type +Required +Description ++ +anonymous +[DetectedDeviceType] +false +[A device type, detected by the Domotz device identification feature] ++ +» capabilities +[string] +false +The features of the device ++ +» id +integer(int32) +false +An unique identifier of the type, referred in the +Deviceentity+ +» identifier +string +false +The name of the type ++ +» label +string +false +A human-readable short description of the type ++ +» type_id +integer(int32) +false +The corresponding +device typeuser
+getUser
+ + ++
+Code samples
+curl -X GET http://172.17.0.1:9080/public-api/v1/user \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/user', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +const fetch = require('node-fetch'); + +const headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/user', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +import requests +headers = { + 'Accept': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.get('http://172.17.0.1:9080/public-api/v1/user', params={ + +}, headers = headers) + +print r.json() + +require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/user', + params: { + }, headers: headers + +p JSON.parse(result) + +
+package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/user", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +
+ +GET /userReturns the User information
+ ++
+Example responses
+ +200 Response
+
+{ + "id": 0, + "name": "string" +} +Responses
+ ++
++ + +Status +Meaning +Description +Schema ++ +200 +OK +The user +User +Schemas
+APIUsageInformation
+ + +
+{ + "by_ip": [ + { + "count": 0, + "name": "string" + } + ], + "by_key": [ + { + "count": 0, + "id": 0, + "name": "string" + } + ], + "by_resource": [ + { + "count": 0, + "name": "string" + } + ], + "concurrent_allowed": 0, + "daily_limit": 0, + "daily_usage": 0 +} + +Information about Domotz API current usage and usage limits
+Properties
++
+ ++ + +Name +Type +Required +Description ++ +by_ip +[object] +false +none ++ +» count +integer(int32) +false +The number of calls originated from that IP address ++ +» name +string +false +The IP address ++ +by_key +[object] +false +none ++ +» count +integer(int32) +false +The number of calls done using this key in the last 24 hours ++ +» id +integer(int32) +false +The ID of the API key ++ +» name +string +false +The mnemonic API key name ++ +by_resource +[object] +false +none ++ +» count +integer(int32) +false +The number of calls for the resource ++ +» name +string +false +The base resource name ++ concurrent_allowed +integer(int32) +false Number of allowed calls to the API in a minute. - +daily_limit +daily_limit +integer(int32) +false +Number of allowed calls to the API in a 24 hours span. ++ +daily_usage +integer(int32) +false +Number of API call performed in the last 24 hours. +AbstractDevice
+ + +
+{ + "authentication_status": "AUTHENTICATED", + "details": { + "room": "string", + "snmp_read_community": "string", + "snmp_write_community": "string", + "zone": "string" + }, + "display_name": "string", + "first_seen_on": "2019-08-24T14:15:22Z", + "id": 0, + "importance": "VITAL", + "main_id": 0, + "protocol": "IP", + "type": { + "detected_id": 0, + "id": 0 + }, + "user_data": { + "model": "string", + "name": "string", + "type": 0, + "vendor": "string" + } +} + +Base abstract class for all devices
+Properties
++
++ + +Name +Type +Required +Description ++ +authentication_status +string +false +When defined the device requires authentication info to perform extended discovery +- REQUIRED: the device requires authentication, extended discovery is locked
- PENDING: credentials have been submitted but not verified yet
- WRONG_CREDENTIALS: device authentication failed
- AUTHENTICATED: device authentication succeeded
+ +details +object +false +DeviceDetails ++ +» room +string +false +none ++ +» snmp_read_community +string +false +Deprecated. Please use getSNMPAuthentication ++ +» snmp_write_community +string +false +Deprecated. Please use getSNMPAuthentication ++ +» zone +string +false +none ++ +display_name +string +true +none ++ +first_seen_on +string(date-time) +false +none ++ +id +integer(int32) +true +none ++ +importance +string +false +none ++ +main_id +integer(int32) +false +In a clustered configuration, the main device id ++ +protocol +string +true +none ++ +type +object +false +The device type, if recognised by domotz ++ +» detected_id +integer(int32) +false +none ++ +» id +integer(int32) +false +none ++ +user_data +object +false +none ++ +» model +string +false +none ++ +» name +string +false +none ++ +» type +integer(int32) +false +none ++ +» vendor +string +false +none +Enumerated Values
++
+ ++ + +Property +Value ++ +authentication_status +AUTHENTICATED ++ +authentication_status +NO_AUTHENTICATION ++ +authentication_status +PENDING ++ +authentication_status +REQUIRED ++ +authentication_status +WRONG_CREDENTIALS ++ +importance +VITAL ++ +importance +FLOATING ++ +protocol +IP ++ +protocol +DUMMY ++ +protocol +IP_EXTERNAL +AgentBase
+ + +{ + "access_right": { + "api_enabled": true, + "granting_user": { + "name": "user@example.com" + }, + "status": "OWNED" + }, + "creation_time": "2019-08-24T14:15:22Z", + "display_name": "string", + "id": 0, + "licence": { + "activation_time": "2019-08-24T14:15:22Z", + "bound_mac_address": "string", + "code": "string", + "expiration_time": "2019-08-24T14:15:22Z", + "id": 0 + }, + "location": { + "latitude": "string", + "longitude": "string" + }, + "status": { + "last_change": "2019-08-24T14:15:22Z", + "value": "ONLINE" + }, + "team": { + "area": { + "id": 0 + }, + "id": 0, + "leader_id": 0, + "name": "string" + }, + "timezone": "string", + "version": { + "agent": "string", + "package": "string" + } +} + +Properties
++
++ + +Name +Type +Required +Description ++ +access_right +object +false +none ++ +» api_enabled +boolean +false +If +falsethe agent plan doesn't allow for API access: you only can see this agent in the list+ +» granting_user +object +false +none ++ +»» name +string(email) +false +none ++ +» status +string +false + +- OWNED: you own this agent
- PROPOSED: the owner proposed you to access the agent, you can accept or reject the offer
- GRANTED: you accepted the collaboration request for this agent
- ASSIGNED: your team leader has given you access to the agent
+ +creation_time +string(date-time) +false +none ++ +display_name +string +true +none ++ +id +integer(int32) +true +none ++ +licence +object +false +none ++ +» activation_time +string(date-time) +false +none ++ +» bound_mac_address +string +false +The MAC address of the primary interface of the device the software agent runs on ++ +» code +string +false +none ++ +» expiration_time +string(date-time) +false +none ++ +» id +integer(int32) +false +none ++ +location +object +false +none ++ +» latitude +string +false +none ++ +» longitude +string +false +none ++ +status +object +false +none ++ +» last_change +string(date-time) +false +none ++ +» value +string +false +none ++ +team +object +false +The Team and Company Area information, only available for companies ++ +» area +object +false +none ++ +»» id +integer(int32) +false +none ++ +» id +integer(int32) +false +none ++ +» leader_id +integer(int32) +false +none ++ +» name +string +false +none ++ +timezone +string +false +none ++ +version +object +false +none ++ +» agent +string +false +none ++ +» package +string +false +none +Enumerated Values
++
+ ++ + +Property +Value ++ +status +OWNED ++ +status +GRANTED ++ +status +PROPOSED ++ +status +ASSIGNED ++ +value +ONLINE ++ +value +OFFLINE +AgentDetail
+ + +{ + "access_right": { + "api_enabled": true, + "granting_user": { + "name": "user@example.com" + }, + "status": "OWNED" + }, + "creation_time": "2019-08-24T14:15:22Z", + "display_name": "string", + "id": 0, + "licence": { + "activation_time": "2019-08-24T14:15:22Z", + "bound_mac_address": "string", + "code": "string", + "expiration_time": "2019-08-24T14:15:22Z", + "id": 0 + }, + "location": { + "latitude": "string", + "longitude": "string" + }, + "status": { + "last_change": "2019-08-24T14:15:22Z", + "value": "ONLINE" + }, + "team": { + "area": { + "id": 0 + }, + "id": 0, + "leader_id": 0, + "name": "string" + }, + "timezone": "string", + "version": { + "agent": "string", + "package": "string" + }, + "listen_on": "string" +} + +Properties
+allOf
+ ++
+ ++ + +Name +Type +Required +Description ++ +anonymous +AgentBase +false +none +and
+ ++
+ ++ + +Name +Type +Required +Description ++ +anonymous +object +false +none ++ +» listen_on +string +false +The local IP and port the Domotz Agent software is listening on if online - the last known value otherwise ++ +» location +object +false +none ++ +»» latitude +string +false +none ++ +»» longitude +string +false +none +AgentHistory
+ + +{ + "timestamp": "2019-08-24T14:15:22Z", + "type": "CONNECTION_RECOVERED" +} + +Properties
++
++ + +Name +Type +Required +Description ++ +timestamp +string(date-time) +true +The time the sample was reported to Domotz ++ +type +string +true +The agent event type +Enumerated Values
++
+ ++ + +Property +Value ++ +type +CONNECTION_RECOVERED ++ +type +CONNECTION_LOST ++ +type +UP ++ +type +DOWN +AgentSecurityIssueEvent
+ + +
+{ + "data": { + "agent_id": 0, + "value": [ + { + "port": 0, + "type": "TCP_OPEN_PORT" + } + ] + }, + "name": "agent_security_issue", + "timestamp": "2019-08-24T14:15:22Z" +} + +Triggered when Domotz detects a security issue
+Properties
++
++ + +Name +Type +Required +Description ++ +data +object +false +none ++ » agent_id integer(int32) false -Number of allowed calls to the API in a 24 hours span. +The idof theagent- +daily_usage +» value +[object] +false +none ++ +»» port integer(int32) false -Number of API call performed in the last 24 hours. +none ++ +»» type +string +false +none ++ +» name +string +true +none ++ +» timestamp +string(date-time) +true +The timestamp of the event +Enumerated Values
++
-+ + +Property +Value ++ +type +TCP_OPEN_PORT ++ +type +UPNP_IGD_FORWARD ++ +type +UPNP_IGD_SERVICE ++ name +agent_security_issue AbstractDevice
+AgentSpeedTestEvent
- +
-{ - "authentication_status": "AUTHENTICATED", - "details": { - "room": "string", - "snmp_read_community": "string", - "snmp_write_community": "string", - "zone": "string" - }, - "display_name": "string", - "first_seen_on": "2019-06-11T09:08:10Z", - "id": 0, - "importance": "VITAL", - "main_id": 0, - "protocol": "IP", - "type": { - "detected_id": 0, - "id": 0 + "data": { + "agent_id": 0, + "status": "SPEED_TEST_ISSUE_DETECTED", + "threshold": { + "download": 0, + "upload": 0 + }, + "value": { + "download": 0, + "upload": 0 + } }, - "user_data": { - "model": "string", - "name": "string", - "type": 0, - "vendor": "string" - } + "name": "agent_speed_test", + "timestamp": "2019-08-24T14:15:22Z" }Base abstract class for all devices
-Properties
+Triggered when the measured Internet speed goes below the defined threshold
+Properties
+Name @@ -6881,103 +12500,148 @@Properties
- authentication_status -string +data +object false -When defined the device requires authentication info to perform extended discovery +- REQUIRED: the device requires authentication, extended discovery is locked
- PENDING: credentials have been submitted but not verified yet
- WRONG_CREDENTIALS: device authentication failed
- AUTHENTICATED: device authentication succeeded
none - details -DeviceDetails +» agent_id +integer(int32) false -none +The idof theagent- display_name +» status string -true +false none - first_seen_on -string(date-time) +» threshold +object false none - id +»» download integer(int32) -true -none +false +The configured download threshold - +importance -string +»» upload +integer(int32) +false +The configured upload threshold ++ » value +object false none - main_id +»» download integer(int32) false -In a clustered configuration, the main device id +The measured download value - +protocol +»» upload +integer(int32) +false +The measured upload value ++ » name string true none - +type -object -false -The device type, if recognised by domotz +» timestamp +string(date-time) +true +The timestamp of the event Enumerated Values
+
+ +- +» detected_id -integer(int32) -false -none +Property +Value - » id -integer(int32) -false -none +status +SPEED_TEST_ISSUE_DETECTED - +user_data +status +SPEED_TEST_ISSUE_RESOLVED ++ +name +agent_speed_test +AgentStatusEvent
+ + +
+{ + "data": { + "agent_id": 0, + "value": "UP" + }, + "name": "agent_status", + "timestamp": "2019-08-24T14:15:22Z" +} + +Triggered when the agent connectivity status changes
+Properties
++
-+ + +Name +Type +Required +Description ++ data object false none - » model -string +» agent_id +integer(int32) false -none +The idof theagent- » name +» value string false none - » type -integer(int32) -false +name +string +true none - » vendor -string -false -none +timestamp +string(date-time) +true +The timestamp of the event Enumerated Values
+Enumerated Values
+ +Property @@ -6985,88 +12649,107 @@Enumerated Values
- authentication_status -AUTHENTICATED +value +UP - authentication_status -NO_AUTHENTICATION +value +DOWN - +authentication_status -PENDING +name +agent_status AgentVPNActiveConnection
+ + +{ + "bytes": 0, + "creation_time": "2019-08-24T14:15:22Z", + "expiration_time": "2019-08-24T14:15:22Z", + "id": 0, + "name": "string", + "status": "ACTIVE" +} + +Properties
+
- -- +authentication_status -REQUIRED +Name +Type +Required +Description - authentication_status -WRONG_CREDENTIALS +bytes +integer(int32) +true +Current VPN connection consumption (bytes) - importance -VITAL +creation_time +string(date-time) +true +none - importance -FLOATING +expiration_time +string(date-time) +true +none - protocol -IP +id +integer(int32) +true +The ID of the VPN connection - protocol -DUMMY +name +string +true +The user that started the VPN connection - protocol -IP_EXTERNAL +status +string +true +The status of the vpn connection AgentBase
- - -{ - "access_right": { - "api_enabled": true, - "granting_user": { - "name": "user@example.com" - }, - "status": "OWNED" - }, - "creation_time": "2019-06-11T09:08:10Z", - "display_name": "string", - "id": 0, - "licence": { - "activation_time": "2019-06-11T09:08:10Z", - "bound_mac_address": "string", - "code": "string", - "expiration_time": "2019-06-11T09:08:10Z", - "id": 0 - }, - "status": { - "last_change": "2019-06-11T09:08:10Z", - "value": "ONLINE" - }, - "team": { - "area": { - "id": 0 - }, - "id": 0, - "leader_id": 0, - "name": "string" - }, - "timezone": "string", - "version": { - "agent": "string", - "package": "string" - } +Enumerated Values
++
+ ++ + +Property +Value ++ +status +ACTIVE ++ +status +INACTIVE ++ +status +EXPIRED +AgentVPNConnection
+ + +{ + "allowed_ip": "string", + "routing_policy": "global" } -Properties
+Properties
+Name @@ -7076,169 +12759,274 @@AgentBase
- access_right -object -false -none +allowed_ip +string +true +The only public IP address allowed to access the connection. It will be impossible to use the connection from other IP addresses. You should use your public IP address. For httpandhttpsit is safe, since if you keep the connection link secret nobody will access the device. Fortcpit is not recommended because a random port scan on our servers may allow an hostile actor to use the connection, accessing the device's tcp port as if it was in the agent's network.- +» api_enabled -boolean -false -If +falsethe agent plan doesn't allow for API access: you only can see this agent in the listrouting_policy +string +true +The traffic routing policy for the VPN connection: - global: All the traffic is routed through the VPN On Demand. More consumption on the Domotz Cloud - local: Only LAN traffic passes through the VPN On Demand. Less consumption on the Domotz Cloud Enumerated Values
+
+ +- +» granting_user -object -false -none +Property +Value - »» name -string(email) -false -none +routing_policy +global - +» status -string -false - +- OWNED: you own this agent
- PROPOSED: the owner proposed you to access the agent, you can accept or reject the offer
- GRANTED: you accepted the collaboration request for this agent
- ASSIGNED: your team leader has given you access to the agent
routing_policy +local AlertProfile
+ + +{ + "description": "string", + "events": [ + "device_status" + ], + "id": 0, + "is_enabled": true, + "name": "string", + "tag": "string" +} + +Properties
+
+ +- +creation_time -string(date-time) -false -none +Name +Type +Required +Description - +display_name +description string -true -none +false +The description of the alert profile ++ events +[string] +false +The list of events associated to the profile id integer(int32) true -none +The id of the event profile - licence -object +is_enabled +boolean false -none +true if the event profile is enabled, false otherwise - » activation_time -string(date-time) +name +string false -none +The symbolic name associated to the profile - +» bound_mac_address +tag string false -The MAC address of the primary interface of the device the software agent runs on +A label associated to the profile AlertProfileAgentBinding
+ + +{ + "alert_profile_id": 0 +} + +Properties
+
+ +- +» code -string -false -none +Name +Type +Required +Description - +» expiration_time -string(date-time) -false -none +alert_profile_id +integer(int32) +true +The id of the alert profile +AlertProfileDeviceBinding
+ + +{ + "alert_profile_id": 0, + "device_id": 0 +} + +Properties
++
+ ++ +Name +Type +Required +Description - » id +alert_profile_id integer(int32) -false -none +true +The id of the alert profile - +status -object -false +device_id +integer(int32) +true none Area
+ + +
+{ + "id": 0, + "name": "string" +} + +Represents an area of the Company
+Properties
+
+ +- +» last_change -string(date-time) -false -none +Name +Type +Required +Description - » value -string -false -none +id +integer(int32) +true +The identifier of the Area - +team -object -false -The Team and Company Area information, only available for companies +name +string +true +The name of the Area ConnectionConsumption
+ + +{ + "current": 0, + "limit": 0 +} + +Properties
+
+ +- +» area -object -false -none +Name +Type +Required +Description - »» id +current integer(int32) -false -none +true +Current connection consumption (bytes) - +» id +limit integer(int32) -false -none +true +Maximum connection consumption (bytes) ConnectionSession
+ + +{ + "allowed_ip": "string", + "expiration": "2019-08-24T14:15:22Z", + "id": 0, + "link": "string", + "port": 0, + "protocol": "http" +} + +Properties
+
-- +» leader_id -integer(int32) -false -none +Name +Type +Required +Description - » name +allowed_ip string -false -none +true +The only public IP address allowed to access the connection. It will be impossible to use the connection from other IP addresses. You should use your public IP address. For httpandhttpsit is safe, since if you keep the connection link secret nobody will access the device. Fortcpit is not recommended because a random port scan on our servers may allow an hostile actor to use the connection, accessing the device's tcp port as if it was in the agent's network.- timezone -string +expiration +string(date-time) false -none +The time after which the connection will be closed - version -object -false -none +id +integer(int32) +true +The unique identifier of the connection- +» agent +link string false +Either the link to access the device's HTTP(s) interface in the browser or the host/port coordinates of the proxied TCP port, depending on the protocol (see protocol description in the request) ++ port +integer(int32) +true none - » package +protocol string -false -none +true +The protocol wrapped by the connection: - http/https: the linkfield in the reply will contain anhttpsURL. A browser or a similar user agent must be used: the client must have cookies enabled and the capability of following 302 redirects. If the protocol ishttpsthe device's certificate will be accepted without checks and its information ignored (our server will act as a proxy). - tcp: thelinkfield will be in the formtcp://{host}:{port}. Any connection established (e.g. withtelnetorssh) on these coordinates will be securely forwarded to the requestedportof the device. - ssh: thelinkfield will contain anhttpsURL. A browser or a similar user agent must be used: the client must have cookies enabled and the capability of following 302 redirects. - rdp: thelinkfield will contain anhttpsURL. A browser or a similar user agent must be used: the client must have cookies enabled and the capability of following 302 redirects.Enumerated Values
+Enumerated Values
-Property @@ -7246,79 +13034,43 @@Enumerated Values
- -status -OWNED -- status -GRANTED +protocol +http - status -PROPOSED +protocol +https - status -ASSIGNED +protocol +tcp - value -ONLINE +protocol +ssh - value -OFFLINE +protocol +rdp AgentDetail
+DetectedDeviceType
- +{ - "access_right": { - "api_enabled": true, - "granting_user": { - "name": "user@example.com" - }, - "status": "OWNED" - }, - "creation_time": "2019-06-11T09:08:10Z", - "display_name": "string", + "capabilities": [ + "string" + ], "id": 0, - "licence": { - "activation_time": "2019-06-11T09:08:10Z", - "bound_mac_address": "string", - "code": "string", - "expiration_time": "2019-06-11T09:08:10Z", - "id": 0 - }, - "status": { - "last_change": "2019-06-11T09:08:10Z", - "value": "ONLINE" - }, - "team": { - "area": { - "id": 0 - }, - "id": 0, - "leader_id": 0, - "name": "string" - }, - "timezone": "string", - "version": { - "agent": "string", - "package": "string" - }, - "listen_on": "string", - "location": { - "latitude": "string", - "longitude": "string" - } + "identifier": "string", + "label": "string", + "type_id": 0 } -Properties
-allOf
- +A device type, detected by the Domotz device identification feature
+Properties
-Name @@ -7328,15 +13080,50 @@AgentDetail
- +anonymous -AgentBase +capabilities +[string] false -none +The features of the device ++ +id +integer(int32) +false +An unique identifier of the type, referred in the +Deviceentity+ +identifier +string +false +The name of the type ++ +label +string +false +A human-readable short description of the type ++ type_id +integer(int32) +false +The corresponding device typeand
+DeviceBaseType
+ + +
+{ + "id": 0, + "identifier": "string", + "label": "string", + "vital": true +} +A device type, either set by the user or as identified by the Domotz system
+Properties
-Name @@ -7346,46 +13133,46 @@AgentDetail
- anonymous -object +id +integer(int32) false -none +An unique identifier of the type, referred in the Deviceentity- -» listen_on +identifier string false -The local IP and port the Domotz Agent software is listening on if online - the last known value otherwise -- » location -object -false -none +The name of the type - »» latitude +label string false -none +A human-readable short description of the type - »» longitude -string +vital +boolean false -none +Whether a device of this type will be marked as VITALas soon as recognisedAgentHistory
+DeviceConfigurationChangeEvent
- +{ - "timestamp": "2019-06-11T09:08:10Z", - "type": "CONNECTION_RECOVERED" + "data": { + "agent_id": 0, + "device_id": 0 + }, + "name": "device_configuration_change", + "timestamp": "2019-08-24T14:15:22Z" } -Properties
+Triggered when the device configuration changes
+Properties
-Name @@ -7395,19 +13182,37 @@AgentHistory
- +timestamp -string(date-time) +data +object +false +none ++ +» agent_id +integer(int32) +false +The +idof theagent+ » device_id +integer(int32) true -The time the sample was reported to Domotz +The idof thedevice- +type +name string true -The agent event type +none ++ timestamp +string(date-time) +true +The timestamp of the event Enumerated Values
+Enumerated Values
-Property @@ -7415,43 +13220,26 @@Enumerated Values
- -type -CONNECTION_RECOVERED -- -type -CONNECTION_LOST -- -type -UP -- type -DOWN +name +device_configuration_change AgentSecurityIssueEvent
+DeviceConfigurationMisalignmentEvent
- +
-{ "data": { "agent_id": 0, - "value": [ - { - "port": 0, - "type": "TCP_OPEN_PORT" - } - ] + "device_id": 0 }, - "name": "agent_security_issue", - "timestamp": "2019-06-11T09:08:10Z" + "name": "device_configuration_misalignment", + "timestamp": "2019-08-24T14:15:22Z" }Triggered when Domotz detects a security issue
-Properties
+Triggered when the device configuration becomes different from the startup one
+Properties
+Name @@ -7473,37 +13261,75 @@Properties
The idof theagent- +» value -[object] -false +» device_id +integer(int32) +true +The +idof thedevice+ name +string +true none - +»» port -integer(int32) -false -none +timestamp +string(date-time) +true +The timestamp of the event +Enumerated Values
++
+ ++ + +Property +Value ++ +name +device_configuration_misalignment +DeviceConnection
+ + +{ + "allowed_ip": "string", + "port": 0, + "protocol": "http" +} + +Properties
++
-+ +Name +Type +Required +Description - »» type +allowed_ip string -false -none +true +The only public IP address allowed to access the connection. It will be impossible to use the connection from other IP addresses. You should use your public IP address. For httpandhttpsit is safe, since if you keep the connection link secret nobody will access the device. Fortcpit is not recommended because a random port scan on our servers may allow an hostile actor to use the connection, accessing the device's tcp port as if it was in the agent's network.- » name -string +port +integer(int32) true none - » timestamp -string(date-time) +protocol +string true -The timestamp of the event +The protocol wrapped by the connection: - http/https: the linkfield in the reply will contain anhttpsURL. A browser or a similar user agent must be used: the client must have cookies enabled and the capability of following 302 redirects. If the protocol ishttpsthe device's certificate will be accepted without checks and its information ignored (our server will act as a proxy). - tcp: thelinkfield will be in the formtcp://{host}:{port}. Any connection established (e.g. withtelnetorssh) on these coordinates will be securely forwarded to the requestedportof the device. - ssh: thelinkfield will contain anhttpsURL. A browser or a similar user agent must be used: the client must have cookies enabled and the capability of following 302 redirects. - rdp: thelinkfield will contain anhttpsURL. A browser or a similar user agent must be used: the client must have cookies enabled and the capability of following 302 redirects.Enumerated Values
+Enumerated Values
-Property @@ -7511,46 +13337,36 @@Enumerated Values
- type -TCP_OPEN_PORT +protocol +http - type -UPNP_IGD_FORWARD +protocol +https - type -UPNP_IGD_SERVICE +protocol +tcp - +name -agent_security_issue +protocol +ssh ++ protocol +rdp AgentSpeedTestEvent
+DeviceCredentials
- +
-{ - "data": { - "agent_id": 0, - "status": "SPEED_TEST_ISSUE_DETECTED", - "threshold": { - "download": 0, - "upload": 0 - }, - "value": { - "download": 0, - "upload": 0 - } - }, - "name": "agent_speed_test", - "timestamp": "2019-06-11T09:08:10Z" + "password": "string", + "username": "string" } -Triggered when the measured Internet speed goes below the defined threshold
-Properties
+Properties
+ +Name @@ -7560,73 +13376,74 @@Properties
- -data -object -false -none -- -» agent_id -integer(int32) -false -The -idof theagent- -» status +password string -false -none -- » threshold -object -false -none +true +password - +»» download -integer(int32) -false -The configured download threshold +username +string +true +username DeviceDiscoveryEvent
+ + +
+{ + "data": { + "agent_id": 0, + "device_id": 0 + }, + "name": "agent_device_discovery", + "timestamp": "2019-08-24T14:15:22Z" +} + +Triggered when a new device appears on the network
+Properties
+
-- +»» upload -integer(int32) -false -The configured upload threshold +Name +Type +Required +Description - » value +data object false none - »» download +» agent_id integer(int32) false -The measured download value +The idof theagent- »» upload +» device_id integer(int32) false -The measured upload value +The idof thedevice- » name +name string true none - » timestamp +timestamp string(date-time) true The timestamp of the event Enumerated Values
+Enumerated Values
+ +Property @@ -7634,34 +13451,57 @@Enumerated Values
- +status -SPEED_TEST_ISSUE_DETECTED +name +agent_device_discovery DeviceEyeSNMPHistorySample
+ + +{ + "timestamp": "2019-08-24T14:15:22Z", + "value": "string" +} + +Properties
+
-- +status -SPEED_TEST_ISSUE_RESOLVED +Name +Type +Required +Description - +name -agent_speed_test +timestamp +string(date-time) +true +The time the sample was reported to Domotz ++ value +string +true +none AgentStatusEvent
+DeviceHeartbeatLostEvent
- +
-{ "data": { "agent_id": 0, - "value": "UP" + "device_id": 0 }, - "name": "agent_status", - "timestamp": "2019-06-11T09:08:10Z" + "name": "device_heartbeat_lost", + "timestamp": "2019-08-24T14:15:22Z" }Triggered when the agent connectivity status changes
-Properties
+Triggered when a device does not respond to a ping
+Properties
-Name @@ -7683,10 +13523,10 @@Properties
The idof theagent- » value -string -false -none +» device_id +integer(int32) +true +The idof thedevicename @@ -7701,7 +13541,7 @@Properties
The timestamp of the event Enumerated Values
+Enumerated Values
-Property @@ -7709,34 +13549,28 @@Enumerated Values
- -value -UP -- -value -DOWN -name -agent_status +device_heartbeat_lost AlertProfile
+DeviceHistory
- +{ - "description": "string", - "events": [ - "device_status" - ], - "id": 0, - "is_enabled": true, - "name": "string", - "tag": "string" + "details": { + "new_ip": [ + "string" + ], + "old_ip": [ + "string" + ] + }, + "timestamp": "2019-08-24T14:15:22Z", + "type": "IP_CHANGE" } -Properties
+Properties
- -Name @@ -7746,111 +13580,82 @@AlertProfile
- description -string +details +object false -The description of the alert profile +none - -events +» new_ip [string] false -The list of events associated to the profile -- id -integer(int32) -true -The id of the event profile +The new IP addresses - is_enabled -boolean +» old_ip +[string] false -true if the event profile is enabled, false otherwise +The old IP addresses - name -string -false -The symbolic name associated to the profile +timestamp +string(date-time) +true +The time the sample was reported to Domotz - tag +type string -false -A label associated to the profile +true +The device event type AlertProfileAgentBinding
- - -{ - "alert_profile_id": 0 -} - -Properties
+Enumerated Values
- -- Name -Type -Required -Description +Property +Value - -alert_profile_id -integer(int32) -true -The id of the alert profile +type +IP_CHANGE AlertProfileDeviceBinding
- - -{ - "alert_profile_id": 0, - "device_id": 0 -} - -Properties
-
-- -Name -Type -Required -Description +type +CREATED - alert_profile_id -integer(int32) -true -The id of the alert profile +type +UP - device_id -integer(int32) -true -none +type +DOWN ConnectionSession
+DeviceIPChangeEvent
- +{ - "allowed_ip": "string", - "expiration": "2019-06-11T09:08:10Z", - "id": 0, - "link": "string", - "port": 0, - "protocol": "http" + "data": { + "agent_id": 0, + "device_id": 0, + "old_ip_addresses": [ + "string" + ], + "value": [ + "string" + ] + }, + "name": "device_ip_change", + "timestamp": "2019-08-24T14:15:22Z" } -Properties
+Triggered when the device IP address changes
+Properties
-Name @@ -7860,43 +13665,49 @@ConnectionSession
- allowed_ip -string -true -The only public IP address allowed to access the connection. It will be impossible to use the connection from other IP addresses. You can use +0.0.0.0to allow access from any IP - Forhttpabdhttpsit is safe, since if you keep the connection link secret nobody will access the device. Fortcpit is not recommended because a random port scan on our servers may allow an hostile actor to use the connection, accessing the device's tcp port as if it was in the agent's network.data +object +false +none - expiration -string(date-time) +» agent_id +integer(int32) false -The time after which the connection will be closed +The idof theagent- id +» device_id integer(int32) true -The unique identifier of the +connectionThe idof thedevice- link -string +» old_ip_addresses +[string] false -Either the link to access the device's HTTP(s) interface in the browser or the host/port coordinates of the proxied TCP port, depending on the protocol (see protocol description in the request) +The list of previous IP addresses - +port -integer(int32) +» value +[string] +false +The list of new IP addresses ++ name +string true none - protocol -string +timestamp +string(date-time) true -The protocol wrapped by the connection: - http/https: the +linkfield in the reply will contain anhttpsURL. A browser or a similar user agent must be used: the client must have cookies enabled and the capability of following 302 redirects. If the protocol ishttpsthe device's certificate will be accepted without checks and its information ignored (our server will act as a proxy). - tcp: thelinkfield will be in the formtcp://{host}:{port}. Any connection established (e.g. withtelnetorssh) on these coordinates will be securely forwarded to the requestedportof the device.The timestamp of the event Enumerated Values
+Enumerated Values
+ +Property @@ -7904,35 +13715,69 @@Enumerated Values
- +protocol -http +name +device_ip_change +DevicePowerAction
+ + +{ + "cycle": true, + "off": true, + "on": true, + "software_reboot": true +} + +Properties
++
-+ +Name +Type +Required +Description - protocol -https +cycle +boolean +false +Indicates that a power cycle on the device is possible. Available if the device is connected to just one PDU. - +protocol -tcp +off +boolean +false +Indicates that the device can be powered off. Available if the device is connected to one or more PDU. +
In the latter case the operation will be performed on all available PDUs.
If there no PDU but there is one POE connection, the operation will still be available through that connection.+ +on +boolean +false +Indicates that the device can be powered on. Available if the device is connected to one or more PDU. +
In the latter case the operation will be performed on all available PDUs.
If there is no PDU but there is one POE connection, the operation will still available through that connection.+ software_reboot +boolean +false +Indicates that software reboot on the device is possible.
The operation availability depends on the device.DetectedDeviceType
+DeviceRTDHistorySample
- +
-{ - "capabilities": [ - "string" - ], - "id": 0, - "identifier": "string", - "label": "string", - "type_id": 0 + "lost_packet_count": 0, + "max": "string", + "median": "string", + "min": "string", + "sent_packet_count": 0, + "timestamp": "2019-08-24T14:15:22Z" } -A device type, detected by the Domotz device identification feature
-Properties
+Properties
-Name @@ -7942,50 +13787,67 @@Properties
- capabilities -[string] +lost_packet_count +integer(int32) false -The features of the device +none - id -integer(int32) +max +string false -An unique identifier of the type, referred in the +Deviceentitynone - identifier +median string false -The name of the type +none - label +min string false -A human-readable short description of the type +none - +type_id +sent_packet_count integer(int32) false -The corresponding +device typenone ++ timestamp +string(date-time) +true +The time the sample was reported to Domotz DeviceBaseType
+DeviceRTDIssueEvent
- +
-{ - "id": 0, - "identifier": "string", - "label": "string", - "vital": true + "data": { + "agent_id": 0, + "device_id": 0, + "status": "RTD_ISSUE_DETECTED", + "threshold": { + "latency": 0, + "packet_loss_percentage": 0 + }, + "value": { + "latency": 0, + "packet_loss_percentage": 0 + } + }, + "name": "device_rtd", + "timestamp": "2019-08-24T14:15:22Z" }A device type, either set by the user or as identified by the Domotz system
-Properties
+Triggered when the Round-Trip-Delay values of a device exceeds the defined thresholds
+Properties
- - - + +Name @@ -7993,71 +13855,81 @@Properties
Required Description + +data +object +false +none ++ » agent_id +integer(int32) +false +The +idof theagent- id +» device_id integer(int32) -false -An unique identifier of the type, referred in the +Deviceentitytrue +The idof thedevice- identifier +» status string false -The name of the type +none - label -string +» threshold +object false -A human-readable short description of the type +none - -vital -boolean +»» latency +integer(int32) false -Whether a device of this type will be marked as +VITALas soon as recognisedThe configured latency threshold DeviceConnection
- - -{ - "allowed_ip": "string", - "port": 0, - "protocol": "http" -} - -Properties
-
-- -Name -Type -Required -Description +»» packet_loss_percentage +integer(int32) +false +The configured packet loss percentage threshold - allowed_ip -string -true -The only public IP address allowed to access the connection. It will be impossible to use the connection from other IP addresses. You can use +0.0.0.0to allow access from any IP - Forhttpabdhttpsit is safe, since if you keep the connection link secret nobody will access the device. Fortcpit is not recommended because a random port scan on our servers may allow an hostile actor to use the connection, accessing the device's tcp port as if it was in the agent's network.» value +object +false +none - +port +»» latency +integer(int32) +false +The current latency value ++ +»» packet_loss_percentage integer(int32) +false +The current packet loss percentage value ++ » name +string true none - protocol -string +» timestamp +string(date-time) true -The protocol wrapped by the connection: - http/https: the +linkfield in the reply will contain anhttpsURL. A browser or a similar user agent must be used: the client must have cookies enabled and the capability of following 302 redirects. If the protocol ishttpsthe device's certificate will be accepted without checks and its information ignored (our server will act as a proxy). - tcp: thelinkfield will be in the formtcp://{host}:{port}. Any connection established (e.g. withtelnetorssh) on these coordinates will be securely forwarded to the requestedportof the device.The timestamp of the event Enumerated Values
+Enumerated Values
-Property @@ -8065,28 +13937,34 @@Enumerated Values
- protocol -http +status +RTD_ISSUE_DETECTED - protocol -https +status +RTD_ISSUE_RESOLVED - protocol -tcp +name +device_rtd DeviceCredentials
+DeviceRTDStatistics
- +{ - "password": "string", - "username": "string" + "avg_max": "string", + "avg_median": "string", + "avg_min": "string", + "device_id": 0, + "latest_lost_packet_count": 0, + "latest_median": "string", + "latest_sent_packet_count": 0, + "timestamp": "2019-08-24T14:15:22Z" } -Properties
+Properties
- -Name @@ -8096,79 +13974,72 @@DeviceCredentials
- password +avg_max string -true -password +false +none - -username +avg_median string -true -username -DeviceDetails
- - -{ - "room": "string", - "snmp_read_community": "string", - "snmp_write_community": "string", - "zone": "string" -} - -Properties
--
-- -Name -Type -Required -Description +false +none - room +avg_min string false none - snmp_read_community -string -false +device_id +integer(int32) +true none - snmp_write_community -string +latest_lost_packet_count +integer(int32) false -none +The number of lost packets of the latest collection sample - +zone +latest_median string false -none +The median value of the latest collection sample ++ +latest_sent_packet_count +integer(int32) +false +The number of sent packets of the latest collection sample ++ timestamp +string(date-time) +true +The timestamp of the latest update DeviceDiscoveryEvent
+DeviceSNMPEvent
- +
-{ "data": { "agent_id": 0, - "device_id": 0 + "device_id": 0, + "trigger_name": "string", + "value": "string" }, - "name": "agent_device_discovery", - "timestamp": "2019-06-11T09:08:10Z" + "name": "device_snmp", + "timestamp": "2019-08-24T14:15:22Z" }Triggered when a new device appears on the network
-Properties
+Triggered when the status of an SNMP value changes
+Properties
-Name @@ -8192,10 +14063,22 @@Properties
» device_id integer(int32) -false +true The idof thedevice+ +» trigger_name +string +false +none ++ +» value +string +false +The current value of the SNMP sensor +name string true @@ -8208,7 +14091,7 @@Properties
The timestamp of the event Enumerated Values
+Enumerated Values
-Property @@ -8217,25 +14100,19 @@Enumerated Values
name -agent_device_discovery +device_snmp DeviceHeartbeatLostEvent
+DeviceSnmpCommunity
- +
-{ - "data": { - "agent_id": 0, - "device_id": 0 - }, - "name": "device_heartbeat_lost", - "timestamp": "2019-06-11T09:08:10Z" + "read": "string", + "write": "string" } -Triggered when a device does not respond to a ping
-Properties
+Properties
-Name @@ -8245,66 +14122,35 @@Properties
- -data -object -false -none -- -» agent_id -integer(int32) -false -The -idof theagent- -» device_id -integer(int32) -true -The -idof thedevice- -name +read string true -none -- -timestamp -string(date-time) -true -The timestamp of the event -Enumerated Values
--
-- -Property -Value +Defines new read snmp community - name -device_heartbeat_lost +write +string +false +Defines new write snmp community (defaults to read community if not used) DeviceHistory
+DeviceStatusChangeEvent
- +{ - "details": { - "new_ip": [ - "string" - ], - "old_ip": [ - "string" - ] + "data": { + "agent_id": 0, + "device_id": 0, + "value": "UP" }, - "timestamp": "2019-06-11T09:08:10Z", - "type": "IP_CHANGE" + "name": "device_status", + "timestamp": "2019-08-24T14:15:22Z" } -Properties
+ +Triggered when the status of a device changes
+Properties
-Name @@ -8314,37 +14160,43 @@DeviceHistory
- details +data object false none - » new_ip -[string] +» agent_id +integer(int32) false -The new IP addresses +The idof theagent- +» old_ip -[string] +» device_id +integer(int32) +true +The +idof thedevice+ » value +string false -The old IP addresses +none - timestamp -string(date-time) +name +string true -The time the sample was reported to Domotz +none - type -string +timestamp +string(date-time) true -The device event type +The timestamp of the event Enumerated Values
+Enumerated Values
-Property @@ -8352,44 +14204,40 @@Enumerated Values
- -type -IP_CHANGE -- -type -CREATED -- type +value UP - +type +value DOWN + name +device_status +DeviceIPChangeEvent
+DeviceTCPEvent
- +
-{ "data": { "agent_id": 0, "device_id": 0, - "old_ip_addresses": [ - "string" - ], "value": [ - "string" + { + "port": 0, + "status": "UP" + } ] }, - "name": "device_ip_change", - "timestamp": "2019-06-11T09:08:10Z" + "name": "device_tcp", + "timestamp": "2019-08-24T14:15:22Z" }Triggered when the device IP address changes
-Properties
+Triggered when the status of a monitored TCP service changes
+Properties
-Name @@ -8417,31 +14265,37 @@Properties
The idof thedevice- » old_ip_addresses -[string] +» value +[object] false -The list of previous IP addresses +none - » value -[string] +»» port +integer(int32) false -The list of new IP addresses +none - +name +»» status +string +false +none ++ » name string true none - timestamp +» timestamp string(date-time) true The timestamp of the event Enumerated Values
+Enumerated Values
-Property @@ -8449,22 +14303,34 @@Enumerated Values
+ +status +UP ++ +status +DOWN +name -device_ip_change +device_tcp DevicePowerAction
+DomotzEyesUsageInformation
- +{ - "cycle": true, - "off": true, - "on": true, - "software_reboot": true + "limit": 0, + "usage": { + "snmp": 0, + "tcp": 0, + "total": 0 + } } -Properties
+ +Information about Domotz Eyes current usage and limits
+Properties
-Name @@ -8474,44 +14340,166 @@DevicePowerAction
- cycle -boolean +limit +integer(int32) false -Indicates that a power cycle on the device is possible. Available if the device is connected to just one PDU. +Number of allowed Domotz Eyes for the agent - off -boolean +usage +object false -Indicates that the device can be powered off. Available if the device is connected to one or more PDU. +
In the latter case the operation will be performed on all available PDUs.
If there no PDU but there is one POE connection, the operation will still be available through that connection.none - on -boolean +» snmp +integer(int32) false -Indicates that the device can be powered on. Available if the device is connected to one or more PDU. +
In the latter case the operation will be performed on all available PDUs.
If there is no PDU but there is one POE connection, the operation will still available through that connection.Number of configured Domotz Eyes of type snmpon the agent.- +software_reboot -boolean +» tcp +integer(int32) false -Indicates that software reboot on the device is possible. +
The operation availability depends on the device.Number of configured Domotz Eyes of type +tcpon the agent.+ » total +integer(int32) +false +Number of configured Domotz Eyes on the agent. DeviceRTDHistorySample
+DummyDevice
+ + +{ + "authentication_status": "AUTHENTICATED", + "details": { + "room": "string", + "snmp_read_community": "string", + "snmp_write_community": "string", + "zone": "string" + }, + "display_name": "string", + "first_seen_on": "2019-08-24T14:15:22Z", + "id": 0, + "importance": "VITAL", + "main_id": 0, + "protocol": "IP", + "type": { + "detected_id": 0, + "id": 0 + }, + "user_data": { + "model": "string", + "name": "string", + "type": 0, + "vendor": "string" + } +} + +Properties
+allOf
+ ++
+ ++ + +Name +Type +Required +Description ++ +anonymous +AbstractDevice +false +Base abstract class for all devices +and
+ ++
+ ++ + +Name +Type +Required +Description ++ +anonymous +object +false +A device that has no network access whatsoever and cannot be discovered or interacted with by the agent. A user can create a Dummy Device to attach it to a power outlet so that it is easier to remember which port controls the device +ExternalIpDevice
+ + +{ + "authentication_status": "AUTHENTICATED", + "details": { + "room": "string", + "snmp_read_community": "string", + "snmp_write_community": "string", + "zone": "string" + }, + "display_name": "string", + "first_seen_on": "2019-08-24T14:15:22Z", + "id": 0, + "importance": "VITAL", + "main_id": 0, + "protocol": "IP", + "type": { + "detected_id": 0, + "id": 0 + }, + "user_data": { + "model": "string", + "name": "string", + "type": 0, + "vendor": "string" + }, + "agent_reachable": true, + "grace_period": 0, + "ip_addresses": [ + "string" + ], + "last_status_change": "2019-08-24T14:15:22Z", + "model": "string", + "status": "ONLINE", + "vendor": "string", + "names": { + "host": "string", + "inspection": "string" + } +} + +Properties
+allOf
+ ++
- -+ + +Name +Type +Required +Description ++ +anonymous +IpDevice +false +none +{ - "lost_packet_count": 0, - "max": "string", - "median": "string", - "min": "string", - "sent_packet_count": 0, - "timestamp": "2019-06-11T09:08:10Z" -} +and
-Properties
-Name @@ -8521,67 +14509,72 @@DeviceRTDHistorySample
- lost_packet_count -integer(int32) +anonymous +object false -none +A device added by the means of 'Advanced Monitoring': it is an IP device manually added by the user, no discoveries are done over it, just periodical ping to see whether it is reachable - max -string +» names +object false none - median +»» host string false none - -min +»» inspection string false none - -sent_packet_count -integer(int32) -false -none -- timestamp -string(date-time) -true -The time the sample was reported to Domotz -DeviceRTDIssueEvent
+IpDevice
- +
-{ - "data": { - "agent_id": 0, - "device_id": 0, - "status": "RTD_ISSUE_DETECTED", - "threshold": { - "latency": 0, - "packet_loss_percentage": 0 - }, - "value": { - "latency": 0, - "packet_loss_percentage": 0 - } + "authentication_status": "AUTHENTICATED", + "details": { + "room": "string", + "snmp_read_community": "string", + "snmp_write_community": "string", + "zone": "string" }, - "name": "device_rtd", - "timestamp": "2019-06-11T09:08:10Z" + "display_name": "string", + "first_seen_on": "2019-08-24T14:15:22Z", + "id": 0, + "importance": "VITAL", + "main_id": 0, + "protocol": "IP", + "type": { + "detected_id": 0, + "id": 0 + }, + "user_data": { + "model": "string", + "name": "string", + "type": 0, + "vendor": "string" + }, + "agent_reachable": true, + "grace_period": 0, + "ip_addresses": [ + "string" + ], + "last_status_change": "2019-08-24T14:15:22Z", + "model": "string", + "status": "ONLINE", + "vendor": "string" } -Triggered when the Round-Trip-Delay values of a device exceeds the defined thresholds
-Properties
+Properties
+allOf
+
+ +Name @@ -8591,79 +14584,73 @@Properties
- -data -object -false -none -- -» agent_id -integer(int32) +anonymous +AbstractDevice false -The -idof theagent- +» device_id -integer(int32) -true -The +idof thedeviceBase abstract class for all devices and
+ +
-- +» status -string -false -none +Name +Type +Required +Description - » threshold +anonymous object false -none +Base abstract class for all IP devices - »» latency -integer(int32) +» agent_reachable +boolean false -The configured latency threshold +When truethe device is reachable by the agent over an IP network. WhenfalseDomotz knows about the status of the device by the means of another source e.g. a third party controller. This field is significant only when the status of the device isONLINEand its value isfalsebecause it means that even if the IP device is up and running, many features aren't allowed, such as the direct connection or the TCP services monitoring.- »» packet_loss_percentage +» grace_period integer(int32) false -The configured packet loss percentage threshold +The number of seconds a device must be unreachable before being declared DOWN - » value -object +» ip_addresses +[string] false none - »» latency -integer(int32) +» last_status_change +string(date-time) false -The current latency value +none - »» packet_loss_percentage -integer(int32) +» model +string false -The current packet loss percentage value +none - » name +» status string -true +false none - » timestamp -string(date-time) -true -The timestamp of the event +» vendor +string +false +none Enumerated Values
+Enumerated Values
-Property @@ -8672,108 +14659,91 @@Enumerated Values
status -RTD_ISSUE_DETECTED +ONLINE status -RTD_ISSUE_RESOLVED +OFFLINE - +name -device_rtd +status +DOWN ++ status +HIDDEN DeviceRTDStatistics
+LocalIpDevice
- +{ - "avg_max": "string", - "avg_median": "string", - "avg_min": "string", - "device_id": 0, - "latest_lost_packet_count": 0, - "latest_median": "string", - "latest_sent_packet_count": 0, - "timestamp": "2019-06-11T09:08:10Z" -} - -Properties
--
- - -Name -Type -Required -Description -- -avg_max -string -false -none -- -avg_median -string -false -none -- -avg_min -string -false -none -- -device_id -integer(int32) -true -none -- + "authentication_status": "AUTHENTICATED", + "details": { + "room": "string", + "snmp_read_community": "string", + "snmp_write_community": "string", + "zone": "string" + }, + "display_name": "string", + "first_seen_on": "2019-08-24T14:15:22Z", + "id": 0, + "importance": "VITAL", + "main_id": 0, + "protocol": "IP", + "type": { + "detected_id": 0, + "id": 0 + }, + "user_data": { + "model": "string", + "name": "string", + "type": 0, + "vendor": "string" + }, + "agent_reachable": true, + "grace_period": 0, + "ip_addresses": [ + "string" + ], + "last_status_change": "2019-08-24T14:15:22Z", + "model": "string", + "status": "ONLINE", + "vendor": "string", + "hw_address": "string", + "is_jammed": true, + "names": { + "bonjour": "string", + "dhcp": "string", + "host": "string", + "inspection": "string", + "snmp": "string", + "upnp": "string" + } +} + +latest_lost_packet_count -integer(int32) -false -The number of lost packets of the latest collection sample -Properties
+allOf
+ +
-- +latest_median -string -false -The median value of the latest collection sample +Name +Type +Required +Description - -latest_sent_packet_count -integer(int32) +anonymous +IpDevice false -The number of sent packets of the latest collection sample -- timestamp -string(date-time) -true -The timestamp of the latest update +none DeviceSNMPEvent
- - -
-{ - "data": { - "agent_id": 0, - "device_id": 0, - "trigger_name": "string", - "value": "string" - }, - "name": "device_snmp", - "timestamp": "2019-06-11T09:08:10Z" -} +and
-Triggered when the status of an SNMP value changes
-Properties
-Name @@ -8783,70 +14753,81 @@Properties
- data +anonymous object false -none +Standard device, automatically discovered in the local IP network of the agent. - » agent_id -integer(int32) +» hw_address +string false -The +idof theagentMAC Address - » device_id -integer(int32) -true -The +idof thedevice» is_jammed +boolean +false +When true, the Domotz Agent is blocking the device to access the Internet. The device can still reach every other device in the local network - +» trigger_name +» names +object +false +none ++ »» bonjour string false none - » value +»» dhcp string false -The current value of the SNMP sensor +none - name +»» host string -true +false none - -timestamp -string(date-time) -true -The timestamp of the event +»» inspection +string +false +none Enumerated Values
-
-- -Property -Value +»» snmp +string +false +none - name -device_snmp +»» upnp +string +false +none DeviceSnmpCommunity
+NetworkSpeedSample
- +{ - "read": "string", - "write": "string" + "timestamp": "2019-08-24T14:15:22Z", + "values": [ + 0 + ] } -Properties
+ +A Network Speed Sample is the result of the measurement of the Internet download and upload + speed, in bits per second, taken by the Agent
+Properties
-Name @@ -8856,35 +14837,36 @@DeviceSnmpCommunity
- read -string -true -Defines new read snmp community +timestamp +string(date-time) +false +The time the sample was reported to Domotz - write -string +values +[integer] false -Defines new write snmp community (defaults to read community if not used) +A pair of values: the download and upload speed, in Bit Per Seconds (bps), as measured by the Agent DeviceStatusChangeEvent
+SNMPDomotzAuthentication
- +
-{ - "data": { - "agent_id": 0, - "device_id": 0, - "value": "UP" - }, - "name": "device_status", - "timestamp": "2019-06-11T09:08:10Z" + "authentication_key": "string", + "authentication_protocol": "MD5", + "encryption_key": "string", + "encryption_protocol": "DES", + "snmp_read_community": "string", + "snmp_write_community": "string", + "username": "string", + "version": "V2" }Triggered when the status of a device changes
-Properties
+The SNMP authentication setting of a device
+Properties
-Name @@ -8894,43 +14876,55 @@Properties
- data -object +authentication_key +string false none - » agent_id -integer(int32) +authentication_protocol +string false -The +idof theagentThe SNMP authentication protocol - » device_id -integer(int32) -true -The +idof thedeviceencryption_key +string +false +none - +» value +encryption_protocol +string +false +The SNMP encryption protocol ++ snmp_read_community string false none - name +snmp_write_community string -true +false none - +timestamp -string(date-time) +username +string +false +none ++ version +string true -The timestamp of the event +The configured SNMP version Enumerated Values
+Enumerated Values
-Property @@ -8938,40 +14932,59 @@Enumerated Values
- value -UP +authentication_protocol +MD5 - value -DOWN +authentication_protocol +SHA - +name -device_status +encryption_protocol +DES ++ +encryption_protocol +AES ++ +version +V2 ++ +version +V1 ++ +version +V3_AUTH_PRIV ++ +version +V3_NO_AUTH ++ version +V3_AUTH_NO_PRIV DeviceTCPEvent
+SNMPDomotzEye
- +
-{ - "data": { - "agent_id": 0, - "device_id": 0, - "value": [ - { - "port": 0, - "status": "UP" - } - ] - }, - "name": "device_tcp", - "timestamp": "2019-06-11T09:08:10Z" + "category": "OTHER", + "id": 0, + "last_update": "2019-08-24T14:15:22Z", + "latest_value": "string", + "name": "string", + "oid": "string", + "value_type": "STRING" }Triggered when the status of a monitored TCP service changes
-Properties
+Information about a configured SNMP Domotz Eye
+Properties
-Name @@ -8981,55 +14994,49 @@Properties
- -data -object -false -none -- » agent_id -integer(int32) -false -The +idof theagentcategory +string +true +The category of the OID - » device_id +id integer(int32) true -The +idof thedeviceThe unique identifier of the SNMP Domotz Eye - » value -[object] -false -none +last_update +string(date-time) +true +The timestamp of the latest update - »» port -integer(int32) -false -none +latest_value +string +true +The value retrieved on the OID - »» status +name string -false -none +true +The name of the Domotz Eyes - » name +oid string true -none +The OID string - » timestamp -string(date-time) +value_type +string true -The timestamp of the event +The type of the OID Enumerated Values
+Enumerated Values
- -Property @@ -9037,130 +15044,56 @@Enumerated Values
- status -UP +category +OTHER - status -DOWN +category +CONSUMABLE - -name -device_tcp +category +CPU DummyDevice
- - -{ - "authentication_status": "AUTHENTICATED", - "details": { - "room": "string", - "snmp_read_community": "string", - "snmp_write_community": "string", - "zone": "string" - }, - "display_name": "string", - "first_seen_on": "2019-06-11T09:08:10Z", - "id": 0, - "importance": "VITAL", - "main_id": 0, - "protocol": "IP", - "type": { - "detected_id": 0, - "id": 0 - }, - "user_data": { - "model": "string", - "name": "string", - "type": 0, - "vendor": "string" - } -} - -Properties
-allOf
- -
- -- -Name -Type -Required -Description +category +DISK_SPACE - -anonymous -AbstractDevice -false -Base abstract class for all devices +category +MEMORY and
- -
-- -Name -Type -Required -Description +category +NETWORK_TRAFFIC - +anonymous -object -false -A device that has no network access whatsoever and cannot be discovered or interacted with by the agent. A user can create a Dummy Device to attach it to a power outlet so that it is easier to remember which port controls the device +category +TEMPERATURE ++ +value_type +STRING ++ value_type +NUMERIC ExternalIpDevice
+SNMPDomotzEyeCreation
- +{ - "authentication_status": "AUTHENTICATED", - "details": { - "room": "string", - "snmp_read_community": "string", - "snmp_write_community": "string", - "zone": "string" - }, - "display_name": "string", - "first_seen_on": "2019-06-11T09:08:10Z", - "id": 0, - "importance": "VITAL", - "main_id": 0, - "protocol": "IP", - "type": { - "detected_id": 0, - "id": 0 - }, - "user_data": { - "model": "string", - "name": "string", - "type": 0, - "vendor": "string" - }, - "agent_reachable": true, - "grace_period": 0, - "ip_addresses": [ - "string" - ], - "last_status_change": "2019-06-11T09:08:10Z", - "model": "string", - "status": "ONLINE", - "vendor": "string", - "names": { - "host": "string", - "inspection": "string" - } + "category": "OTHER", + "name": "string", + "oid": "string", + "value_type": "STRING" } -Properties
-allOf
- + +SNMP Domotz Eye Data
+Properties
- -Name @@ -9170,90 +15103,95 @@ExternalIpDevice
- +anonymous -IpDevice -false -none +category +string +true +The category of the OID ++ +name +string +true +The name of the Domotz Eyes ++ +oid +string +true +The OID string ++ value_type +string +true +The type of the OID and
- +Enumerated Values
-- Name -Type -Required -Description +Property +Value - anonymous -object -false -A device added by the means of 'Advanced Monitoring': it is an IP device manually added by the user, no discoveries are done over it, just periodical ping to see whether it is reachable +category +OTHER - » names -object -false -none +category +CONSUMABLE - »» host -string -false -none +category +CPU - +»» inspection -string -false -none +category +DISK_SPACE ++ +category +MEMORY ++ +category +NETWORK_TRAFFIC ++ +category +TEMPERATURE ++ +value_type +STRING ++ value_type +NUMERIC IpDevice
+SNMPDomotzEyeTrigger
- +{ - "authentication_status": "AUTHENTICATED", - "details": { - "room": "string", - "snmp_read_community": "string", - "snmp_write_community": "string", - "zone": "string" + "alert": { + "email": true, + "mobile": true }, - "display_name": "string", - "first_seen_on": "2019-06-11T09:08:10Z", + "creation_time": "2019-08-24T14:15:22Z", + "function_id": 0, "id": 0, - "importance": "VITAL", - "main_id": 0, - "protocol": "IP", - "type": { - "detected_id": 0, - "id": 0 - }, - "user_data": { - "model": "string", - "name": "string", - "type": 0, - "vendor": "string" - }, - "agent_reachable": true, - "grace_period": 0, - "ip_addresses": [ + "name": "string", + "operands": [ "string" - ], - "last_status_change": "2019-06-11T09:08:10Z", - "model": "string", - "status": "ONLINE", - "vendor": "string" + ] } -Properties
-allOf
- + +Information about a trigger
+Properties
- -Name @@ -9263,73 +15201,102 @@IpDevice
- -anonymous -AbstractDevice +alert +object false -Base abstract class for all devices +The alerts details and
- -
+ +- -Name -Type -Required -Description +» email +boolean +false +True if the email alert is active - anonymous -object +» mobile +boolean false -Base abstract class for all IP devices +True if the mobile alert is active - » agent_reachable -boolean +creation_time +string(date-time) false -When +truethe device is reachable by the agent over an IP network. WhenfalseDomotz knows about the status of the device by the means of another source e.g. a third party controller. This field is significant only when the status of the device isONLINEand its value isfalsebecause it means that even if the IP device is up and running, many features aren't allowed, such as the direct connection or the TCP services monitoring.none - » grace_period +function_id integer(int32) -false -The number of seconds a device must be unreachable before being declared DOWN +true +The unique identifier of the function assigned to the trigger - +» ip_addresses +id +integer(int32) +true +The unique identifier of the SNMP Trigger ++ +name +string +true +The name of the trigger ++ +operands [string] -false -none +true +The operands for the function +SNMPDomotzEyeTriggerFunction
+ + +
+{ + "cardinality": 0, + "id": 0, + "name": "string", + "value_types": "STRING" +} + +Information about a trigger function
+Properties
++
-+ +Name +Type +Required +Description - » last_status_change -string(date-time) -false -none +cardinality +integer(int32) +true +The number of arguments of the function - » model -string -false -none +id +integer(int32) +true +The unique identifier of the SNMP Trigger function - » status +name string -false -none +true +The name of the function - » vendor +value_types string -false -none +true +The type of the operands Enumerated Values
+Enumerated Values
+ +Property @@ -9337,26 +15304,70 @@Enumerated Values
- status -ONLINE +value_types +STRING - +status -OFFLINE +value_types +NUMERIC +SNMPDomotzSnmpTriggerAlertCreation
+ + +
+{} + +SNMP Trigger Alert
+Properties
+None
+ +SNMPDomotzSnmpTriggerCreation
+ + +
+{ + "function_id": 0, + "name": "string", + "operands": [ + "string" + ] +} + +SNMP Trigger
+Properties
++
-+ +Name +Type +Required +Description - status -DOWN +function_id +integer(int32) +true +The unique identifier of the sensor function - +status -HIDDEN +name +string +true +The name of the trigger ++ operands +[string] +true +The operands for the function LocalIpDevice
+SubnetIpDevice
- +{ "authentication_status": "AUTHENTICATED", "details": { @@ -9366,7 +15377,7 @@LocalIpDevice
"zone": "string" }, "display_name": "string", - "first_seen_on": "2019-06-11T09:08:10Z", + "first_seen_on": "2019-08-24T14:15:22Z", "id": 0, "importance": "VITAL", "main_id": 0, @@ -9386,15 +15397,12 @@LocalIpDevice
"ip_addresses": [ "string" ], - "last_status_change": "2019-06-11T09:08:10Z", + "last_status_change": "2019-08-24T14:15:22Z", "model": "string", "status": "ONLINE", "vendor": "string", - "hw_address": "string", - "is_jammed": true, "names": { "bonjour": "string", - "dhcp": "string", "host": "string", "inspection": "string", "snmp": "string", @@ -9402,7 +15410,7 @@LocalIpDevice
} } -Properties
+Properties
allOf
@@ -9435,19 +15443,7 @@
-LocalIpDevice
anonymous object false -Standard device, automatically discovered in the local IP network of the agent. - -- -» hw_address -string -false -MAC Address -- » is_jammed -boolean -false -When true, the Domotz Agent is blocking the device to access the Internet. The device can still reach every other device in the local network +A device automatically discovered by the agent that exists in an IP subnet defined by the user. The agent reaches the device through a Level 3 switch or similar device, so it cannot get the MAC address or other level 2 information, such as DHCP lease data » names @@ -9462,12 +15458,6 @@LocalIpDevice
none - -»» dhcp -string -false -none -»» host string false @@ -9493,20 +15483,19 @@LocalIpDevice
NetworkSpeedSample
+TCPDomotzEye
- +
-{ - "timestamp": "2019-06-11T09:08:10Z", - "values": [ - 0 - ] + "id": 0, + "last_update": "2019-08-24T14:15:22Z", + "port": 0, + "status": "UP" }A Network Speed Sample is the result of the measurement of the Internet download and upload - speed, in bits per second, taken by the Agent
-Properties
+Information about a configured TCP Domotz Eye
+Properties
+Name @@ -9516,67 +15505,57 @@Properties
- +timestamp +id +integer(int32) +true +The unique identifier of the TCP Domotz Eye ++ last_update string(date-time) -false -The time the sample was reported to Domotz +true +The timestamp of the latest update - +values -[integer] -false -A pair of values: the download and upload speed, in Bit Per Seconds (bps), as measured by the Agent +port +integer(int32) +true +The port number ++ +status +string +true +The status of the TCP service +Enumerated Values
++
-+ + +Property +Value ++ +status +UP ++ status +DOWN SubnetIpDevice
+TCPDomotzEyeCreation
- +{ - "authentication_status": "AUTHENTICATED", - "details": { - "room": "string", - "snmp_read_community": "string", - "snmp_write_community": "string", - "zone": "string" - }, - "display_name": "string", - "first_seen_on": "2019-06-11T09:08:10Z", - "id": 0, - "importance": "VITAL", - "main_id": 0, - "protocol": "IP", - "type": { - "detected_id": 0, - "id": 0 - }, - "user_data": { - "model": "string", - "name": "string", - "type": 0, - "vendor": "string" - }, - "agent_reachable": true, - "grace_period": 0, - "ip_addresses": [ - "string" - ], - "last_status_change": "2019-06-11T09:08:10Z", - "model": "string", - "status": "ONLINE", - "vendor": "string", - "names": { - "bonjour": "string", - "host": "string", - "inspection": "string", - "snmp": "string", - "upnp": "string" - } + "port": 0 } -Properties
-allOf
- + +TCP Domotz Eye Data
+Properties
-Name @@ -9586,15 +15565,24 @@SubnetIpDevice
- anonymous -IpDevice -false -none +port +integer(int32) +true +The port number and
+Team
+ + +
+{ + "id": 0, + "name": "string" +} +Represents a team of the Company
+Properties
+ +Name @@ -9604,46 +15592,79 @@SubnetIpDevice
- anonymous -object -false -A device automatically discovered by the agent that exists in an IP subnet defined by the user. The agent reaches the device through a Level 3 switch or similar device, so it cannot get the MAC address or other level 2 information, such as DHCP lease data +id +integer(int32) +true +The identifier of the Team - +» names +name +string +true +The name of the Team +TeamCreation
+ + +
+{ + "leader": { + "details": { + "display_name": "string" + }, + "name": "string", + "password": "string" + }, + "name": "string" +} + +Team Creation under specified Area
+Properties
++
@@ -9655,7 +15676,7 @@+ + +Name +Type +Required +Description ++ leader object -false -none +true +The Team Leader - »» bonjour -string -false -none +» details +object +true +The Team Leader's details - »» host +»» display_name string -false -none +true +The Team Leader's display name - »» inspection +» name string -false -none +true +The Team Leader's name - »» snmp +» password string -false -none +true +The Team Leader's password - »» upnp +name string -false -none +true +The Team's name User
"name": "string" } -Properties
+Properties
Name diff --git a/domotz_gen.js b/domotz_gen.js index cf72e4ca1cb..1d504040913 100644 --- a/domotz_gen.js +++ b/domotz_gen.js @@ -2,11 +2,12 @@ const converter = require('widdershins'); const fs = require('fs'); const fetch = require('node-fetch'); const childProcess = require('child_process'); -// const apiDefBaseUrl = 'https://api-testing-eu-central-1-cell-1.domotz.nl'; -const apiDefBaseUrl = 'https://api-staging-eu-central-1-cell-1.domotz.co'; +const apiDefBaseUrl = 'https://api-testing-eu-central-1-cell-1.domotz.nl'; +// const apiDefBaseUrl = 'https://api-staging-eu-central-1-cell-1.domotz.co'; // const apiDefBaseUrl = 'https://api.domotz.de'; // const apiDefBaseUrl = 'http://172.17.0.1:8888'; -const apiDefDocUrl = 'your-domotz-api-endpoint'; +// const apiDefBaseUrl = 'http://192.168.77.5:8888'; + var stringify = require('json-stable-stringify'); const tmpFile = '/tmp/domotz_api.json'; @@ -20,7 +21,7 @@ try { } catch (e) { validationError = true; } - +let apiDefDocUrl = '{baseURL}' let options = {}; options.user_templates = './domotz_templates'; diff --git a/domotz_gen.sh b/domotz_gen.sh index 0c268461b1f..3022ae9d8d5 100755 --- a/domotz_gen.sh +++ b/domotz_gen.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash -docker run -w /local -v ${PWD}:/local -it registry.domotz.com/domotz/domotz_slate:1.0.2 \ +docker run -w /local -v ${PWD}:/local -it registry.domotz.com/domotz/domotz_slate:1.0.3 \ bash -c 'export NODE_PATH="$(npm config get prefix)/lib/node_modules" && node domotz_gen.js && bundle exec middleman build' diff --git a/domotz_templates/main.dot b/domotz_templates/main.dot index b25a1c43950..5639e783a77 100644 --- a/domotz_templates/main.dot +++ b/domotz_templates/main.dot @@ -4,23 +4,8 @@ {{? data.api.info.description}}{{=data.api.info.description}}{{?}} -{{? data.api.servers }} -Base URLs: -{{~data.api.servers :s}} -* {{=s.url}} -{{ for(var v in s.variables) { }} - * **{{=v}}** - {{=s.variables[v].description||''}} Default: {{=s.variables[v].default}} -{{? s.variables[v].enum}} -{{~ s.variables[v].enum :e}} - * {{= e}} -{{~}} -{{?}} -{{ } }} -{{~}} -{{?}} - {{? data.api.info.termsOfService}}Terms of service{{?}} -{{? data.api.info.contact}}{{? data.api.info.contact.email}}Email: {{=data.api.info.contact.name || 'Support'}} {{?}}{{? data.api.info.contact.url}}Web: {{= data.api.info.contact.name || 'Support'}} {{?}}{{?}} +{{? data.api.info.contact}}{{? data.api.info.contact.email}}
{{=data.api.info.contact.name || 'Support'}} {{?}}{{? data.api.info.contact.url}}Web: {{= data.api.info.contact.name || 'Support'}} {{?}}{{?}} {{? data.api.info.license}}{{? data.api.info.license.url}}License: {{=data.api.info.license.name}}{{??}} License: {{=data.api.info.license.name}}{{?}}{{?}} {{? data.api.components && data.api.components.securitySchemes }} diff --git a/source/images/favicon.ico b/source/images/favicon.ico index 4c12eede378..a0b2408b394 100644 Binary files a/source/images/favicon.ico and b/source/images/favicon.ico differ diff --git a/source/images/logo.png b/source/images/logo.png index 036beacd907..17dbda022cb 100644 Binary files a/source/images/logo.png and b/source/images/logo.png differ diff --git a/source/index.html.md b/source/index.html.md index 1f696d733ea..6e4d28f3f6d 100644 --- a/source/index.html.md +++ b/source/index.html.md @@ -15,22 +15,23 @@ headingLevel: 2 --- -Domotz Public API v0.6.0
+Domotz Public API v1.0.0-dev
> Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu. -The Domotz Public API. +### The Domotz Public API -Get your API Key and Base URL from the Domotz Portal or contact us. +Use the "API Key Endpoint" which you can retrieve from the Domotz Portal as the Base URL for your API calls. The Domotz Public API uses standard HTTP response codes, authentication, and verbs. JSON format is used in responses and accepted for request bodies. All date-time formats are expressed as yyyy-mm-ddThh:mm:ss. Date-time must be expressed in UTC. Specification of different TimeZones are not allowed. -Base URLs: +### Domotz Webhook +It is possible to subscribe to events happening on the Domotz platform, both at an Agent level and Device level, through the usage of Webhooks. -* your-domotz-api-endpoint/public-api/v1/ +Please refer to the [user-guide](https://help.domotz.com/user-guide/shared-alerts-webhooks-ticketing-systems/) on the usage of the Webhook as a possible contact channel to receive notification of events and how to create a Shared Alert Profile. Moreover, refer to [getAlertProfiles](#getalertprofiles), [bindAlertProfileToAgent](#bindalertprofiletoagent) and [bindAlertProfileToDevice](#bindalertprofiletodevice) on how to retrieve the list of Shared Alert Profiles and bind to Agents and Devices respectively. In those same sections you also have the list of all the possible Webhook events and references to the Schemas. Terms of service -Email: API Support +
API Support # Authentication @@ -46,7 +47,7 @@ Email: API Support > Code samples ```shell -curl -X GET your-domotz-api-endpoint/public-api/v1/agent \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -60,7 +61,7 @@ var headers = { }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent', + url: 'http://172.17.0.1:9080/public-api/v1/agent', method: 'get', headers: headers, @@ -80,7 +81,7 @@ const headers = { }; -fetch('your-domotz-api-endpoint/public-api/v1/agent', +fetch('http://172.17.0.1:9080/public-api/v1/agent', { method: 'GET', @@ -101,7 +102,7 @@ headers = { 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/agent', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent', params={ }, headers = headers) @@ -118,7 +119,7 @@ headers = { 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/agent', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent', params: { }, headers: headers @@ -143,7 +144,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/agent", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent", data) req.Header = headers client := &http.Client{} @@ -161,7 +162,7 @@ Returns the agents list-curl -X GET your-domotz-api-endpoint/public-api/v1/agent \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -173,8 +174,8 @@ Returns the agents list |Parameter|In|Type|Required|Description| |---|---|---|---|---| -|page_size|query|integer(int32)|false|The maximum number of items to return| -|page_number|query|integer(int32)|false|The requested page number, 0-indexed| +|page_size|query|integer(int32)|false|The maximum number of items to return. Min value is 1. Max value is 100. Default value is 10| +|page_number|query|integer(int32)|false|The requested page number, 0-indexed. Default value is 0| |display_name|query|string|false|Consider only agents with `display_name` containing the string (case insensitive)| |team_name|query|string|false|Filters by team name (companies only)| @@ -192,18 +193,22 @@ Returns the agents list }, "status": "OWNED" }, - "creation_time": "2019-06-11T09:08:10Z", + "creation_time": "2019-08-24T14:15:22Z", "display_name": "string", "id": 0, "licence": { - "activation_time": "2019-06-11T09:08:10Z", + "activation_time": "2019-08-24T14:15:22Z", "bound_mac_address": "string", "code": "string", - "expiration_time": "2019-06-11T09:08:10Z", + "expiration_time": "2019-08-24T14:15:22Z", "id": 0 }, + "location": { + "latitude": "string", + "longitude": "string" + }, "status": { - "last_change": "2019-06-11T09:08:10Z", + "last_change": "2019-08-24T14:15:22Z", "value": "ONLINE" }, "team": { @@ -250,6 +255,9 @@ Status Code **200** |»» code|string|false|none| |»» expiration_time|string(date-time)|false|none| |»» id|integer(int32)|false|none| +|» location|object|false|none| +|»» latitude|string|false|none| +|»» longitude|string|false|none| |» status|object|false|none| |»» last_change|string(date-time)|false|none| |»» value|string|false|none| @@ -282,7 +290,7 @@ Status Code **200** > Code samples ```shell -curl -X HEAD your-domotz-api-endpoint/public-api/v1/agent \ +curl -X HEAD http://172.17.0.1:9080/public-api/v1/agent \ -H 'X-Api-Key: API_KEY' ``` @@ -294,7 +302,7 @@ var headers = { }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent', + url: 'http://172.17.0.1:9080/public-api/v1/agent', method: 'head', headers: headers, @@ -313,7 +321,7 @@ const headers = { }; -fetch('your-domotz-api-endpoint/public-api/v1/agent', +fetch('http://172.17.0.1:9080/public-api/v1/agent', { method: 'HEAD', @@ -333,7 +341,7 @@ headers = { 'X-Api-Key': 'API_KEY' } -r = requests.head('your-domotz-api-endpoint/public-api/v1/agent', params={ +r = requests.head('http://172.17.0.1:9080/public-api/v1/agent', params={ }, headers = headers) @@ -349,7 +357,7 @@ headers = { 'X-Api-Key' => 'API_KEY' } -result = RestClient.head 'your-domotz-api-endpoint/public-api/v1/agent', +result = RestClient.head 'http://172.17.0.1:9080/public-api/v1/agent', params: { }, headers: headers @@ -373,7 +381,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("HEAD", "your-domotz-api-endpoint/public-api/v1/agent", data) + req, err := http.NewRequest("HEAD", "http://172.17.0.1:9080/public-api/v1/agent", data) req.Header = headers client := &http.Client{} @@ -391,7 +399,7 @@ Counts the agents-curl -X HEAD your-domotz-api-endpoint/public-api/v1/agent \ +curl -X HEAD http://172.17.0.1:9080/public-api/v1/agent \ -H 'X-Api-Key: API_KEY' @@ -417,6 +425,141 @@ Counts the agents |---|---|---|---|---| |204|X-Entities-Count|integer|int32|The number of agents matching the filtering criteria| +## deleteAgent + + + +> Code samples + +```shell +curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id} \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}', + method: 'delete', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); + +const headers = { + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}', +{ + method: 'DELETE', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'X-Api-Key': 'API_KEY' +} + +r = requests.delete('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.delete 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("DELETE", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`DELETE /agent/{agent_id}` + +Deletes an agent + +Curl
+ ++
+ ++curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id} \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| + ## getAgent @@ -424,7 +567,7 @@ Counts the agents > Code samples ```shell -curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id} \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id} \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -438,7 +581,7 @@ var headers = { }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}', method: 'get', headers: headers, @@ -458,7 +601,7 @@ const headers = { }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}', { method: 'GET', @@ -479,7 +622,7 @@ headers = { 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}', params={ }, headers = headers) @@ -496,7 +639,7 @@ headers = { 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}', params: { }, headers: headers @@ -521,7 +664,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}", data) req.Header = headers client := &http.Client{} @@ -539,7 +682,7 @@ Returns the details of an agent-curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id} \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id} \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -566,18 +709,22 @@ Returns the details of an agent }, "status": "OWNED" }, - "creation_time": "2019-06-11T09:08:10Z", + "creation_time": "2019-08-24T14:15:22Z", "display_name": "string", "id": 0, "licence": { - "activation_time": "2019-06-11T09:08:10Z", + "activation_time": "2019-08-24T14:15:22Z", "bound_mac_address": "string", "code": "string", - "expiration_time": "2019-06-11T09:08:10Z", + "expiration_time": "2019-08-24T14:15:22Z", "id": 0 }, + "location": { + "latitude": "string", + "longitude": "string" + }, "status": { - "last_change": "2019-06-11T09:08:10Z", + "last_change": "2019-08-24T14:15:22Z", "value": "ONLINE" }, "team": { @@ -593,11 +740,7 @@ Returns the details of an agent "agent": "string", "package": "string" }, - "listen_on": "string", - "location": { - "latitude": "string", - "longitude": "string" - } + "listen_on": "string" } ``` @@ -607,29 +750,29 @@ Returns the details of an agent |---|---|---|---| |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|The agent|[AgentDetail](#schemaagentdetail)| -device
- -## deleteDownDevices +## getConnectionConsumption - + > Code samples ```shell -curl -X DELETE your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/consumption \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' ``` ```javascript var headers = { + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device', - method: 'delete', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/consumption', + method: 'get', headers: headers, success: function(data) { @@ -643,13 +786,14 @@ $.ajax({ const fetch = require('node-fetch'); const headers = { + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/consumption', { - method: 'DELETE', + method: 'GET', headers: headers }) @@ -664,10 +808,11 @@ fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device', ```python import requests headers = { + 'Accept': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.delete('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/consumption', params={ }, headers = headers) @@ -680,10 +825,11 @@ require 'rest-client' require 'json' headers = { + 'Accept' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.delete 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/consumption', params: { }, headers: headers @@ -702,12 +848,13 @@ import ( func main() { headers := map[string][]string{ + "Accept": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("DELETE", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/consumption", data) req.Header = headers client := &http.Client{} @@ -717,41 +864,53 @@ func main() { ``` -`DELETE /agent/{agent_id}/device` +`GET /agent/{agent_id}/connection/consumption` -Deletes all the DOWN devices of *IP* protocol +Get the connection consumption on the given agentCurl
--curl -X DELETE your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/consumption \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
|Parameter|In|Type|Required|Description| |---|---|---|---|---| |agent_id|path|integer(int32)|true|Agent ID| -Responses
+> Example responses + +> 200 Response + +```json +{ + "current": 0, + "limit": 0 +} +``` + +Responses
|Status|Meaning|Description|Schema| |---|---|---|---| -|204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|none|[ConnectionConsumption](#schemaconnectionconsumption)| -## listDevices +## getAgentVPNActiveConnections - + > Code samples ```shell -curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -765,7 +924,7 @@ var headers = { }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session', method: 'get', headers: headers, @@ -785,7 +944,7 @@ const headers = { }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session', { method: 'GET', @@ -806,7 +965,7 @@ headers = { 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session', params={ }, headers = headers) @@ -823,7 +982,7 @@ headers = { 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session', params: { }, headers: headers @@ -848,7 +1007,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session", data) req.Header = headers client := &http.Client{} @@ -858,15 +1017,15 @@ func main() { ``` -`GET /agent/{agent_id}/device` +`GET /agent/{agent_id}/connection/vpn-session` -Returns all the devices of an agent +Get the Active VPN connections for the `agent`Curl
--curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -874,12 +1033,11 @@ Returns all the devices of an agentParameters
+Parameters
|Parameter|In|Type|Required|Description| |---|---|---|---|---| |agent_id|path|integer(int32)|true|Agent ID| -|show_hidden|query|boolean|false|Whether to include hidden devices in the returned list| > Example responses @@ -888,81 +1046,71 @@ Returns all the devices of an agent ```json [ { - "authentication_status": "AUTHENTICATED", - "details": { - "room": "string", - "snmp_read_community": "string", - "snmp_write_community": "string", - "zone": "string" - }, - "display_name": "string", - "first_seen_on": "2019-06-11T09:08:10Z", + "bytes": 0, + "creation_time": "2019-08-24T14:15:22Z", + "expiration_time": "2019-08-24T14:15:22Z", "id": 0, - "importance": "VITAL", - "main_id": 0, - "protocol": "IP", - "type": { - "detected_id": 0, - "id": 0 - }, - "user_data": { - "model": "string", - "name": "string", - "type": 0, - "vendor": "string" - } + "name": "string", + "status": "ACTIVE" } ] ``` -Responses
+Responses
|Status|Meaning|Description|Schema| |---|---|---|---| -|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|The list of all devices in the Agent's monitored networks|Inline| +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Agent VPN Connection information|Inline| -Response Schema
+Response Schema
+ +Status Code **200** + +|Name|Type|Required|Description| +|---|---|---|---|---| +|*anonymous*|[[AgentVPNActiveConnection](#schemaagentvpnactiveconnection)]|false|none| +|» bytes|integer(int32)|true|Current VPN connection consumption (bytes)| +|» creation_time|string(date-time)|true|none| +|» expiration_time|string(date-time)|true|none| +|» id|integer(int32)|true|The ID of the VPN connection| +|» name|string|true|The user that started the VPN connection| +|» status|string|true|The status of the vpn connection| #### Enumerated Values |Property|Value| |---|---| -|authentication_status|AUTHENTICATED| -|authentication_status|NO_AUTHENTICATION| -|authentication_status|PENDING| -|authentication_status|REQUIRED| -|authentication_status|WRONG_CREDENTIALS| -|importance|VITAL| -|importance|FLOATING| -|protocol|IP| -|protocol|DUMMY| -|protocol|IP_EXTERNAL| -|status|ONLINE| -|status|OFFLINE| -|status|DOWN| -|status|HIDDEN| +|status|ACTIVE| +|status|INACTIVE| +|status|EXPIRED| -## deleteDevice +actions
- +## createAgentVPNConnection + + > Code samples ```shell -curl -X DELETE your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id} \ +curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session \ + -H 'Content-Type: application/json' \ + -H 'Accept: text/plain' \ -H 'X-Api-Key: API_KEY' ``` ```javascript var headers = { + 'Content-Type':'application/json', + 'Accept':'text/plain', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}', - method: 'delete', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session', + method: 'post', headers: headers, success: function(data) { @@ -974,16 +1122,21 @@ $.ajax({ ```javascript--nodejs const fetch = require('node-fetch'); - +const inputBody = '{ + "allowed_ip": "string", + "routing_policy": "global" +}'; const headers = { + 'Content-Type':'application/json', + 'Accept':'text/plain', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session', { - method: 'DELETE', - + method: 'POST', + body: inputBody, headers: headers }) .then(function(res) { @@ -997,10 +1150,12 @@ fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id ```python import requests headers = { + 'Content-Type': 'application/json', + 'Accept': 'text/plain', 'X-Api-Key': 'API_KEY' } -r = requests.delete('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}', params={ +r = requests.post('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session', params={ }, headers = headers) @@ -1013,10 +1168,12 @@ require 'rest-client' require 'json' headers = { + 'Content-Type' => 'application/json', + 'Accept' => 'text/plain', 'X-Api-Key' => 'API_KEY' } -result = RestClient.delete 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}', +result = RestClient.post 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session', params: { }, headers: headers @@ -1035,12 +1192,14 @@ import ( func main() { headers := map[string][]string{ + "Content-Type": []string{"application/json"}, + "Accept": []string{"text/plain"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("DELETE", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}", data) + req, err := http.NewRequest("POST", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session", data) req.Header = headers client := &http.Client{} @@ -1050,56 +1209,3851 @@ func main() { ``` -`DELETE /agent/{agent_id}/device/{device_id}` +`POST /agent/{agent_id}/connection/vpn-session` -Deletes a device, whether ONLINE, OFFLINE or DOWN . If a device is deleted while online, it may reappear when rediscovered automatically +Creates a temporary VPN server on the `agent` and returns the vpn configuration file content. Current consumption and consumption limits can be retrieved with a call to getConnectionConsumption endpoint + +> Body parameter + +```json +{ + "allowed_ip": "string", + "routing_policy": "global" +} +```Curl
--curl -X DELETE your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id} \ +curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session \ + -H 'Content-Type: application/json' \ + -H 'Accept: text/plain' \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
|Parameter|In|Type|Required|Description| |---|---|---|---|---| |agent_id|path|integer(int32)|true|Agent ID| -|device_id|path|integer(int32)|true|Device ID| +|body|body|[AgentVPNConnection](#schemaagentvpnconnection)|true|none| -Responses
+> Example responses + +> 201 Response + +Responses
|Status|Meaning|Description|Schema| |---|---|---|---| -|204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| +|201|[Created](https://tools.ietf.org/html/rfc7231#section-6.3.2)|OpenVPN Configuration file content|string| -## getDevice +## deleteAgentVPNConnection - + > Code samples ```shell -curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id} \ - -H 'Accept: application/json' \ +curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session/{vpn_session_id} \ -H 'X-Api-Key: API_KEY' ``` ```javascript var headers = { - 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session/{vpn_session_id}', + method: 'delete', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); + +const headers = { + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session/{vpn_session_id}', +{ + method: 'DELETE', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'X-Api-Key': 'API_KEY' +} + +r = requests.delete('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session/{vpn_session_id}', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.delete 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session/{vpn_session_id}', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("DELETE", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session/{vpn_session_id}", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`DELETE /agent/{agent_id}/connection/vpn-session/{vpn_session_id}` + +Closes an active VPN connection session for the `agent` + +Curl
+ ++
+ ++curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/connection/vpn-session/{vpn_session_id} \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| +|session_id|path|integer(int32)|true|Session ID| + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| + +## connectToDevice + + + +> Code samples + +```shell +curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/connection \ + -H 'Content-Type: application/json' \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'Content-Type':'application/json', + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/connection', + method: 'post', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); +const inputBody = '{ + "allowed_ip": "string", + "port": 0, + "protocol": "http" +}'; +const headers = { + 'Content-Type':'application/json', + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/connection', +{ + method: 'POST', + body: inputBody, + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'Content-Type': 'application/json', + 'Accept': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.post('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/connection', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'Content-Type' => 'application/json', + 'Accept' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.post 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/connection', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Content-Type": []string{"application/json"}, + "Accept": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("POST", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/connection", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`POST /agent/{agent_id}/device/{device_id}/connection` + +Establishes a direct secure connection to the `device` Current consumption and consumption limits can be retrieved with a call to getConnectionConsumption endpoint + +> Body parameter + +```json +{ + "allowed_ip": "string", + "port": 0, + "protocol": "http" +} +``` + +Curl
+ ++
+ ++curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/connection \ + -H 'Content-Type: application/json' \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| +|device_id|path|integer(int32)|true|Device ID| +|body|body|[DeviceConnection](#schemadeviceconnection)|true|none| + +> Example responses + +> 201 Response + +```json +{ + "allowed_ip": "string", + "expiration": "2019-08-24T14:15:22Z", + "id": 0, + "link": "string", + "port": 0, + "protocol": "http" +} +``` + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|201|[Created](https://tools.ietf.org/html/rfc7231#section-6.3.2)|none|[ConnectionSession](#schemaconnectionsession)| + +device
+ +## deleteDownDevices + + + +> Code samples + +```shell +curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device', + method: 'delete', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); + +const headers = { + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device', +{ + method: 'DELETE', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'X-Api-Key': 'API_KEY' +} + +r = requests.delete('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.delete 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("DELETE", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`DELETE /agent/{agent_id}/device` + +Deletes all the DOWN devices of *IP* protocol + +Curl
+ ++
+ ++curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| + +## listDevices + + + +> Code samples + +```shell +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); + +const headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'Accept': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`GET /agent/{agent_id}/device` + +Returns all the devices of an agent + +Curl
+ ++
+ ++curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| +|show_hidden|query|boolean|false|Whether to include hidden devices in the returned list| + +> Example responses + +> 200 Response + +```json +[ + { + "authentication_status": "AUTHENTICATED", + "details": { + "room": "string", + "snmp_read_community": "string", + "snmp_write_community": "string", + "zone": "string" + }, + "display_name": "string", + "first_seen_on": "2019-08-24T14:15:22Z", + "id": 0, + "importance": "VITAL", + "main_id": 0, + "protocol": "IP", + "type": { + "detected_id": 0, + "id": 0 + }, + "user_data": { + "model": "string", + "name": "string", + "type": 0, + "vendor": "string" + } + } +] +``` + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|The list of all devices in the Agent's monitored networks|Inline| + +Response Schema
+ +#### Enumerated Values + +|Property|Value| +|---|---| +|authentication_status|AUTHENTICATED| +|authentication_status|NO_AUTHENTICATION| +|authentication_status|PENDING| +|authentication_status|REQUIRED| +|authentication_status|WRONG_CREDENTIALS| +|importance|VITAL| +|importance|FLOATING| +|protocol|IP| +|protocol|DUMMY| +|protocol|IP_EXTERNAL| +|status|ONLINE| +|status|OFFLINE| +|status|DOWN| +|status|HIDDEN| + +## deleteDevice + + + +> Code samples + +```shell +curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id} \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}', + method: 'delete', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); + +const headers = { + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}', +{ + method: 'DELETE', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'X-Api-Key': 'API_KEY' +} + +r = requests.delete('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.delete 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("DELETE", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`DELETE /agent/{agent_id}/device/{device_id}` + +Deletes a device, whether ONLINE, OFFLINE or DOWN . If a device is deleted while online, it may reappear when rediscovered automatically + +Curl
+ ++
+ ++curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id} \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| +|device_id|path|integer(int32)|true|Device ID| + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| + +## getDevice + + + +> Code samples + +```shell +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id} \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); + +const headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'Accept': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`GET /agent/{agent_id}/device/{device_id}` + +Returns the details of a device + +Curl
+ ++
+ ++curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id} \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| +|device_id|path|integer(int32)|true|Device ID| + +> Example responses + +> 200 Response + +```json +{ + "authentication_status": "AUTHENTICATED", + "details": { + "room": "string", + "snmp_read_community": "string", + "snmp_write_community": "string", + "zone": "string" + }, + "display_name": "string", + "first_seen_on": "2019-08-24T14:15:22Z", + "id": 0, + "importance": "VITAL", + "main_id": 0, + "protocol": "IP", + "type": { + "detected_id": 0, + "id": 0 + }, + "user_data": { + "model": "string", + "name": "string", + "type": 0, + "vendor": "string" + } +} +``` + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|An object containing the device details|Inline| + +Response Schema
+ +#### Enumerated Values + +|Property|Value| +|---|---| +|authentication_status|AUTHENTICATED| +|authentication_status|NO_AUTHENTICATION| +|authentication_status|PENDING| +|authentication_status|REQUIRED| +|authentication_status|WRONG_CREDENTIALS| +|importance|VITAL| +|importance|FLOATING| +|protocol|IP| +|protocol|DUMMY| +|protocol|IP_EXTERNAL| +|status|ONLINE| +|status|OFFLINE| +|status|DOWN| +|status|HIDDEN| + +## getDevicePowerActions + + + +> Code samples + +```shell +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); + +const headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'Accept': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`GET /agent/{agent_id}/device/{device_id}/action/power` + +Returns the power management actions available on the device at the current moment.See DevicePowerAction schema for further details. + +Curl
+ ++
+ ++curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| +|device_id|path|integer(int32)|true|Device ID| + +> Example responses + +> 200 Response + +```json +{ + "cycle": true, + "off": true, + "on": true, + "software_reboot": true +} +``` + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Returns a JSON object indicating the current availability of each power action on the device|[DevicePowerAction](#schemadevicepoweraction)| + +## powerActionOnDevice + + + +> Code samples + +```shell +curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field} \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field}', + method: 'post', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); + +const headers = { + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field}', +{ + method: 'POST', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'X-Api-Key': 'API_KEY' +} + +r = requests.post('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field}', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.post 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field}', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("POST", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field}", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`POST /agent/{agent_id}/device/{device_id}/action/power/{field}` + +Performs the action on the device, according to the specified { field } value. The availability of such operations can be determined with a call to getDevicePowerActions operation + +Curl
+ ++
+ ++curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field} \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| +|device_id|path|integer(int32)|true|Device ID| +|field|path|string|true|Specifies the power action to perform| + +#### Enumerated Values + +|Parameter|Value| +|---|---| +|field|on| +|field|off| +|field|cycle| +|field|software-reboot| + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| + +## setCredentials + + + +> Code samples + +```shell +curl -X PUT http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/credentials \ + -H 'Content-Type: application/json' \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'Content-Type':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/credentials', + method: 'put', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); +const inputBody = '{ + "password": "string", + "username": "string" +}'; +const headers = { + 'Content-Type':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/credentials', +{ + method: 'PUT', + body: inputBody, + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'Content-Type': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.put('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/credentials', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'Content-Type' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.put 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/credentials', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Content-Type": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("PUT", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/credentials", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`PUT /agent/{agent_id}/device/{device_id}/credentials` + +Sets the device credentials to perform extended discovery. This operation will affect the authentication_status of the device + +> Body parameter + +```json +{ + "password": "string", + "username": "string" +} +``` + +Curl
+ ++
+ ++curl -X PUT http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/credentials \ + -H 'Content-Type: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| +|device_id|path|integer(int32)|true|Device ID| +|body|body|[DeviceCredentials](#schemadevicecredentials)|true|device credentials payload| + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| + +## getSNMPAuthentication + + + +> Code samples + +```shell +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); + +const headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'Accept': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`GET /agent/{agent_id}/device/{device_id}/snmp-authentication` + +Retrieves the SNMP authentication info + +Curl
+ ++
+ ++curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| +|device_id|path|integer(int32)|true|Device ID| + +> Example responses + +> 200 Response + +```json +{ + "authentication_key": "string", + "authentication_protocol": "MD5", + "encryption_key": "string", + "encryption_protocol": "DES", + "snmp_read_community": "string", + "snmp_write_community": "string", + "username": "string", + "version": "V2" +} +``` + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|The SNMP authentication info for the device|[SNMPDomotzAuthentication](#schemasnmpdomotzauthentication)| + +## setSNMPAuthentication + + + +> Code samples + +```shell +curl -X PUT http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication \ + -H 'Content-Type: application/json' \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'Content-Type':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication', + method: 'put', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); +const inputBody = '{ + "authentication_key": "string", + "authentication_protocol": "MD5", + "encryption_key": "string", + "encryption_protocol": "DES", + "snmp_read_community": "string", + "snmp_write_community": "string", + "username": "string", + "version": "V2" +}'; +const headers = { + 'Content-Type':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication', +{ + method: 'PUT', + body: inputBody, + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'Content-Type': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.put('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'Content-Type' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.put 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Content-Type": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("PUT", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`PUT /agent/{agent_id}/device/{device_id}/snmp-authentication` + +Sets the SNMP authentication info.- _snmp_read_community_ and _snmp_write_community_ are relevant only for _V1_ and _V2_.
- _V3_NO_AUTH_ requires a valid _username_.
- _V3_AUTH_NO_PRIV_ requires _username_, _authentication_protocol_ and _authentication_key_.
- _V3_AUTH_PRIV_ requires _username_, _authentication_protocol_, _authentication_key_, _encryption_protocol_ and _encryption_key_.
Curl
+ ++
+ ++curl -X PUT http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication \ + -H 'Content-Type: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| +|device_id|path|integer(int32)|true|Device ID| +|body|body|[SNMPDomotzAuthentication](#schemasnmpdomotzauthentication)|true|none| + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| + +## setSnmpCommunity + + + +> Code samples + +```shell +curl -X PUT http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community \ + -H 'Content-Type: application/json' \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'Content-Type':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community', + method: 'put', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); +const inputBody = '{ + "read": "string", + "write": "string" +}'; +const headers = { + 'Content-Type':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community', +{ + method: 'PUT', + body: inputBody, + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'Content-Type': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.put('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'Content-Type' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.put 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Content-Type": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("PUT", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`PUT /agent/{agent_id}/device/{device_id}/snmp-community` + +Saves a snmp community (read, optionally write) on device. _Deprecated_, please use setSNMPAuthentication + +> Body parameter + +```json +{ + "read": "string", + "write": "string" +} +``` + +Curl
+ ++
+ ++curl -X PUT http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community \ + -H 'Content-Type: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| +|device_id|path|integer(int32)|true|Device ID| +|body|body|[DeviceSnmpCommunity](#schemadevicesnmpcommunity)|true|The value that the snmp community entries will change to| + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| + +## hideDevice + + + +> Code samples + +```shell +curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/visibility \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/visibility', + method: 'delete', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); + +const headers = { + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/visibility', +{ + method: 'DELETE', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'X-Api-Key': 'API_KEY' +} + +r = requests.delete('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/visibility', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.delete 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/visibility', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("DELETE", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/visibility", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`DELETE /agent/{agent_id}/device/{device_id}/visibility` + +Hides a device (available only on DOWN devices) + +Curl
+ ++
+ ++curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/visibility \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| +|device_id|path|integer(int32)|true|Device ID| + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| + +## editDevice + + + +> Code samples + +```shell +curl -X PUT http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/{field} \ + -H 'Content-Type: application/json' \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'Content-Type':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/{field}', + method: 'put', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); +const inputBody = 'string'; +const headers = { + 'Content-Type':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/{field}', +{ + method: 'PUT', + body: inputBody, + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'Content-Type': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.put('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/{field}', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'Content-Type' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.put 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/{field}', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Content-Type": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("PUT", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/{field}", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`PUT /agent/{agent_id}/device/{device_id}/{field}` + +Changes a field of the device or one of its details + +> Body parameter + +```json +"string" +``` + +Curl
+ ++
+ ++curl -X PUT http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/{field} \ + -H 'Content-Type: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| +|device_id|path|integer(int32)|true|Device ID| +|field|path|string|true|The field to update - for the type and valid values see the description of the corresponding output parameter| +|body|body|string|true|The value that the field will change to| + +#### Enumerated Values + +|Parameter|Value| +|---|---| +|field|importance| +|field|user_data/model| +|field|user_data/type| +|field|user_data/name| +|field|user_data/vendor| +|field|details/room| +|field|details/zone| + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| + +metrics
+ +## getAgentRTDStats + + + +> Code samples + +```shell +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/rtd \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/rtd', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); + +const headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/rtd', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'Accept': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/rtd', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/rtd', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/rtd", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`GET /agent/{agent_id}/device/rtd` + +Returns the Round Trip Delay statistics for all devices monitored by the agent. The aggregate values of _avg_min_, _avg_max_, _avg_median_ help to understand the baseline response time of a device in a weekly time frame, while _latest_median_ helps detecting a possible deviation from the baseline + +Curl
+ ++
+ ++curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/rtd \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| + +> Example responses + +> 200 Response + +```json +[ + { + "avg_max": "string", + "avg_median": "string", + "avg_min": "string", + "device_id": 0, + "latest_lost_packet_count": 0, + "latest_median": "string", + "latest_sent_packet_count": 0, + "timestamp": "2019-08-24T14:15:22Z" + } +] +``` + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Devices RTD Statistics|Inline| + +Response Schema
+ +Status Code **200** + +|Name|Type|Required|Description| +|---|---|---|---|---| +|*anonymous*|[[DeviceRTDStatistics](#schemadevicertdstatistics)]|false|none| +|» avg_max|string|false|none| +|» avg_median|string|false|none| +|» avg_min|string|false|none| +|» device_id|integer(int32)|true|none| +|» latest_lost_packet_count|integer(int32)|false|The number of lost packets of the latest collection sample| +|» latest_median|string|false|The median value of the latest collection sample| +|» latest_sent_packet_count|integer(int32)|false|The number of sent packets of the latest collection sample| +|» timestamp|string(date-time)|true|The timestamp of the latest update| + +## getDeviceStatusHistory + + + +> Code samples + +```shell +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); + +const headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'Accept': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`GET /agent/{agent_id}/device/{device_id}/history/network/event` + +Returns the time series of the state changes of the device + +Curl
+ ++
+ ++curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| +|device_id|path|integer(int32)|true|Device ID| +|from|query|string(date-time)|false|The start time of the time series. Default value is one week| +|to|query|string(date-time)|false|The end time of the time series. Default value is now| + +> Example responses + +> 200 Response + +```json +[ + { + "details": { + "new_ip": [ + "string" + ], + "old_ip": [ + "string" + ] + }, + "timestamp": "2019-08-24T14:15:22Z", + "type": "IP_CHANGE" + } +] +``` + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|A time series|Inline| + +Response Schema
+ +Status Code **200** + +|Name|Type|Required|Description| +|---|---|---|---|---| +|*anonymous*|[[DeviceHistory](#schemadevicehistory)]|false|none| +|» details|object|false|none| +|»» new_ip|[string]|false|The new IP addresses| +|»» old_ip|[string]|false|The old IP addresses| +|» timestamp|string(date-time)|true|The time the sample was reported to Domotz| +|» type|string|true|The device event type| + +#### Enumerated Values + +|Property|Value| +|---|---| +|type|IP_CHANGE| +|type|CREATED| +|type|UP| +|type|DOWN| + +## getDeviceRTDHistory + + + +> Code samples + +```shell +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); + +const headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'Accept': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`GET /agent/{agent_id}/device/{device_id}/history/rtd` + +Returns the Round Trip Delay history for the device. Each item represents the statistical aggregate of a set of Round Trip Delay measurements + +Curl
+ ++
+ ++curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| +|device_id|path|integer(int32)|true|Device ID| +|from|query|string(date-time)|false|The start time of the time series. Default value is one week| +|to|query|string(date-time)|false|The end time of the time series. Default value is now| + +> Example responses + +> 200 Response + +```json +[ + { + "lost_packet_count": 0, + "max": "string", + "median": "string", + "min": "string", + "sent_packet_count": 0, + "timestamp": "2019-08-24T14:15:22Z" + } +] +``` + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Device RTD History|Inline| + +Response Schema
+ +Status Code **200** + +|Name|Type|Required|Description| +|---|---|---|---|---| +|*anonymous*|[[DeviceRTDHistorySample](#schemadevicertdhistorysample)]|false|none| +|» lost_packet_count|integer(int32)|false|none| +|» max|string|false|none| +|» median|string|false|none| +|» min|string|false|none| +|» sent_packet_count|integer(int32)|false|none| +|» timestamp|string(date-time)|true|The time the sample was reported to Domotz| + +## getAgentStatusHistory + + + +> Code samples + +```shell +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/event \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/event', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); + +const headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/event', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'Accept': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/event', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/event', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/event", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`GET /agent/{agent_id}/history/network/event` + +Returns the time series of the state changes of the agent + +Curl
+ ++
+ ++curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/event \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| +|from|query|string(date-time)|false|The start time of the time series. Default value is one week| +|to|query|string(date-time)|false|The end time of the time series. Default value is now| + +> Example responses + +> 200 Response + +```json +[ + { + "timestamp": "2019-08-24T14:15:22Z", + "type": "CONNECTION_RECOVERED" + } +] +``` + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|A time series|Inline| + +Response Schema
+ +Status Code **200** + +|Name|Type|Required|Description| +|---|---|---|---|---| +|*anonymous*|[[AgentHistory](#schemaagenthistory)]|false|none| +|» timestamp|string(date-time)|true|The time the sample was reported to Domotz| +|» type|string|true|The agent event type| + +#### Enumerated Values + +|Property|Value| +|---|---| +|type|CONNECTION_RECOVERED| +|type|CONNECTION_LOST| +|type|UP| +|type|DOWN| + +## getSpeedTestHistory + + + +> Code samples + +```shell +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/speed \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/speed', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); + +const headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/speed', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'Accept': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/speed', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/speed', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/speed", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`GET /agent/{agent_id}/history/network/speed` + +Returns the time series of the Internet Speed measurements taken from the agent, both in +download and in upload. + +Curl
+ ++
+ ++curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/history/network/speed \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| +|from|query|string(date-time)|false|The start time of the time series. Default value is one week| +|to|query|string(date-time)|false|The end time of the time series. Default value is now| + +> Example responses + +> 200 Response + +```json +[ + { + "timestamp": "2019-08-24T14:15:22Z", + "values": [ + 0 + ] + } +] +``` + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|A time series|Inline| + +Response Schema
+ +Status Code **200** + +|Name|Type|Required|Description| +|---|---|---|---|---| +|*anonymous*|[[NetworkSpeedSample](#schemanetworkspeedsample)]|false|[A Network Speed Sample is the result of the measurement of the Internet download and upload speed, in bits per second, taken by the Agent]| +|» timestamp|string(date-time)|false|The time the sample was reported to Domotz| +|» values|[integer]|false|A pair of values: the download and upload speed, in Bit Per Seconds (bps), as measured by the Agent| + +SNMP/TCP SENSORS
+ +## listEyesSNMP + + + +> Code samples + +```shell +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); + +const headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'Accept': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`GET /agent/{agent_id}/device/{device_id}/eye/snmp` + +Retrieves the list of configured SNMP Domotz Eyes + +Curl
+ ++
+ ++curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| +|device_id|path|integer(int32)|true|Device ID| + +> Example responses + +> 200 Response + +```json +[ + { + "category": "OTHER", + "id": 0, + "last_update": "2019-08-24T14:15:22Z", + "latest_value": "string", + "name": "string", + "oid": "string", + "value_type": "STRING" + } +] +``` + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|The list of configured SNMP Domotz Eyes for the device and their latest values|Inline| + +Response Schema
+ +Status Code **200** + +|Name|Type|Required|Description| +|---|---|---|---|---| +|*anonymous*|[[SNMPDomotzEye](#schemasnmpdomotzeye)]|false|[Information about a configured SNMP Domotz Eye]| +|» category|string|true|The category of the OID| +|» id|integer(int32)|true|The unique identifier of the SNMP Domotz Eye| +|» last_update|string(date-time)|true|The timestamp of the latest update| +|» latest_value|string|true|The value retrieved on the OID| +|» name|string|true|The name of the Domotz Eyes| +|» oid|string|true|The OID string| +|» value_type|string|true|The type of the OID| + +#### Enumerated Values + +|Property|Value| +|---|---| +|category|OTHER| +|category|CONSUMABLE| +|category|CPU| +|category|DISK_SPACE| +|category|MEMORY| +|category|NETWORK_TRAFFIC| +|category|TEMPERATURE| +|value_type|STRING| +|value_type|NUMERIC| + +## createEyeSNMP + + + +> Code samples + +```shell +curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp \ + -H 'Content-Type: application/json' \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'Content-Type':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp', + method: 'post', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); +const inputBody = '{ + "category": "OTHER", + "name": "string", + "oid": "string", + "value_type": "STRING" +}'; +const headers = { + 'Content-Type':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp', +{ + method: 'POST', + body: inputBody, + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'Content-Type': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.post('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'Content-Type' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.post 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Content-Type": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("POST", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`POST /agent/{agent_id}/device/{device_id}/eye/snmp` + +Creates a new SNMP Domotz Eyes + +> Body parameter + +```json +{ + "category": "OTHER", + "name": "string", + "oid": "string", + "value_type": "STRING" +} +``` + +Curl
+ ++
+ ++curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp \ + -H 'Content-Type: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| +|device_id|path|integer(int32)|true|Device ID| +|body|body|[SNMPDomotzEyeCreation](#schemasnmpdomotzeyecreation)|true|none| + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|201|[Created](https://tools.ietf.org/html/rfc7231#section-6.3.2)|none|None| + +## deleteEyeSNMP + + + +> Code samples + +```shell +curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id} \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}', + method: 'delete', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); + +const headers = { + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}', +{ + method: 'DELETE', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'X-Api-Key': 'API_KEY' +} + +r = requests.delete('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.delete 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("DELETE", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`DELETE /agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}` + +Deletes the SNMP Domotz Eye + +Curl
+ ++
+ ++curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id} \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| +|device_id|path|integer(int32)|true|Device ID| +|sensor_id|path|integer(int32)|true|SNMP Eye ID| + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| + +## listEyesSNMPTriggerFunction + + + +> Code samples + +```shell +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/function \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/function', + method: 'get', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); + +const headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/function', +{ + method: 'GET', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'Accept': 'application/json', + 'X-Api-Key': 'API_KEY' +} + +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/function', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'Accept' => 'application/json', + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/function', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "Accept": []string{"application/json"}, + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/function", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`GET /agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/function` + +Retrieves the list of functions for the SNMP trigger Domotz Eyes + +Curl
+ ++
+ ++curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/function \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| +|device_id|path|integer(int32)|true|Device ID| +|sensor_id|path|integer(int32)|true|SNMP Eye ID| + +> Example responses + +> 200 Response + +```json +[ + { + "cardinality": 0, + "id": 0, + "name": "string", + "value_types": "STRING" + } +] +``` + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|The list of functions that can be used by the trigger|Inline| + +Response Schema
+ +Status Code **200** + +|Name|Type|Required|Description| +|---|---|---|---|---| +|*anonymous*|[[SNMPDomotzEyeTriggerFunction](#schemasnmpdomotzeyetriggerfunction)]|false|[Information about a trigger function]| +|» cardinality|integer(int32)|true|The number of arguments of the function| +|» id|integer(int32)|true|The unique identifier of the SNMP Trigger function| +|» name|string|true|The name of the function| +|» value_types|string|true|The type of the operands| + +#### Enumerated Values + +|Property|Value| +|---|---| +|value_types|STRING| +|value_types|NUMERIC| + +## getEyesSNMPHistory + + + +> Code samples + +```shell +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/history \ + -H 'Accept: application/json' \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'Accept':'application/json', + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/history', method: 'get', headers: headers, @@ -1119,7 +5073,7 @@ const headers = { }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/history', { method: 'GET', @@ -1140,7 +5094,7 @@ headers = { 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/history', params={ }, headers = headers) @@ -1157,7 +5111,7 @@ headers = { 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/history', params: { }, headers: headers @@ -1182,7 +5136,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/history", data) req.Header = headers client := &http.Client{} @@ -1192,15 +5146,15 @@ func main() { ``` -`GET /agent/{agent_id}/device/{device_id}` +`GET /agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/history` -Returns the details of a device +Returns the time series of the SNMP Domotz Eyes collected samplesCurl
--curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id} \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/history \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -1208,80 +5162,53 @@ Returns the details of a deviceParameters
+Parameters
|Parameter|In|Type|Required|Description| |---|---|---|---|---| |agent_id|path|integer(int32)|true|Agent ID| |device_id|path|integer(int32)|true|Device ID| +|sensor_id|path|integer(int32)|true|SNMP Eye ID| +|from|query|string(date-time)|false|The start time of the time series. Default value is one week| +|to|query|string(date-time)|false|The end time of the time series. Default value is now| > Example responses > 200 Response ```json -{ - "authentication_status": "AUTHENTICATED", - "details": { - "room": "string", - "snmp_read_community": "string", - "snmp_write_community": "string", - "zone": "string" - }, - "display_name": "string", - "first_seen_on": "2019-06-11T09:08:10Z", - "id": 0, - "importance": "VITAL", - "main_id": 0, - "protocol": "IP", - "type": { - "detected_id": 0, - "id": 0 - }, - "user_data": { - "model": "string", - "name": "string", - "type": 0, - "vendor": "string" +[ + { + "timestamp": "2019-08-24T14:15:22Z", + "value": "string" } -} +] ``` -Responses
+Responses
|Status|Meaning|Description|Schema| |---|---|---|---| -|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|An object containing the device details|Inline| +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|The list of SNMP Domotz Eyes samples|Inline| -Response Schema
+Response Schema
-#### Enumerated Values +Status Code **200** -|Property|Value| -|---|---| -|authentication_status|AUTHENTICATED| -|authentication_status|NO_AUTHENTICATION| -|authentication_status|PENDING| -|authentication_status|REQUIRED| -|authentication_status|WRONG_CREDENTIALS| -|importance|VITAL| -|importance|FLOATING| -|protocol|IP| -|protocol|DUMMY| -|protocol|IP_EXTERNAL| -|status|ONLINE| -|status|OFFLINE| -|status|DOWN| -|status|HIDDEN| +|Name|Type|Required|Description| +|---|---|---|---|---| +|*anonymous*|[[DeviceEyeSNMPHistorySample](#schemadeviceeyesnmphistorysample)]|false|none| +|» timestamp|string(date-time)|true|The time the sample was reported to Domotz| +|» value|string|true|none| -## getDevicePowerActions +## listEyesSNMPTrigger - + > Code samples ```shell -curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -1295,7 +5222,7 @@ var headers = { }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger', method: 'get', headers: headers, @@ -1315,7 +5242,7 @@ const headers = { }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger', { method: 'GET', @@ -1336,7 +5263,7 @@ headers = { 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger', params={ }, headers = headers) @@ -1353,7 +5280,7 @@ headers = { 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger', params: { }, headers: headers @@ -1378,7 +5305,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger", data) req.Header = headers client := &http.Client{} @@ -1388,15 +5315,15 @@ func main() { ``` -`GET /agent/{agent_id}/device/{device_id}/action/power` +`GET /agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger` -Returns the power management actions available on the device at the current moment. See DevicePowerAction schema for further details. +Retrieves the list of triggers for the SNMP SensorCurl
--curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -1404,52 +5331,80 @@ Returns the power management actions available on the device at the current momeParameters
+Parameters
|Parameter|In|Type|Required|Description| |---|---|---|---|---| |agent_id|path|integer(int32)|true|Agent ID| |device_id|path|integer(int32)|true|Device ID| +|sensor_id|path|integer(int32)|true|SNMP Eye ID| > Example responses > 200 Response ```json -{ - "cycle": true, - "off": true, - "on": true, - "software_reboot": true -} +[ + { + "alert": { + "email": true, + "mobile": true + }, + "creation_time": "2019-08-24T14:15:22Z", + "function_id": 0, + "id": 0, + "name": "string", + "operands": [ + "string" + ] + } +] ``` -Responses
+Responses
|Status|Meaning|Description|Schema| |---|---|---|---| -|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Returns a JSON object indicating the current availability of each power action on the device|[DevicePowerAction](#schemadevicepoweraction)| +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|The list of triggers associated to the sensor|Inline| -## powerActionOnDevice +Response Schema
- +Status Code **200** + +|Name|Type|Required|Description| +|---|---|---|---|---| +|*anonymous*|[[SNMPDomotzEyeTrigger](#schemasnmpdomotzeyetrigger)]|false|[Information about a trigger]| +|» alert|object|false|The alerts details| +|»» email|boolean|false|True if the email alert is active| +|»» mobile|boolean|false|True if the mobile alert is active| +|» creation_time|string(date-time)|false|none| +|» function_id|integer(int32)|true|The unique identifier of the function assigned to the trigger| +|» id|integer(int32)|true|The unique identifier of the SNMP Trigger| +|» name|string|true|The name of the trigger| +|» operands|[string]|true|The operands for the function| + +## createEyeSNMPTrigger + + > Code samples ```shell -curl -X POST your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field} \ +curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger \ + -H 'Content-Type: application/json' \ -H 'X-Api-Key: API_KEY' ``` ```javascript var headers = { + 'Content-Type':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field}', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger', method: 'post', headers: headers, @@ -1462,16 +5417,23 @@ $.ajax({ ```javascript--nodejs const fetch = require('node-fetch'); - +const inputBody = '{ + "function_id": 0, + "name": "string", + "operands": [ + "string" + ] +}'; const headers = { + 'Content-Type':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field}', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger', { method: 'POST', - + body: inputBody, headers: headers }) .then(function(res) { @@ -1485,10 +5447,11 @@ fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id ```python import requests headers = { + 'Content-Type': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.post('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field}', params={ +r = requests.post('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger', params={ }, headers = headers) @@ -1501,10 +5464,11 @@ require 'rest-client' require 'json' headers = { + 'Content-Type' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.post 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field}', +result = RestClient.post 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger', params: { }, headers: headers @@ -1523,12 +5487,13 @@ import ( func main() { headers := map[string][]string{ + "Content-Type": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("POST", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field}", data) + req, err := http.NewRequest("POST", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger", data) req.Header = headers client := &http.Client{} @@ -1538,67 +5503,74 @@ func main() { ``` -`POST /agent/{agent_id}/device/{device_id}/action/power/{field}` +`POST /agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger` -Performs the action on the device, according to the specified { field } value. The availability of such operations can be determined with a call to getDevicePowerActions operation +Creates a new SNMP Trigger for the sensor. + +For instance, to receive a notification when the value of the sensor is above a threshold x, it is required to add a trigger specifying the function_id = 2 (is greater than) and the operand value equals to [x]. +The function_id value can be retrieved with the listEyesSNMPTriggerFunction call. +To activate the alert, it is required to call createEyeSNMPTriggerAlert after the trigger creation. + +> Body parameter + +```json +{ + "function_id": 0, + "name": "string", + "operands": [ + "string" + ] +} +```Curl
--curl -X POST your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field} \ +curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger \ + -H 'Content-Type: application/json' \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
|Parameter|In|Type|Required|Description| |---|---|---|---|---| |agent_id|path|integer(int32)|true|Agent ID| |device_id|path|integer(int32)|true|Device ID| -|field|path|string|true|Specifies the power action to perform| - -#### Enumerated Values +|sensor_id|path|integer(int32)|true|SNMP Eye ID| +|body|body|[SNMPDomotzSnmpTriggerCreation](#schemasnmpdomotzsnmptriggercreation)|true|none| -|Parameter|Value| -|---|---| -|field|on| -|field|off| -|field|software-reboot| -|field|cycle| - -Responses
+Responses
|Status|Meaning|Description|Schema| |---|---|---|---| -|204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| +|201|[Created](https://tools.ietf.org/html/rfc7231#section-6.3.2)|none|None| -## setCredentials +## deleteEyeSNMPTrigger - + > Code samples ```shell -curl -X PUT your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/credentials \ - -H 'Content-Type: application/json' \ +curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id} \ -H 'X-Api-Key: API_KEY' ``` ```javascript var headers = { - 'Content-Type':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/credentials', - method: 'put', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}', + method: 'delete', headers: headers, success: function(data) { @@ -1610,20 +5582,16 @@ $.ajax({ ```javascript--nodejs const fetch = require('node-fetch'); -const inputBody = '{ - "password": "string", - "username": "string" -}'; + const headers = { - 'Content-Type':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/credentials', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}', { - method: 'PUT', - body: inputBody, + method: 'DELETE', + headers: headers }) .then(function(res) { @@ -1637,11 +5605,10 @@ fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id ```python import requests headers = { - 'Content-Type': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.put('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/credentials', params={ +r = requests.delete('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}', params={ }, headers = headers) @@ -1654,11 +5621,10 @@ require 'rest-client' require 'json' headers = { - 'Content-Type' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.put 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/credentials', +result = RestClient.delete 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}', params: { }, headers: headers @@ -1677,13 +5643,12 @@ import ( func main() { headers := map[string][]string{ - "Content-Type": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("PUT", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/credentials", data) + req, err := http.NewRequest("DELETE", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}", data) req.Header = headers client := &http.Client{} @@ -1693,68 +5658,57 @@ func main() { ``` -`PUT /agent/{agent_id}/device/{device_id}/credentials` - -Sets the device credentials to perform extended discovery. This operation will affect the authentication_status of the device - -> Body parameter +`DELETE /agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}` -```json -{ - "password": "string", - "username": "string" -} -``` +Deletes the SNMP Trigger for the sensorCurl
--curl -X PUT your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/credentials \ - -H 'Content-Type: application/json' \ +curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id} \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
|Parameter|In|Type|Required|Description| |---|---|---|---|---| |agent_id|path|integer(int32)|true|Agent ID| |device_id|path|integer(int32)|true|Device ID| -|body|body|[DeviceCredentials](#schemadevicecredentials)|true|device credentials payload| +|sensor_id|path|integer(int32)|true|SNMP Eye ID| +|trigger_id|path|integer(int32)|true|SNMP Eye Trigger ID| -Responses
+Responses
|Status|Meaning|Description|Schema| |---|---|---|---| |204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| -## setSnmpCommunity +## deleteEyeSNMPTriggerAlert - + > Code samples ```shell -curl -X PUT your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community \ - -H 'Content-Type: application/json' \ +curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name} \ -H 'X-Api-Key: API_KEY' ``` ```javascript var headers = { - 'Content-Type':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community', - method: 'put', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name}', + method: 'delete', headers: headers, success: function(data) { @@ -1766,20 +5720,16 @@ $.ajax({ ```javascript--nodejs const fetch = require('node-fetch'); -const inputBody = '{ - "read": "string", - "write": "string" -}'; + const headers = { - 'Content-Type':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name}', { - method: 'PUT', - body: inputBody, + method: 'DELETE', + headers: headers }) .then(function(res) { @@ -1793,11 +5743,10 @@ fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id ```python import requests headers = { - 'Content-Type': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.put('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community', params={ +r = requests.delete('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name}', params={ }, headers = headers) @@ -1810,11 +5759,10 @@ require 'rest-client' require 'json' headers = { - 'Content-Type' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.put 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community', +result = RestClient.delete 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name}', params: { }, headers: headers @@ -1833,13 +5781,12 @@ import ( func main() { headers := map[string][]string{ - "Content-Type": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("PUT", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community", data) + req, err := http.NewRequest("DELETE", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name}", data) req.Header = headers client := &http.Client{} @@ -1849,66 +5796,67 @@ func main() { ``` -`PUT /agent/{agent_id}/device/{device_id}/snmp-community` - -Saves a snmp community (read, optionally write) on device +`DELETE /agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name}` -> Body parameter - -```json -{ - "read": "string", - "write": "string" -} -``` +Deletes the alert for thee SNMP TriggerCurl
--curl -X PUT your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community \ - -H 'Content-Type: application/json' \ +curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name} \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
|Parameter|In|Type|Required|Description| |---|---|---|---|---| |agent_id|path|integer(int32)|true|Agent ID| |device_id|path|integer(int32)|true|Device ID| -|body|body|[DeviceSnmpCommunity](#schemadevicesnmpcommunity)|true|The value that the snmp community entries will change to| +|sensor_id|path|integer(int32)|true|SNMP Eye ID| +|trigger_id|path|integer(int32)|true|SNMP Eye Trigger ID| +|medium_name|path|string|true|the name of the medium| + +#### Enumerated Values + +|Parameter|Value| +|---|---| +|medium_name|email| +|medium_name|mobile| -Responses
+Responses
|Status|Meaning|Description|Schema| |---|---|---|---| |204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| -## hideDevice +## createEyeSNMPTriggerAlert - + > Code samples ```shell -curl -X DELETE your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/visibility \ +curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name} \ + -H 'Content-Type: application/json' \ -H 'X-Api-Key: API_KEY' ``` ```javascript var headers = { + 'Content-Type':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/visibility', - method: 'delete', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name}', + method: 'post', headers: headers, success: function(data) { @@ -1920,16 +5868,17 @@ $.ajax({ ```javascript--nodejs const fetch = require('node-fetch'); - +const inputBody = '{}'; const headers = { + 'Content-Type':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/visibility', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name}', { - method: 'DELETE', - + method: 'POST', + body: inputBody, headers: headers }) .then(function(res) { @@ -1943,10 +5892,11 @@ fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id ```python import requests headers = { + 'Content-Type': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.delete('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/visibility', params={ +r = requests.post('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name}', params={ }, headers = headers) @@ -1959,10 +5909,11 @@ require 'rest-client' require 'json' headers = { + 'Content-Type' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.delete 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/visibility', +result = RestClient.post 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name}', params: { }, headers: headers @@ -1981,12 +5932,13 @@ import ( func main() { headers := map[string][]string{ + "Content-Type": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("DELETE", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/visibility", data) + req, err := http.NewRequest("POST", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name}", data) req.Header = headers client := &http.Client{} @@ -1996,57 +5948,75 @@ func main() { ``` -`DELETE /agent/{agent_id}/device/{device_id}/visibility` +`POST /agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name}` -Hides a device (available only on DOWN devices) +Add an alert to a SNMP Trigger + +> Body parameter + +```json +{} +```Curl
--curl -X DELETE your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/visibility \ +curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/trigger/{trigger_id}/alert/{medium_name} \ + -H 'Content-Type: application/json' \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
|Parameter|In|Type|Required|Description| |---|---|---|---|---| |agent_id|path|integer(int32)|true|Agent ID| |device_id|path|integer(int32)|true|Device ID| +|sensor_id|path|integer(int32)|true|SNMP Eye ID| +|trigger_id|path|integer(int32)|true|SNMP Eye Trigger ID| +|medium_name|path|string|true|the name of the medium| +|body|body|[SNMPDomotzSnmpTriggerAlertCreation](#schemasnmpdomotzsnmptriggeralertcreation)|true|none| -Responses
+#### Enumerated Values + +|Parameter|Value| +|---|---| +|medium_name|email| +|medium_name|mobile| + +Responses
|Status|Meaning|Description|Schema| |---|---|---|---| -|204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| +|201|[Created](https://tools.ietf.org/html/rfc7231#section-6.3.2)|none|None| -## editDevice +## listEyesTCP - + > Code samples ```shell -curl -X PUT your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/{field} \ - -H 'Content-Type: application/json' \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' ``` ```javascript var headers = { - 'Content-Type':'application/json', + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/{field}', - method: 'put', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp', + method: 'get', headers: headers, success: function(data) { @@ -2058,17 +6028,17 @@ $.ajax({ ```javascript--nodejs const fetch = require('node-fetch'); -const inputBody = 'string'; + const headers = { - 'Content-Type':'application/json', + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/{field}', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp', { - method: 'PUT', - body: inputBody, + method: 'GET', + headers: headers }) .then(function(res) { @@ -2082,11 +6052,11 @@ fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id ```python import requests headers = { - 'Content-Type': 'application/json', + 'Accept': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.put('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/{field}', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp', params={ }, headers = headers) @@ -2099,11 +6069,11 @@ require 'rest-client' require 'json' headers = { - 'Content-Type' => 'application/json', + 'Accept' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.put 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/{field}', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp', params: { }, headers: headers @@ -2122,13 +6092,13 @@ import ( func main() { headers := map[string][]string{ - "Content-Type": []string{"application/json"}, + "Accept": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("PUT", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/{field}", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp", data) req.Header = headers client := &http.Client{} @@ -2138,80 +6108,92 @@ func main() { ``` -`PUT /agent/{agent_id}/device/{device_id}/{field}` - -Changes a field of the device or one of its details - -> Body parameter +`GET /agent/{agent_id}/device/{device_id}/eye/tcp` -```json -"string" -``` +Retrieves the list of configured TCP Domotz EyesCurl
--curl -X PUT your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/{field} \ - -H 'Content-Type: application/json' \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
|Parameter|In|Type|Required|Description| |---|---|---|---|---| |agent_id|path|integer(int32)|true|Agent ID| |device_id|path|integer(int32)|true|Device ID| -|field|path|string|true|The field to update - for the type and valid values see the description of the corresponding output parameter| -|body|body|string|true|The value that the field will change to| -#### Enumerated Values +> Example responses -|Parameter|Value| -|---|---| -|field|user_data/vendor| -|field|details/zone| -|field|importance| -|field|details/room| -|field|user_data/name| -|field|user_data/type| -|field|user_data/model| +> 200 Response -Responses
+```json +[ + { + "id": 0, + "last_update": "2019-08-24T14:15:22Z", + "port": 0, + "status": "UP" + } +] +``` + +Responses
|Status|Meaning|Description|Schema| |---|---|---|---| -|204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|The list of configured TCP Domotz Eyes for the device and their latest values|Inline| -metrics
+Response Schema
-## getAgentRTDStats +Status Code **200** - +|Name|Type|Required|Description| +|---|---|---|---|---| +|*anonymous*|[[TCPDomotzEye](#schematcpdomotzeye)]|false|[Information about a configured TCP Domotz Eye]| +|» id|integer(int32)|true|The unique identifier of the TCP Domotz Eye| +|» last_update|string(date-time)|true|The timestamp of the latest update| +|» port|integer(int32)|true|The port number| +|» status|string|true|The status of the TCP service| + +#### Enumerated Values + +|Property|Value| +|---|---| +|status|UP| +|status|DOWN| + +## createEyeTCP + + > Code samples ```shell -curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/rtd \ - -H 'Accept: application/json' \ +curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp \ + -H 'Content-Type: application/json' \ -H 'X-Api-Key: API_KEY' ``` ```javascript var headers = { - 'Accept':'application/json', + 'Content-Type':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/rtd', - method: 'get', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp', + method: 'post', headers: headers, success: function(data) { @@ -2223,17 +6205,19 @@ $.ajax({ ```javascript--nodejs const fetch = require('node-fetch'); - +const inputBody = '{ + "port": 0 +}'; const headers = { - 'Accept':'application/json', + 'Content-Type':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/rtd', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp', { - method: 'GET', - + method: 'POST', + body: inputBody, headers: headers }) .then(function(res) { @@ -2247,11 +6231,11 @@ fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/rtd', ```python import requests headers = { - 'Accept': 'application/json', + 'Content-Type': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/rtd', params={ +r = requests.post('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp', params={ }, headers = headers) @@ -2264,11 +6248,11 @@ require 'rest-client' require 'json' headers = { - 'Accept' => 'application/json', + 'Content-Type' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/rtd', +result = RestClient.post 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp', params: { }, headers: headers @@ -2287,13 +6271,13 @@ import ( func main() { headers := map[string][]string{ - "Accept": []string{"application/json"}, + "Content-Type": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/rtd", data) + req, err := http.NewRequest("POST", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp", data) req.Header = headers client := &http.Client{} @@ -2303,92 +6287,65 @@ func main() { ``` -`GET /agent/{agent_id}/device/rtd` +`POST /agent/{agent_id}/device/{device_id}/eye/tcp` -Returns the Round Trip Delay statistics for all devices monitored by the agent. The aggregate values of _avg_min_, _avg_max_, _avg_median_ help to understand the baseline response time of a device in a weekly time frame, while _latest_median_ helps detecting a possible deviation from the baseline +Creates a new TCP Domotz Eyes + +> Body parameter + +```json +{ + "port": 0 +} +```Curl
--curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/rtd \ - -H 'Accept: application/json' \ +curl -X POST http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp \ + -H 'Content-Type: application/json' \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
|Parameter|In|Type|Required|Description| |---|---|---|---|---| |agent_id|path|integer(int32)|true|Agent ID| +|device_id|path|integer(int32)|true|Device ID| +|body|body|[TCPDomotzEyeCreation](#schematcpdomotzeyecreation)|true|none| -> Example responses - -> 200 Response - -```json -[ - { - "avg_max": "string", - "avg_median": "string", - "avg_min": "string", - "device_id": 0, - "latest_lost_packet_count": 0, - "latest_median": "string", - "latest_sent_packet_count": 0, - "timestamp": "2019-06-11T09:08:10Z" - } -] -``` - -Responses
+Responses
|Status|Meaning|Description|Schema| |---|---|---|---| -|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Devices RTD Statistics|Inline| - -Response Schema
+|201|[Created](https://tools.ietf.org/html/rfc7231#section-6.3.2)|none|None| -Status Code **200** - -|Name|Type|Required|Description| -|---|---|---|---|---| -|*anonymous*|[[DeviceRTDStatistics](#schemadevicertdstatistics)]|false|none| -|» avg_max|string|false|none| -|» avg_median|string|false|none| -|» avg_min|string|false|none| -|» device_id|integer(int32)|true|none| -|» latest_lost_packet_count|integer(int32)|false|The number of lost packets of the latest collection sample| -|» latest_median|string|false|The median value of the latest collection sample| -|» latest_sent_packet_count|integer(int32)|false|The number of sent packets of the latest collection sample| -|» timestamp|string(date-time)|true|The timestamp of the latest update| - -## getDeviceStatusHistory +## deleteEyeTCP - + > Code samples ```shell -curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event \ - -H 'Accept: application/json' \ +curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp/{service_id} \ -H 'X-Api-Key: API_KEY' ``` ```javascript var headers = { - 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event', - method: 'get', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp/{service_id}', + method: 'delete', headers: headers, success: function(data) { @@ -2402,14 +6359,13 @@ $.ajax({ const fetch = require('node-fetch'); const headers = { - 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp/{service_id}', { - method: 'GET', + method: 'DELETE', headers: headers }) @@ -2424,11 +6380,10 @@ fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id ```python import requests headers = { - 'Accept': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event', params={ +r = requests.delete('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp/{service_id}', params={ }, headers = headers) @@ -2441,11 +6396,10 @@ require 'rest-client' require 'json' headers = { - 'Accept' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event', +result = RestClient.delete 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp/{service_id}', params: { }, headers: headers @@ -2464,13 +6418,12 @@ import ( func main() { headers := map[string][]string{ - "Accept": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event", data) + req, err := http.NewRequest("DELETE", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp/{service_id}", data) req.Header = headers client := &http.Client{} @@ -2480,88 +6433,43 @@ func main() { ``` -`GET /agent/{agent_id}/device/{device_id}/history/network/event` +`DELETE /agent/{agent_id}/device/{device_id}/eye/tcp/{service_id}` -Returns the time series of the state changes of the device +Deletes the TCP Domotz EyeCurl
--curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event \ - -H 'Accept: application/json' \ +curl -X DELETE http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/eye/tcp/{service_id} \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
|Parameter|In|Type|Required|Description| |---|---|---|---|---| |agent_id|path|integer(int32)|true|Agent ID| |device_id|path|integer(int32)|true|Device ID| -|from|query|string(date-time)|false|The start time of the time series. Default value is one week| -|to|query|string(date-time)|false|The end time of the time series. Default value is now| +|service_id|path|integer(int32)|true|TCP Eye ID| -> Example responses - -> 200 Response - -```json -[ - { - "details": { - "new_ip": [ - "string" - ], - "old_ip": [ - "string" - ] - }, - "timestamp": "2019-06-11T09:08:10Z", - "type": "IP_CHANGE" - } -] -``` - -Responses
+Responses
|Status|Meaning|Description|Schema| |---|---|---|---| -|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|A time series|Inline| - -Response Schema
- -Status Code **200** - -|Name|Type|Required|Description| -|---|---|---|---|---| -|*anonymous*|[[DeviceHistory](#schemadevicehistory)]|false|none| -|» details|object|false|none| -|»» new_ip|[string]|false|The new IP addresses| -|»» old_ip|[string]|false|The old IP addresses| -|» timestamp|string(date-time)|true|The time the sample was reported to Domotz| -|» type|string|true|The device event type| - -#### Enumerated Values - -|Property|Value| -|---|---| -|type|IP_CHANGE| -|type|CREATED| -|type|UP| -|type|DOWN| +|204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| -## getDeviceRTDHistory +## eyesUsageInfo - + > Code samples ```shell -curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/eye-statistics \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -2575,7 +6483,7 @@ var headers = { }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/eye-statistics', method: 'get', headers: headers, @@ -2595,7 +6503,7 @@ const headers = { }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/eye-statistics', { method: 'GET', @@ -2616,7 +6524,7 @@ headers = { 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/eye-statistics', params={ }, headers = headers) @@ -2633,7 +6541,7 @@ headers = { 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/eye-statistics', params: { }, headers: headers @@ -2658,7 +6566,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/eye-statistics", data) req.Header = headers client := &http.Client{} @@ -2668,15 +6576,15 @@ func main() { ``` -`GET /agent/{agent_id}/device/{device_id}/history/rtd` +`GET /agent/{agent_id}/eye-statistics` -Returns the Round Trip Delay history for the device. Each item represents the statistical aggregate of a set of Round Trip Delay measurements +Retrieves information about Domotz Eyes usage and limitsCurl
--curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/eye-statistics \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -2684,74 +6592,57 @@ Returns the Round Trip Delay history for the device. Each item represents the stParameters
+Parameters
|Parameter|In|Type|Required|Description| |---|---|---|---|---| |agent_id|path|integer(int32)|true|Agent ID| -|device_id|path|integer(int32)|true|Device ID| -|from|query|string(date-time)|false|The start time of the time series. Default value is one week| -|to|query|string(date-time)|false|The end time of the time series. Default value is now| > Example responses > 200 Response ```json -[ - { - "lost_packet_count": 0, - "max": "string", - "median": "string", - "min": "string", - "sent_packet_count": 0, - "timestamp": "2019-06-11T09:08:10Z" +{ + "limit": 0, + "usage": { + "snmp": 0, + "tcp": 0, + "total": 0 } -] +} ``` -Responses
+Responses
|Status|Meaning|Description|Schema| |---|---|---|---| -|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Device RTD History|Inline| - -Response Schema
- -Status Code **200** +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|A data structure containing information about current Domotz Eyes usage and limits|[DomotzEyesUsageInformation](#schemadomotzeyesusageinformation)| -|Name|Type|Required|Description| -|---|---|---|---|---| -|*anonymous*|[[DeviceRTDHistorySample](#schemadevicertdhistorysample)]|false|none| -|» lost_packet_count|integer(int32)|false|none| -|» max|string|false|none| -|» median|string|false|none| -|» min|string|false|none| -|» sent_packet_count|integer(int32)|false|none| -|» timestamp|string(date-time)|true|The time the sample was reported to Domotz| +multimedia
-## getAgentStatusHistory +## onvifSnapshot - + > Code samples ```shell -curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/event \ - -H 'Accept: application/json' \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot \ + -H 'Accept: image/*' \ -H 'X-Api-Key: API_KEY' ``` ```javascript var headers = { - 'Accept':'application/json', + 'Accept':'image/*', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/event', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot', method: 'get', headers: headers, @@ -2766,12 +6657,12 @@ $.ajax({ const fetch = require('node-fetch'); const headers = { - 'Accept':'application/json', + 'Accept':'image/*', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/event', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot', { method: 'GET', @@ -2788,11 +6679,11 @@ fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/e ```python import requests headers = { - 'Accept': 'application/json', + 'Accept': 'image/*', 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/event', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot', params={ }, headers = headers) @@ -2805,11 +6696,11 @@ require 'rest-client' require 'json' headers = { - 'Accept' => 'application/json', + 'Accept' => 'image/*', 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/event', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot', params: { }, headers: headers @@ -2828,13 +6719,13 @@ import ( func main() { headers := map[string][]string{ - "Accept": []string{"application/json"}, + "Accept": []string{"image/*"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/event", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot", data) req.Header = headers client := &http.Client{} @@ -2844,91 +6735,62 @@ func main() { ``` -`GET /agent/{agent_id}/history/network/event` +`GET /agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot` -Returns the time series of the state changes of the agent +Take a snapshot of the camera. Internally, a device connection is established.Current consumption and consumption limits can be retrieved with a call to getConnectionConsumption endpointCurl
--curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/event \ - -H 'Accept: application/json' \ +curl -X GET http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot \ + -H 'Accept: image/*' \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
|Parameter|In|Type|Required|Description| |---|---|---|---|---| |agent_id|path|integer(int32)|true|Agent ID| -|from|query|string(date-time)|false|The start time of the time series. Default value is one week| -|to|query|string(date-time)|false|The end time of the time series. Default value is now| +|device_id|path|integer(int32)|true|Device ID| > Example responses > 200 Response -```json -[ - { - "timestamp": "2019-06-11T09:08:10Z", - "type": "CONNECTION_RECOVERED" - } -] -``` - -Responses
+Responses
|Status|Meaning|Description|Schema| |---|---|---|---| -|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|A time series|Inline| - -Response Schema
- -Status Code **200** - -|Name|Type|Required|Description| -|---|---|---|---|---| -|*anonymous*|[[AgentHistory](#schemaagenthistory)]|false|none| -|» timestamp|string(date-time)|true|The time the sample was reported to Domotz| -|» type|string|true|The agent event type| - -#### Enumerated Values +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|A binary image|string| -|Property|Value| -|---|---| -|type|CONNECTION_RECOVERED| -|type|CONNECTION_LOST| -|type|UP| -|type|DOWN| +company
-## getSpeedTestHistory +## moveAgent - + > Code samples ```shell -curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/speed \ - -H 'Accept: application/json' \ +curl -X PUT http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/ownership/team/{team_id} \ -H 'X-Api-Key: API_KEY' ``` ```javascript var headers = { - 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/speed', - method: 'get', + url: 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/ownership/team/{team_id}', + method: 'put', headers: headers, success: function(data) { @@ -2942,14 +6804,13 @@ $.ajax({ const fetch = require('node-fetch'); const headers = { - 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/speed', +fetch('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/ownership/team/{team_id}', { - method: 'GET', + method: 'PUT', headers: headers }) @@ -2964,11 +6825,10 @@ fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/s ```python import requests headers = { - 'Accept': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/speed', params={ +r = requests.put('http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/ownership/team/{team_id}', params={ }, headers = headers) @@ -2981,11 +6841,10 @@ require 'rest-client' require 'json' headers = { - 'Accept' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/speed', +result = RestClient.put 'http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/ownership/team/{team_id}', params: { }, headers: headers @@ -3004,13 +6863,12 @@ import ( func main() { headers := map[string][]string{ - "Accept": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/speed", data) + req, err := http.NewRequest("PUT", "http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/ownership/team/{team_id}", data) req.Header = headers client := &http.Client{} @@ -3020,73 +6878,42 @@ func main() { ``` -`GET /agent/{agent_id}/history/network/speed` +`PUT /agent/{agent_id}/ownership/team/{team_id}` -Returns the time series of the Internet Speed measurements taken from the agent, both in -download and in upload. +Moves an agent under the control of a different teamCurl
--curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/history/network/speed \ - -H 'Accept: application/json' \ +curl -X PUT http://172.17.0.1:9080/public-api/v1/agent/{agent_id}/ownership/team/{team_id} \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
|Parameter|In|Type|Required|Description| |---|---|---|---|---| |agent_id|path|integer(int32)|true|Agent ID| -|from|query|string(date-time)|false|The start time of the time series. Default value is one week| -|to|query|string(date-time)|false|The end time of the time series. Default value is now| - -> Example responses - -> 200 Response - -```json -[ - { - "timestamp": "2019-06-11T09:08:10Z", - "values": [ - 0 - ] - } -] -``` +|team_id|path|integer(int32)|true|Team ID| -Responses
+Responses
|Status|Meaning|Description|Schema| |---|---|---|---| -|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|A time series|Inline| - -Response Schema
- -Status Code **200** - -|Name|Type|Required|Description| -|---|---|---|---|---| -|*anonymous*|[[NetworkSpeedSample](#schemanetworkspeedsample)]|false|[A Network Speed Sample is the result of the measurement of the Internet download and upload speed, in bits per second, taken by the Agent]| -|» timestamp|string(date-time)|false|The time the sample was reported to Domotz| -|» values|[integer]|false|A pair of values: the download and upload speed, in Bit Per Seconds (bps), as measured by the Agent| - -actions
+|204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| -## connectToDevice +## listAreas - + > Code samples ```shell -curl -X POST your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/connection \ - -H 'Content-Type: application/json' \ +curl -X GET http://172.17.0.1:9080/public-api/v1/area \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -3094,15 +6921,14 @@ curl -X POST your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{dev ```javascript var headers = { - 'Content-Type':'application/json', 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/connection', - method: 'post', + url: 'http://172.17.0.1:9080/public-api/v1/area', + method: 'get', headers: headers, success: function(data) { @@ -3114,22 +6940,17 @@ $.ajax({ ```javascript--nodejs const fetch = require('node-fetch'); -const inputBody = '{ - "allowed_ip": "string", - "port": 0, - "protocol": "http" -}'; + const headers = { - 'Content-Type':'application/json', 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/connection', +fetch('http://172.17.0.1:9080/public-api/v1/area', { - method: 'POST', - body: inputBody, + method: 'GET', + headers: headers }) .then(function(res) { @@ -3143,12 +6964,11 @@ fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id ```python import requests headers = { - 'Content-Type': 'application/json', 'Accept': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.post('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/connection', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/area', params={ }, headers = headers) @@ -3161,12 +6981,11 @@ require 'rest-client' require 'json' headers = { - 'Content-Type' => 'application/json', 'Accept' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.post 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/connection', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/area', params: { }, headers: headers @@ -3185,14 +7004,13 @@ import ( func main() { headers := map[string][]string{ - "Content-Type": []string{"application/json"}, "Accept": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("POST", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/connection", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/area", data) req.Header = headers client := &http.Client{} @@ -3202,86 +7020,61 @@ func main() { ``` -`POST /agent/{agent_id}/device/{device_id}/connection` - -Establishes a direct secure connection to the `device` - -> Body parameter - -```json -{ - "allowed_ip": "string", - "port": 0, - "protocol": "http" -} -``` - -Curl
- --
- --curl -X POST your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/connection \ - -H 'Content-Type: application/json' \ - -H 'Accept: application/json' \ - -H 'X-Api-Key: API_KEY' - - --Parameters
+`GET /area` -|Parameter|In|Type|Required|Description| -|---|---|---|---|---| -|agent_id|path|integer(int32)|true|Agent ID| -|device_id|path|integer(int32)|true|Device ID| -|body|body|[DeviceConnection](#schemadeviceconnection)|true|none| +Returns all the areas of a Company > Example responses -> 201 Response +> 200 Response ```json -{ - "allowed_ip": "string", - "expiration": "2019-06-11T09:08:10Z", - "id": 0, - "link": "string", - "port": 0, - "protocol": "http" -} +[ + { + "id": 0, + "name": "string" + } +] ``` -Responses
+Responses
|Status|Meaning|Description|Schema| |---|---|---|---| -|201|[Created](https://tools.ietf.org/html/rfc7231#section-6.3.2)|none|[ConnectionSession](#schemaconnectionsession)| +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|The list of all the areas in the User's Company|Inline| -multimedia
+Response Schema
-## onvifSnapshot +Status Code **200** - +|Name|Type|Required|Description| +|---|---|---|---|---| +|*anonymous*|[[Area](#schemaarea)]|false|[Represents an area of the Company]| +|» id|integer(int32)|true|The identifier of the Area| +|» name|string|true|The name of the Area| + +## listTeams + + > Code samples ```shell -curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot \ - -H 'Accept: image/*' \ +curl -X GET http://172.17.0.1:9080/public-api/v1/area/{area_id}/team \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' ``` ```javascript var headers = { - 'Accept':'image/*', + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot', + url: 'http://172.17.0.1:9080/public-api/v1/area/{area_id}/team', method: 'get', headers: headers, @@ -3296,12 +7089,12 @@ $.ajax({ const fetch = require('node-fetch'); const headers = { - 'Accept':'image/*', + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot', +fetch('http://172.17.0.1:9080/public-api/v1/area/{area_id}/team', { method: 'GET', @@ -3318,11 +7111,11 @@ fetch('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id ```python import requests headers = { - 'Accept': 'image/*', + 'Accept': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/area/{area_id}/team', params={ }, headers = headers) @@ -3335,11 +7128,11 @@ require 'rest-client' require 'json' headers = { - 'Accept' => 'image/*', + 'Accept' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/area/{area_id}/team', params: { }, headers: headers @@ -3358,13 +7151,13 @@ import ( func main() { headers := map[string][]string{ - "Accept": []string{"image/*"}, + "Accept": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/area/{area_id}/team", data) req.Header = headers client := &http.Client{} @@ -3374,64 +7167,80 @@ func main() { ``` -`GET /agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot` +`GET /area/{area_id}/team` -Take a snapshot of the camera. +Returns all the teams of an AreaCurl
--curl -X GET your-domotz-api-endpoint/public-api/v1/agent/{agent_id}/device/{device_id}/multimedia/camera/snapshot \ - -H 'Accept: image/*' \ +curl -X GET http://172.17.0.1:9080/public-api/v1/area/{area_id}/team \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
|Parameter|In|Type|Required|Description| |---|---|---|---|---| -|agent_id|path|integer(int32)|true|Agent ID| -|device_id|path|integer(int32)|true|Device ID| +|area_id|path|integer(int32)|true|Area ID| > Example responses > 200 Response -Responses
+```json +[ + { + "id": 0, + "name": "string" + } +] +``` + +Responses
|Status|Meaning|Description|Schema| |---|---|---|---| -|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|A binary image|string| +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|The list of all the teams in a Company Area's|Inline| -alert profiles
+Response Schema
-## getAlertProfiles +Status Code **200** - +|Name|Type|Required|Description| +|---|---|---|---|---| +|*anonymous*|[[Team](#schemateam)]|false|[Represents a team of the Company]| +|» id|integer(int32)|true|The identifier of the Team| +|» name|string|true|The name of the Team| + +## createTeam + + > Code samples ```shell -curl -X GET your-domotz-api-endpoint/public-api/v1/user/{user_id}/alert-profile \ - -H 'Accept: application/json' \ +curl -X POST http://172.17.0.1:9080/public-api/v1/area/{area_id}/team \ + -H 'Content-Type: application/json' \ -H 'X-Api-Key: API_KEY' ``` ```javascript var headers = { - 'Accept':'application/json', + 'Content-Type':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/user/{user_id}/alert-profile', - method: 'get', + url: 'http://172.17.0.1:9080/public-api/v1/area/{area_id}/team', + method: 'post', headers: headers, success: function(data) { @@ -3443,17 +7252,26 @@ $.ajax({ ```javascript--nodejs const fetch = require('node-fetch'); - +const inputBody = '{ + "leader": { + "details": { + "display_name": "string" + }, + "name": "string", + "password": "string" + }, + "name": "string" +}'; const headers = { - 'Accept':'application/json', + 'Content-Type':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/user/{user_id}/alert-profile', +fetch('http://172.17.0.1:9080/public-api/v1/area/{area_id}/team', { - method: 'GET', - + method: 'POST', + body: inputBody, headers: headers }) .then(function(res) { @@ -3467,11 +7285,11 @@ fetch('your-domotz-api-endpoint/public-api/v1/user/{user_id}/alert-profile', ```python import requests headers = { - 'Accept': 'application/json', + 'Content-Type': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/user/{user_id}/alert-profile', params={ +r = requests.post('http://172.17.0.1:9080/public-api/v1/area/{area_id}/team', params={ }, headers = headers) @@ -3484,11 +7302,11 @@ require 'rest-client' require 'json' headers = { - 'Accept' => 'application/json', + 'Content-Type' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/user/{user_id}/alert-profile', +result = RestClient.post 'http://172.17.0.1:9080/public-api/v1/area/{area_id}/team', params: { }, headers: headers @@ -3507,13 +7325,13 @@ import ( func main() { headers := map[string][]string{ - "Accept": []string{"application/json"}, + "Content-Type": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/user/{user_id}/alert-profile", data) + req, err := http.NewRequest("POST", "http://172.17.0.1:9080/public-api/v1/area/{area_id}/team", data) req.Header = headers client := &http.Client{} @@ -3523,66 +7341,51 @@ func main() { ``` -`GET /user/{user_id}/alert-profile` +`POST /area/{area_id}/team` -Returns the list of configured alert profiles. You can configure alert profiles on the Domotz Portal. Alert profiles define the association between a list of events and a notification channel (email, webhook or slack) +Creates a new Team + +> Body parameter + +```json +{ + "leader": { + "details": { + "display_name": "string" + }, + "name": "string", + "password": "string" + }, + "name": "string" +} +```Curl
--curl -X GET your-domotz-api-endpoint/public-api/v1/user/{user_id}/alert-profile \ - -H 'Accept: application/json' \ +curl -X POST http://172.17.0.1:9080/public-api/v1/area/{area_id}/team \ + -H 'Content-Type: application/json' \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
|Parameter|In|Type|Required|Description| |---|---|---|---|---| -|user_id|path|integer(int32)|true|User ID| - -> Example responses - -> 200 Response - -```json -[ - { - "description": "string", - "events": [ - "device_status" - ], - "id": 0, - "is_enabled": true, - "name": "string", - "tag": "string" - } -] -``` +|area_id|path|integer(int32)|true|Area ID| +|body|body|[TeamCreation](#schemateamcreation)|true|none| -Responses
+Responses
|Status|Meaning|Description|Schema| |---|---|---|---| -|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|The list of configured alert profiles|Inline| - -Response Schema
- -Status Code **200** +|201|[Created](https://tools.ietf.org/html/rfc7231#section-6.3.2)|none|None| -|Name|Type|Required|Description| -|---|---|---|---|---| -|*anonymous*|[[AlertProfile](#schemaalertprofile)]|false|none| -|» description|string|false|The description of the alert profile| -|» events|[string]|false|The list of events associated to the profile| -|» id|integer(int32)|true|The id of the event profile| -|» is_enabled|boolean|false|true if the event profile is enabled, false otherwise| -|» name|string|false|The symbolic name associated to the profile| -|» tag|string|false|A label associated to the profile| +alert profiles
## getAgentAlertProfile @@ -3591,7 +7394,7 @@ Status Code **200** > Code samples ```shell -curl -X GET your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id} \ +curl -X GET http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id} \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -3605,7 +7408,7 @@ var headers = { }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id}', + url: 'http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id}', method: 'get', headers: headers, @@ -3625,7 +7428,7 @@ const headers = { }; -fetch('your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id}', +fetch('http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id}', { method: 'GET', @@ -3646,7 +7449,7 @@ headers = { 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id}', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id}', params={ }, headers = headers) @@ -3663,7 +7466,7 @@ headers = { 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id}', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id}', params: { }, headers: headers @@ -3688,7 +7491,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id}", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id}", data) req.Header = headers client := &http.Client{} @@ -3706,7 +7509,7 @@ Get the alert profile bindings of an agent-curl -X GET your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id} \ +curl -X GET http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id} \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -3719,7 +7522,6 @@ Get the alert profile bindings of an agent |Parameter|In|Type|Required|Description| |---|---|---|---|---| |agent_id|path|integer(int32)|true|Agent ID| -|alert_profile_id|path|integer(int32)|true|Profile ID| > Example responses @@ -3755,7 +7557,7 @@ Status Code **200** > Code samples ```shell -curl -X GET your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id}/device \ +curl -X GET http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id}/device \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -3769,7 +7571,7 @@ var headers = { }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id}/device', + url: 'http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id}/device', method: 'get', headers: headers, @@ -3789,7 +7591,7 @@ const headers = { }; -fetch('your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id}/device', +fetch('http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id}/device', { method: 'GET', @@ -3810,7 +7612,7 @@ headers = { 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id}/device', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id}/device', params={ }, headers = headers) @@ -3827,7 +7629,7 @@ headers = { 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id}/device', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id}/device', params: { }, headers: headers @@ -3852,7 +7654,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id}/device", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id}/device", data) req.Header = headers client := &http.Client{} @@ -3870,7 +7672,7 @@ Get the alert profile bindings of the devices of an agent-curl -X GET your-domotz-api-endpoint/public-api/v1/alert-profile/binding/agent/{agent_id}/device \ +curl -X GET http://172.17.0.1:9080/public-api/v1/alert-profile/binding/agent/{agent_id}/device \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -3883,7 +7685,6 @@ Get the alert profile bindings of the devices of an agent |Parameter|In|Type|Required|Description| |---|---|---|---|---| |agent_id|path|integer(int32)|true|Agent ID| -|alert_profile_id|path|integer(int32)|true|Profile ID| > Example responses @@ -3921,7 +7722,7 @@ Status Code **200** > Code samples ```shell -curl -X DELETE your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id} \ +curl -X DELETE http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id} \ -H 'X-Api-Key: API_KEY' ``` @@ -3933,7 +7734,7 @@ var headers = { }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', + url: 'http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', method: 'delete', headers: headers, @@ -3952,7 +7753,7 @@ const headers = { }; -fetch('your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', +fetch('http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', { method: 'DELETE', @@ -3972,7 +7773,7 @@ headers = { 'X-Api-Key': 'API_KEY' } -r = requests.delete('your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', params={ +r = requests.delete('http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', params={ }, headers = headers) @@ -3988,7 +7789,7 @@ headers = { 'X-Api-Key' => 'API_KEY' } -result = RestClient.delete 'your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', +result = RestClient.delete 'http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', params: { }, headers: headers @@ -4012,7 +7813,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("DELETE", "your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}", data) + req, err := http.NewRequest("DELETE", "http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}", data) req.Header = headers client := &http.Client{} @@ -4030,7 +7831,7 @@ Unbind an alert profile from an agent.-curl -X DELETE your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id} \ +curl -X DELETE http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id} \ -H 'X-Api-Key: API_KEY' @@ -4057,7 +7858,7 @@ Unbind an alert profile from an agent. > Code samples ```shell -curl -X POST your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id} \ +curl -X POST http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id} \ -H 'X-Api-Key: API_KEY' ``` @@ -4069,7 +7870,7 @@ var headers = { }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', + url: 'http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', method: 'post', headers: headers, @@ -4088,7 +7889,7 @@ const headers = { }; -fetch('your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', +fetch('http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', { method: 'POST', @@ -4108,7 +7909,7 @@ headers = { 'X-Api-Key': 'API_KEY' } -r = requests.post('your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', params={ +r = requests.post('http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', params={ }, headers = headers) @@ -4124,7 +7925,7 @@ headers = { 'X-Api-Key' => 'API_KEY' } -result = RestClient.post 'your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', +result = RestClient.post 'http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}', params: { }, headers: headers @@ -4148,7 +7949,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("POST", "your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}", data) + req, err := http.NewRequest("POST", "http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}", data) req.Header = headers client := &http.Client{} @@ -4166,7 +7967,7 @@ Bind an alert profile to an agent. After binding, a webhook will be sent to the-curl -X POST your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id} \ +curl -X POST http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id} \ -H 'X-Api-Key: API_KEY' @@ -4241,7 +8042,7 @@ Bind an alert profile to an agent. After binding, a webhook will be sent to the > Code samples ```shell -curl -X DELETE your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id} \ +curl -X DELETE http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id} \ -H 'X-Api-Key: API_KEY' ``` @@ -4253,7 +8054,7 @@ var headers = { }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', + url: 'http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', method: 'delete', headers: headers, @@ -4272,7 +8073,7 @@ const headers = { }; -fetch('your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', +fetch('http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', { method: 'DELETE', @@ -4292,7 +8093,7 @@ headers = { 'X-Api-Key': 'API_KEY' } -r = requests.delete('your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', params={ +r = requests.delete('http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', params={ }, headers = headers) @@ -4308,7 +8109,7 @@ headers = { 'X-Api-Key' => 'API_KEY' } -result = RestClient.delete 'your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', +result = RestClient.delete 'http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', params: { }, headers: headers @@ -4332,7 +8133,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("DELETE", "your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}", data) + req, err := http.NewRequest("DELETE", "http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}", data) req.Header = headers client := &http.Client{} @@ -4350,7 +8151,7 @@ Unbind an alert profile from a device-curl -X DELETE your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id} \ +curl -X DELETE http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id} \ -H 'X-Api-Key: API_KEY' @@ -4365,33 +8166,248 @@ Unbind an alert profile from a device |alert_profile_id|path|integer(int32)|true|Profile ID| |device_id|path|integer(int32)|true|Device ID| -Responses
+Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| + +## bindAlertProfileToDevice + + + +> Code samples + +```shell +curl -X POST http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id} \ + -H 'X-Api-Key: API_KEY' + +``` + +```javascript +var headers = { + 'X-Api-Key':'API_KEY' + +}; + +$.ajax({ + url: 'http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', + method: 'post', + + headers: headers, + success: function(data) { + console.log(JSON.stringify(data)); + } +}) + +``` + +```javascript--nodejs +const fetch = require('node-fetch'); + +const headers = { + 'X-Api-Key':'API_KEY' + +}; + +fetch('http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', +{ + method: 'POST', + + headers: headers +}) +.then(function(res) { + return res.json(); +}).then(function(body) { + console.log(body); +}); + +``` + +```python +import requests +headers = { + 'X-Api-Key': 'API_KEY' +} + +r = requests.post('http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', params={ + +}, headers = headers) + +print r.json() + +``` + +```ruby +require 'rest-client' +require 'json' + +headers = { + 'X-Api-Key' => 'API_KEY' +} + +result = RestClient.post 'http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', + params: { + }, headers: headers + +p JSON.parse(result) + +``` + +```go +package main + +import ( + "bytes" + "net/http" +) + +func main() { + + headers := map[string][]string{ + "X-Api-Key": []string{"API_KEY"}, + + } + + data := bytes.NewBuffer([]byte{jsonReq}) + req, err := http.NewRequest("POST", "http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}", data) + req.Header = headers + + client := &http.Client{} + resp, err := client.Do(req) + // ... +} + +``` + +`POST /alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}` + +Bind an alert profile to a device. After binding, a webhook will be sent to the configured service when one of the events associated to the profile occurs. You can configure the profile and the webhook endpoint on the Domotz Portal + +Curl
+ ++
+ ++curl -X POST http://172.17.0.1:9080/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id} \ + -H 'X-Api-Key: API_KEY' + + ++Parameters
+ +|Parameter|In|Type|Required|Description| +|---|---|---|---|---| +|agent_id|path|integer(int32)|true|Agent ID| +|alert_profile_id|path|integer(int32)|true|Profile ID| +|device_id|path|integer(int32)|true|Device ID| + +Responses
+ +|Status|Meaning|Description|Schema| +|---|---|---|---| +|204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| + ++ +-## bindAlertProfileToDevice +## getAlertProfiles - + > Code samples ```shell -curl -X POST your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id} \ +curl -X GET http://172.17.0.1:9080/public-api/v1/user/{user_id}/alert-profile \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' ``` ```javascript var headers = { + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', - method: 'post', + url: 'http://172.17.0.1:9080/public-api/v1/user/{user_id}/alert-profile', + method: 'get', headers: headers, success: function(data) { @@ -4405,13 +8421,14 @@ $.ajax({ const fetch = require('node-fetch'); const headers = { + 'Accept':'application/json', 'X-Api-Key':'API_KEY' }; -fetch('your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', +fetch('http://172.17.0.1:9080/public-api/v1/user/{user_id}/alert-profile', { - method: 'POST', + method: 'GET', headers: headers }) @@ -4426,10 +8443,11 @@ fetch('your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/b ```python import requests headers = { + 'Accept': 'application/json', 'X-Api-Key': 'API_KEY' } -r = requests.post('your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/user/{user_id}/alert-profile', params={ }, headers = headers) @@ -4442,10 +8460,11 @@ require 'rest-client' require 'json' headers = { + 'Accept' => 'application/json', 'X-Api-Key' => 'API_KEY' } -result = RestClient.post 'your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/user/{user_id}/alert-profile', params: { }, headers: headers @@ -4464,12 +8483,13 @@ import ( func main() { headers := map[string][]string{ + "Accept": []string{"application/json"}, "X-Api-Key": []string{"API_KEY"}, } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("POST", "your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/user/{user_id}/alert-profile", data) req.Header = headers client := &http.Client{} @@ -4479,96 +8499,66 @@ func main() { ``` -`POST /alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id}` +`GET /user/{user_id}/alert-profile` -Bind an alert profile to a device. After binding, a webhook will be sent to the configured service when one of the events associated to the profile occurs. You can configure the profile and the webhook endpoint on the Domotz Portal +Returns the list of configured alert profiles. You can configure alert profiles on the Domotz Portal. Alert profiles define the association between a list of events and a notification channel (email, webhook or slack)Webhook Events
+ ++ +
-|Status|Meaning|Description|Schema| -|---|---|---|---| -|204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| ++ + + + +Event Name +Method +Schema +Expected Reply ++ + +device_configuration_change +POST +DeviceConfigurationChangeEvent +201 ++ + +device_configuration_misalignment +POST +DeviceConfigurationMisalignmentEvent +201 ++ + +device_heartbeat_lost +POST +DeviceHeartbeatLostEvent +201 ++ + +device_ip_change +POST +DeviceIPChangeEvent +201 ++ + +device_rtd +POST +DeviceRTDIssueEvent +201 ++ + +device_snmp +POST +DeviceSNMPEvent +201 ++ + +device_status +POST +DeviceStatusChangeEvent +201 ++ + + +device_tcp +POST +DeviceTCPEvent +201 +Curl
--curl -X POST your-domotz-api-endpoint/public-api/v1/alert-profile/{alert_profile_id}/binding/agent/{agent_id}/device/{device_id} \ +curl -X GET http://172.17.0.1:9080/public-api/v1/user/{user_id}/alert-profile \ + -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'Parameters
+Parameters
|Parameter|In|Type|Required|Description| |---|---|---|---|---| -|agent_id|path|integer(int32)|true|Agent ID| -|alert_profile_id|path|integer(int32)|true|Profile ID| -|device_id|path|integer(int32)|true|Device ID| - -Responses
- -|Status|Meaning|Description|Schema| -|---|---|---|---| -|204|[No Content](https://tools.ietf.org/html/rfc7231#section-6.3.5)|none|None| - -- -+|Name|Type|Required|Description| +|---|---|---|---|---| +|*anonymous*|[[AlertProfile](#schemaalertprofile)]|false|none| +|» description|string|false|The description of the alert profile| +|» events|[string]|false|The list of events associated to the profile| +|» id|integer(int32)|true|The id of the event profile| +|» is_enabled|boolean|false|true if the event profile is enabled, false otherwise| +|» name|string|false|The symbolic name associated to the profile| +|» tag|string|false|A label associated to the profile|Webhook Events
- -- -
+Status Code **200** -- - - +|user_id|path|integer(int32)|true|User ID| -Event Name -Method -Schema -Expected Reply -- +> Example responses -device_heartbeat_lost -POST -DeviceHeartbeatLostEvent -201 -- +> 200 Response -device_ip_change -POST -DeviceIPChangeEvent -201 -- +```json +[ + { + "description": "string", + "events": [ + "device_status" + ], + "id": 0, + "is_enabled": true, + "name": "string", + "tag": "string" + } +] +``` -device_rtd -POST -DeviceTCPEvent -201 -- +device_snmp -POST -DeviceSNMPEvent -201 -Responses
-- +|Status|Meaning|Description|Schema| +|---|---|---|---| +|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|The list of configured alert profiles|Inline| -device_status -POST -DeviceStatusChangeEvent -201 -- +device_tcp -POST -DeviceTCPEvent -201 -Response Schema
- -meta
@@ -4579,7 +8569,7 @@ Bind an alert profile to a device. After binding, a webhook will be sent to the > Code samples ```shell -curl -X GET your-domotz-api-endpoint/public-api/v1/meta/usage \ +curl -X GET http://172.17.0.1:9080/public-api/v1/meta/usage \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -4593,7 +8583,7 @@ var headers = { }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/meta/usage', + url: 'http://172.17.0.1:9080/public-api/v1/meta/usage', method: 'get', headers: headers, @@ -4613,7 +8603,7 @@ const headers = { }; -fetch('your-domotz-api-endpoint/public-api/v1/meta/usage', +fetch('http://172.17.0.1:9080/public-api/v1/meta/usage', { method: 'GET', @@ -4634,7 +8624,7 @@ headers = { 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/meta/usage', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/meta/usage', params={ }, headers = headers) @@ -4651,7 +8641,7 @@ headers = { 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/meta/usage', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/meta/usage', params: { }, headers: headers @@ -4676,7 +8666,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/meta/usage", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/meta/usage", data) req.Header = headers client := &http.Client{} @@ -4736,7 +8726,7 @@ Retrieves information about API usage and limits > Code samples ```shell -curl -X GET your-domotz-api-endpoint/public-api/v1/type/device/base \ +curl -X GET http://172.17.0.1:9080/public-api/v1/type/device/base \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -4750,7 +8740,7 @@ var headers = { }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/type/device/base', + url: 'http://172.17.0.1:9080/public-api/v1/type/device/base', method: 'get', headers: headers, @@ -4770,7 +8760,7 @@ const headers = { }; -fetch('your-domotz-api-endpoint/public-api/v1/type/device/base', +fetch('http://172.17.0.1:9080/public-api/v1/type/device/base', { method: 'GET', @@ -4791,7 +8781,7 @@ headers = { 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/type/device/base', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/type/device/base', params={ }, headers = headers) @@ -4808,7 +8798,7 @@ headers = { 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/type/device/base', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/type/device/base', params: { }, headers: headers @@ -4833,7 +8823,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/type/device/base", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/type/device/base", data) req.Header = headers client := &http.Client{} @@ -4887,7 +8877,7 @@ Status Code **200** > Code samples ```shell -curl -X GET your-domotz-api-endpoint/public-api/v1/type/device/detected \ +curl -X GET http://172.17.0.1:9080/public-api/v1/type/device/detected \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -4901,7 +8891,7 @@ var headers = { }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/type/device/detected', + url: 'http://172.17.0.1:9080/public-api/v1/type/device/detected', method: 'get', headers: headers, @@ -4921,7 +8911,7 @@ const headers = { }; -fetch('your-domotz-api-endpoint/public-api/v1/type/device/detected', +fetch('http://172.17.0.1:9080/public-api/v1/type/device/detected', { method: 'GET', @@ -4942,7 +8932,7 @@ headers = { 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/type/device/detected', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/type/device/detected', params={ }, headers = headers) @@ -4959,7 +8949,7 @@ headers = { 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/type/device/detected', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/type/device/detected', params: { }, headers: headers @@ -4984,7 +8974,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/type/device/detected", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/type/device/detected", data) req.Header = headers client := &http.Client{} @@ -5044,7 +9034,7 @@ Status Code **200** > Code samples ```shell -curl -X GET your-domotz-api-endpoint/public-api/v1/user \ +curl -X GET http://172.17.0.1:9080/public-api/v1/user \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY' @@ -5058,7 +9048,7 @@ var headers = { }; $.ajax({ - url: 'your-domotz-api-endpoint/public-api/v1/user', + url: 'http://172.17.0.1:9080/public-api/v1/user', method: 'get', headers: headers, @@ -5078,7 +9068,7 @@ const headers = { }; -fetch('your-domotz-api-endpoint/public-api/v1/user', +fetch('http://172.17.0.1:9080/public-api/v1/user', { method: 'GET', @@ -5099,7 +9089,7 @@ headers = { 'X-Api-Key': 'API_KEY' } -r = requests.get('your-domotz-api-endpoint/public-api/v1/user', params={ +r = requests.get('http://172.17.0.1:9080/public-api/v1/user', params={ }, headers = headers) @@ -5116,7 +9106,7 @@ headers = { 'X-Api-Key' => 'API_KEY' } -result = RestClient.get 'your-domotz-api-endpoint/public-api/v1/user', +result = RestClient.get 'http://172.17.0.1:9080/public-api/v1/user', params: { }, headers: headers @@ -5141,7 +9131,7 @@ func main() { } data := bytes.NewBuffer([]byte{jsonReq}) - req, err := http.NewRequest("GET", "your-domotz-api-endpoint/public-api/v1/user", data) + req, err := http.NewRequest("GET", "http://172.17.0.1:9080/public-api/v1/user", data) req.Header = headers client := &http.Client{} @@ -5240,7 +9230,7 @@ Returns the User information "zone": "string" }, "display_name": "string", - "first_seen_on": "2019-06-11T09:08:10Z", + "first_seen_on": "2019-08-24T14:15:22Z", "id": 0, "importance": "VITAL", "main_id": 0, @@ -5266,7 +9256,11 @@ Returns the User information |Name|Type|Required|Description| |---|---|---|---|---| |authentication_status|string|false|When defined the device requires authentication info to perform extended discovery- *REQUIRED*: the device requires authentication, extended discovery is locked
- *PENDING*: credentials have been submitted but not verified yet
- *WRONG_CREDENTIALS*: device authentication failed
- *AUTHENTICATED*: device authentication succeeded
AgentVPNActiveConnection
+ + + +```json +{ + "bytes": 0, + "creation_time": "2019-08-24T14:15:22Z", + "expiration_time": "2019-08-24T14:15:22Z", + "id": 0, + "name": "string", + "status": "ACTIVE" +} + +``` + +### Properties + +|Name|Type|Required|Description| +|---|---|---|---|---| +|bytes|integer(int32)|true|Current VPN connection consumption (bytes)| +|creation_time|string(date-time)|true|none| +|expiration_time|string(date-time)|true|none| +|id|integer(int32)|true|The ID of the VPN connection| +|name|string|true|The user that started the VPN connection| +|status|string|true|The status of the vpn connection| + +#### Enumerated Values + +|Property|Value| +|---|---| +|status|ACTIVE| +|status|INACTIVE| +|status|EXPIRED| + +AgentVPNConnection
+ + + +```json +{ + "allowed_ip": "string", + "routing_policy": "global" +} + +``` + +### Properties + +|Name|Type|Required|Description| +|---|---|---|---|---| +|allowed_ip|string|true|The only public IP address allowed to access the connection. It will be impossible to use the connection from other IP addresses. You should use your public IP address. For `http` and `https` it is safe, since if you keep the connection link secret nobody will access the device. For `tcp` it is not recommended because a random port scan on our servers may allow an hostile actor to use the connection, accessing the device's tcp port as if it was in the agent's network.| +|routing_policy|string|true|The traffic routing policy for the VPN connection: - *global*: All the traffic is routed through the VPN On Demand. More consumption on the Domotz Cloud - *local*: Only LAN traffic passes through the VPN On Demand. Less consumption on the Domotz Cloud| + +#### Enumerated Values + +|Property|Value| +|---|---| +|routing_policy|global| +|routing_policy|local| +AlertProfile
@@ -5674,6 +9736,46 @@ Returns the User information |alert_profile_id|integer(int32)|true|The id of the alert profile| |device_id|integer(int32)|true|none| +Area
+ + + +```json +{ + "id": 0, + "name": "string" +} + +``` + +*Represents an area of the Company* + +### Properties + +|Name|Type|Required|Description| +|---|---|---|---|---| +|id|integer(int32)|true|The identifier of the Area| +|name|string|true|The name of the Area| + +ConnectionConsumption
+ + + +```json +{ + "current": 0, + "limit": 0 +} + +``` + +### Properties + +|Name|Type|Required|Description| +|---|---|---|---|---| +|current|integer(int32)|true|Current connection consumption (bytes)| +|limit|integer(int32)|true|Maximum connection consumption (bytes)| +ConnectionSession
@@ -5681,7 +9783,7 @@ Returns the User information ```json { "allowed_ip": "string", - "expiration": "2019-06-11T09:08:10Z", + "expiration": "2019-08-24T14:15:22Z", "id": 0, "link": "string", "port": 0, @@ -5694,12 +9796,12 @@ Returns the User information |Name|Type|Required|Description| |---|---|---|---|---| -|allowed_ip|string|true|The only public IP address allowed to access the connection. It will be impossible to use the connection from other IP addresses. You can use `0.0.0.0` to allow access from any IP - For `http` abd `https` it is safe, since if you keep the connection link secret nobody will access the device. For `tcp` it is not recommended because a random port scan on our servers may allow an hostile actor to use the connection, accessing the device's tcp port as if it was in the agent's network.| +|allowed_ip|string|true|The only public IP address allowed to access the connection. It will be impossible to use the connection from other IP addresses. You should use your public IP address. For `http` and `https` it is safe, since if you keep the connection link secret nobody will access the device. For `tcp` it is not recommended because a random port scan on our servers may allow an hostile actor to use the connection, accessing the device's tcp port as if it was in the agent's network.| |expiration|string(date-time)|false|The time after which the connection will be closed| |id|integer(int32)|true|The unique identifier of the `connection`| |link|string|false|Either the link to access the device's HTTP(s) interface in the browser or the host/port coordinates of the proxied TCP port, depending on the protocol (see protocol description in the request)| |port|integer(int32)|true|none| -|protocol|string|true|The protocol wrapped by the connection: - *http/https*: the `link` field in the reply will contain an `https` URL. A browser or a similar user agent must be used: the client must have cookies enabled and the capability of following 302 redirects. If the protocol is `https` the device's certificate will be accepted without checks and its information ignored (our server will act as a proxy). - *tcp*: the `link` field will be in the form `tcp://{host}:{port}`. Any connection established (e.g. with `telnet` or `ssh`) on these coordinates will be securely forwarded to the requested `port` of the device.| +|protocol|string|true|The protocol wrapped by the connection: - *http/https*: the `link` field in the reply will contain an `https` URL. A browser or a similar user agent must be used: the client must have cookies enabled and the capability of following 302 redirects. If the protocol is `https` the device's certificate will be accepted without checks and its information ignored (our server will act as a proxy). - *tcp*: the `link` field will be in the form `tcp://{host}:{port}`. Any connection established (e.g. with `telnet` or `ssh`) on these coordinates will be securely forwarded to the requested `port` of the device. - *ssh*: the `link` field will contain an `https` URL. A browser or a similar user agent must be used: the client must have cookies enabled and the capability of following 302 redirects. - *rdp*: the `link` field will contain an `https` URL. A browser or a similar user agent must be used: the client must have cookies enabled and the capability of following 302 redirects.| #### Enumerated Values @@ -5708,6 +9810,8 @@ Returns the User information |protocol|http| |protocol|https| |protocol|tcp| +|protocol|ssh| +|protocol|rdp|DetectedDeviceType
@@ -5763,6 +9867,74 @@ Returns the User information |label|string|false|A human-readable short description of the type| |vital|boolean|false|Whether a device of this type will be marked as `VITAL` as soon as recognised| +DeviceConfigurationChangeEvent
+ + + +```json +{ + "data": { + "agent_id": 0, + "device_id": 0 + }, + "name": "device_configuration_change", + "timestamp": "2019-08-24T14:15:22Z" +} + +``` + +*Triggered when the device configuration changes* + +### Properties + +|Name|Type|Required|Description| +|---|---|---|---|---| +|data|object|false|none| +|» agent_id|integer(int32)|false|The `id` of the `agent`| +|» device_id|integer(int32)|true|The `id` of the `device`| +|name|string|true|none| +|timestamp|string(date-time)|true|The timestamp of the event| + +#### Enumerated Values + +|Property|Value| +|---|---| +|name|device_configuration_change| + +DeviceConfigurationMisalignmentEvent
+ + + +```json +{ + "data": { + "agent_id": 0, + "device_id": 0 + }, + "name": "device_configuration_misalignment", + "timestamp": "2019-08-24T14:15:22Z" +} + +``` + +*Triggered when the device configuration becomes different from the startup one* + +### Properties + +|Name|Type|Required|Description| +|---|---|---|---|---| +|data|object|false|none| +|» agent_id|integer(int32)|false|The `id` of the `agent`| +|» device_id|integer(int32)|true|The `id` of the `device`| +|name|string|true|none| +|timestamp|string(date-time)|true|The timestamp of the event| + +#### Enumerated Values + +|Property|Value| +|---|---| +|name|device_configuration_misalignment| +DeviceConnection
@@ -5780,9 +9952,9 @@ Returns the User information |Name|Type|Required|Description| |---|---|---|---|---| -|allowed_ip|string|true|The only public IP address allowed to access the connection. It will be impossible to use the connection from other IP addresses. You can use `0.0.0.0` to allow access from any IP - For `http` abd `https` it is safe, since if you keep the connection link secret nobody will access the device. For `tcp` it is not recommended because a random port scan on our servers may allow an hostile actor to use the connection, accessing the device's tcp port as if it was in the agent's network.| +|allowed_ip|string|true|The only public IP address allowed to access the connection. It will be impossible to use the connection from other IP addresses. You should use your public IP address. For `http` and `https` it is safe, since if you keep the connection link secret nobody will access the device. For `tcp` it is not recommended because a random port scan on our servers may allow an hostile actor to use the connection, accessing the device's tcp port as if it was in the agent's network.| |port|integer(int32)|true|none| -|protocol|string|true|The protocol wrapped by the connection: - *http/https*: the `link` field in the reply will contain an `https` URL. A browser or a similar user agent must be used: the client must have cookies enabled and the capability of following 302 redirects. If the protocol is `https` the device's certificate will be accepted without checks and its information ignored (our server will act as a proxy). - *tcp*: the `link` field will be in the form `tcp://{host}:{port}`. Any connection established (e.g. with `telnet` or `ssh`) on these coordinates will be securely forwarded to the requested `port` of the device.| +|protocol|string|true|The protocol wrapped by the connection: - *http/https*: the `link` field in the reply will contain an `https` URL. A browser or a similar user agent must be used: the client must have cookies enabled and the capability of following 302 redirects. If the protocol is `https` the device's certificate will be accepted without checks and its information ignored (our server will act as a proxy). - *tcp*: the `link` field will be in the form `tcp://{host}:{port}`. Any connection established (e.g. with `telnet` or `ssh`) on these coordinates will be securely forwarded to the requested `port` of the device. - *ssh*: the `link` field will contain an `https` URL. A browser or a similar user agent must be used: the client must have cookies enabled and the capability of following 302 redirects. - *rdp*: the `link` field will contain an `https` URL. A browser or a similar user agent must be used: the client must have cookies enabled and the capability of following 302 redirects.| #### Enumerated Values @@ -5791,6 +9963,8 @@ Returns the User information |protocol|http| |protocol|https| |protocol|tcp| +|protocol|ssh| +|protocol|rdp|DeviceCredentials
@@ -5811,29 +9985,6 @@ Returns the User information |password|string|true|password| |username|string|true|username| -DeviceDetails
- - - -```json -{ - "room": "string", - "snmp_read_community": "string", - "snmp_write_community": "string", - "zone": "string" -} - -``` - -### Properties - -|Name|Type|Required|Description| -|---|---|---|---|---| -|room|string|false|none| -|snmp_read_community|string|false|none| -|snmp_write_community|string|false|none| -|zone|string|false|none| -DeviceDiscoveryEvent
@@ -5845,7 +9996,7 @@ Returns the User information "device_id": 0 }, "name": "agent_device_discovery", - "timestamp": "2019-06-11T09:08:10Z" + "timestamp": "2019-08-24T14:15:22Z" } ``` @@ -5868,6 +10019,25 @@ Returns the User information |---|---| |name|agent_device_discovery| +DeviceEyeSNMPHistorySample
+ + + +```json +{ + "timestamp": "2019-08-24T14:15:22Z", + "value": "string" +} + +``` + +### Properties + +|Name|Type|Required|Description| +|---|---|---|---|---| +|timestamp|string(date-time)|true|The time the sample was reported to Domotz| +|value|string|true|none| +DeviceHeartbeatLostEvent
@@ -5879,7 +10049,7 @@ Returns the User information "device_id": 0 }, "name": "device_heartbeat_lost", - "timestamp": "2019-06-11T09:08:10Z" + "timestamp": "2019-08-24T14:15:22Z" } ``` @@ -5916,7 +10086,7 @@ Returns the User information "string" ] }, - "timestamp": "2019-06-11T09:08:10Z", + "timestamp": "2019-08-24T14:15:22Z", "type": "IP_CHANGE" } @@ -5958,7 +10128,7 @@ Returns the User information ] }, "name": "device_ip_change", - "timestamp": "2019-06-11T09:08:10Z" + "timestamp": "2019-08-24T14:15:22Z" } ``` @@ -6017,7 +10187,7 @@ Returns the User information "median": "string", "min": "string", "sent_packet_count": 0, - "timestamp": "2019-06-11T09:08:10Z" + "timestamp": "2019-08-24T14:15:22Z" } ``` @@ -6053,7 +10223,7 @@ Returns the User information } }, "name": "device_rtd", - "timestamp": "2019-06-11T09:08:10Z" + "timestamp": "2019-08-24T14:15:22Z" } ``` @@ -6098,7 +10268,7 @@ Returns the User information "latest_lost_packet_count": 0, "latest_median": "string", "latest_sent_packet_count": 0, - "timestamp": "2019-06-11T09:08:10Z" + "timestamp": "2019-08-24T14:15:22Z" } ``` @@ -6129,7 +10299,7 @@ Returns the User information "value": "string" }, "name": "device_snmp", - "timestamp": "2019-06-11T09:08:10Z" + "timestamp": "2019-08-24T14:15:22Z" } ``` @@ -6185,7 +10355,7 @@ Returns the User information "value": "UP" }, "name": "device_status", - "timestamp": "2019-06-11T09:08:10Z" + "timestamp": "2019-08-24T14:15:22Z" } ``` @@ -6228,7 +10398,7 @@ Returns the User information ] }, "name": "device_tcp", - "timestamp": "2019-06-11T09:08:10Z" + "timestamp": "2019-08-24T14:15:22Z" } ``` @@ -6256,6 +10426,34 @@ Returns the User information |status|DOWN| |name|device_tcp| +DomotzEyesUsageInformation
+ + + +```json +{ + "limit": 0, + "usage": { + "snmp": 0, + "tcp": 0, + "total": 0 + } +} + +``` + +*Information about Domotz Eyes current usage and limits* + +### Properties + +|Name|Type|Required|Description| +|---|---|---|---|---| +|limit|integer(int32)|false|Number of allowed Domotz Eyes for the agent| +|usage|object|false|none| +|» snmp|integer(int32)|false|Number of configured Domotz Eyes of type `snmp` on the agent.| +|» tcp|integer(int32)|false|Number of configured Domotz Eyes of type `tcp` on the agent.| +|» total|integer(int32)|false|Number of configured Domotz Eyes on the agent.| +DummyDevice
@@ -6270,7 +10468,7 @@ Returns the User information "zone": "string" }, "display_name": "string", - "first_seen_on": "2019-06-11T09:08:10Z", + "first_seen_on": "2019-08-24T14:15:22Z", "id": 0, "importance": "VITAL", "main_id": 0, @@ -6317,7 +10515,7 @@ Returns the User information "zone": "string" }, "display_name": "string", - "first_seen_on": "2019-06-11T09:08:10Z", + "first_seen_on": "2019-08-24T14:15:22Z", "id": 0, "importance": "VITAL", "main_id": 0, @@ -6337,7 +10535,7 @@ Returns the User information "ip_addresses": [ "string" ], - "last_status_change": "2019-06-11T09:08:10Z", + "last_status_change": "2019-08-24T14:15:22Z", "model": "string", "status": "ONLINE", "vendor": "string", @@ -6380,7 +10578,7 @@ Returns the User information "zone": "string" }, "display_name": "string", - "first_seen_on": "2019-06-11T09:08:10Z", + "first_seen_on": "2019-08-24T14:15:22Z", "id": 0, "importance": "VITAL", "main_id": 0, @@ -6400,7 +10598,7 @@ Returns the User information "ip_addresses": [ "string" ], - "last_status_change": "2019-06-11T09:08:10Z", + "last_status_change": "2019-08-24T14:15:22Z", "model": "string", "status": "ONLINE", "vendor": "string" @@ -6452,7 +10650,7 @@ Returns the User information "zone": "string" }, "display_name": "string", - "first_seen_on": "2019-06-11T09:08:10Z", + "first_seen_on": "2019-08-24T14:15:22Z", "id": 0, "importance": "VITAL", "main_id": 0, @@ -6472,7 +10670,7 @@ Returns the User information "ip_addresses": [ "string" ], - "last_status_change": "2019-06-11T09:08:10Z", + "last_status_change": "2019-08-24T14:15:22Z", "model": "string", "status": "ONLINE", "vendor": "string", @@ -6519,7 +10717,7 @@ Returns the User information ```json { - "timestamp": "2019-06-11T09:08:10Z", + "timestamp": "2019-08-24T14:15:22Z", "values": [ 0 ] @@ -6537,6 +10735,245 @@ Returns the User information |timestamp|string(date-time)|false|The time the sample was reported to Domotz| |values|[integer]|false|A pair of values: the download and upload speed, in Bit Per Seconds (bps), as measured by the Agent| +SNMPDomotzAuthentication
+ + + +```json +{ + "authentication_key": "string", + "authentication_protocol": "MD5", + "encryption_key": "string", + "encryption_protocol": "DES", + "snmp_read_community": "string", + "snmp_write_community": "string", + "username": "string", + "version": "V2" +} + +``` + +*The SNMP authentication setting of a device* + +### Properties + +|Name|Type|Required|Description| +|---|---|---|---|---| +|authentication_key|string|false|none| +|authentication_protocol|string|false|The SNMP authentication protocol| +|encryption_key|string|false|none| +|encryption_protocol|string|false|The SNMP encryption protocol| +|snmp_read_community|string|false|none| +|snmp_write_community|string|false|none| +|username|string|false|none| +|version|string|true|The configured SNMP version| + +#### Enumerated Values + +|Property|Value| +|---|---| +|authentication_protocol|MD5| +|authentication_protocol|SHA| +|encryption_protocol|DES| +|encryption_protocol|AES| +|version|V2| +|version|V1| +|version|V3_AUTH_PRIV| +|version|V3_NO_AUTH| +|version|V3_AUTH_NO_PRIV| + +SNMPDomotzEye
+ + + +```json +{ + "category": "OTHER", + "id": 0, + "last_update": "2019-08-24T14:15:22Z", + "latest_value": "string", + "name": "string", + "oid": "string", + "value_type": "STRING" +} + +``` + +*Information about a configured SNMP Domotz Eye* + +### Properties + +|Name|Type|Required|Description| +|---|---|---|---|---| +|category|string|true|The category of the OID| +|id|integer(int32)|true|The unique identifier of the SNMP Domotz Eye| +|last_update|string(date-time)|true|The timestamp of the latest update| +|latest_value|string|true|The value retrieved on the OID| +|name|string|true|The name of the Domotz Eyes| +|oid|string|true|The OID string| +|value_type|string|true|The type of the OID| + +#### Enumerated Values + +|Property|Value| +|---|---| +|category|OTHER| +|category|CONSUMABLE| +|category|CPU| +|category|DISK_SPACE| +|category|MEMORY| +|category|NETWORK_TRAFFIC| +|category|TEMPERATURE| +|value_type|STRING| +|value_type|NUMERIC| + +SNMPDomotzEyeCreation
+ + + +```json +{ + "category": "OTHER", + "name": "string", + "oid": "string", + "value_type": "STRING" +} + +``` + +*SNMP Domotz Eye Data* + +### Properties + +|Name|Type|Required|Description| +|---|---|---|---|---| +|category|string|true|The category of the OID| +|name|string|true|The name of the Domotz Eyes| +|oid|string|true|The OID string| +|value_type|string|true|The type of the OID| + +#### Enumerated Values + +|Property|Value| +|---|---| +|category|OTHER| +|category|CONSUMABLE| +|category|CPU| +|category|DISK_SPACE| +|category|MEMORY| +|category|NETWORK_TRAFFIC| +|category|TEMPERATURE| +|value_type|STRING| +|value_type|NUMERIC| + +SNMPDomotzEyeTrigger
+ + + +```json +{ + "alert": { + "email": true, + "mobile": true + }, + "creation_time": "2019-08-24T14:15:22Z", + "function_id": 0, + "id": 0, + "name": "string", + "operands": [ + "string" + ] +} + +``` + +*Information about a trigger* + +### Properties + +|Name|Type|Required|Description| +|---|---|---|---|---| +|alert|object|false|The alerts details| +|» email|boolean|false|True if the email alert is active| +|» mobile|boolean|false|True if the mobile alert is active| +|creation_time|string(date-time)|false|none| +|function_id|integer(int32)|true|The unique identifier of the function assigned to the trigger| +|id|integer(int32)|true|The unique identifier of the SNMP Trigger| +|name|string|true|The name of the trigger| +|operands|[string]|true|The operands for the function| + +SNMPDomotzEyeTriggerFunction
+ + + +```json +{ + "cardinality": 0, + "id": 0, + "name": "string", + "value_types": "STRING" +} + +``` + +*Information about a trigger function* + +### Properties + +|Name|Type|Required|Description| +|---|---|---|---|---| +|cardinality|integer(int32)|true|The number of arguments of the function| +|id|integer(int32)|true|The unique identifier of the SNMP Trigger function| +|name|string|true|The name of the function| +|value_types|string|true|The type of the operands| + +#### Enumerated Values + +|Property|Value| +|---|---| +|value_types|STRING| +|value_types|NUMERIC| + +SNMPDomotzSnmpTriggerAlertCreation
+ + + +```json +{} + +``` + +*SNMP Trigger Alert* + +### Properties + +*None* + +SNMPDomotzSnmpTriggerCreation
+ + + +```json +{ + "function_id": 0, + "name": "string", + "operands": [ + "string" + ] +} + +``` + +*SNMP Trigger* + +### Properties + +|Name|Type|Required|Description| +|---|---|---|---|---| +|function_id|integer(int32)|true|The unique identifier of the sensor function| +|name|string|true|The name of the trigger| +|operands|[string]|true|The operands for the function| +SubnetIpDevice
@@ -6551,7 +10988,7 @@ Returns the User information "zone": "string" }, "display_name": "string", - "first_seen_on": "2019-06-11T09:08:10Z", + "first_seen_on": "2019-08-24T14:15:22Z", "id": 0, "importance": "VITAL", "main_id": 0, @@ -6571,7 +11008,7 @@ Returns the User information "ip_addresses": [ "string" ], - "last_status_change": "2019-06-11T09:08:10Z", + "last_status_change": "2019-08-24T14:15:22Z", "model": "string", "status": "ONLINE", "vendor": "string", @@ -6606,6 +11043,109 @@ Returns the User information |»» snmp|string|false|none| |»» upnp|string|false|none| +TCPDomotzEye
+ + + +```json +{ + "id": 0, + "last_update": "2019-08-24T14:15:22Z", + "port": 0, + "status": "UP" +} + +``` + +*Information about a configured TCP Domotz Eye* + +### Properties + +|Name|Type|Required|Description| +|---|---|---|---|---| +|id|integer(int32)|true|The unique identifier of the TCP Domotz Eye| +|last_update|string(date-time)|true|The timestamp of the latest update| +|port|integer(int32)|true|The port number| +|status|string|true|The status of the TCP service| + +#### Enumerated Values + +|Property|Value| +|---|---| +|status|UP| +|status|DOWN| + +TCPDomotzEyeCreation
+ + + +```json +{ + "port": 0 +} + +``` + +*TCP Domotz Eye Data* + +### Properties + +|Name|Type|Required|Description| +|---|---|---|---|---| +|port|integer(int32)|true|The port number| + +Team
+ + + +```json +{ + "id": 0, + "name": "string" +} + +``` + +*Represents a team of the Company* + +### Properties + +|Name|Type|Required|Description| +|---|---|---|---|---| +|id|integer(int32)|true|The identifier of the Team| +|name|string|true|The name of the Team| + +TeamCreation
+ + + +```json +{ + "leader": { + "details": { + "display_name": "string" + }, + "name": "string", + "password": "string" + }, + "name": "string" +} + +``` + +*Team Creation under specified Area* + +### Properties + +|Name|Type|Required|Description| +|---|---|---|---|---| +|leader|object|true|The Team Leader| +|» details|object|true|The Team Leader's details| +|»» display_name|string|true|The Team Leader's display name| +|» name|string|true|The Team Leader's name| +|» password|string|true|The Team Leader's password| +|name|string|true|The Team's name| +User