diff --git a/Dockerfile b/Dockerfile index 3d4f662c779..6d1fecd2f9c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,4 +10,4 @@ WORKDIR /local RUN bundle install --system -RUN npm install -g widdershins@3.6.6 node-fetch@2.2.0 json-stable-stringify@1.0.1 swagger-cli@2.2.1 +RUN npm install -g widdershins@3.6.6 node-fetch@2.2.0 json-stable-stringify@1.0.1 swagger-cli@4.0.3 diff --git a/build/images/favicon.ico b/build/images/favicon.ico index 4c12eede378..a0b2408b394 100644 Binary files a/build/images/favicon.ico and b/build/images/favicon.ico differ diff --git a/build/images/logo.png b/build/images/logo.png index 036beacd907..17dbda022cb 100644 Binary files a/build/images/logo.png and b/build/images/logo.png differ diff --git a/build/index.html b/build/index.html index 79478e86ef5..c02d44ab544 100644 --- a/build/index.html +++ b/build/index.html @@ -224,7 +224,15 @@ + +
  • + actions +
  • @@ -267,6 +298,12 @@
  • setCredentials
  • +
  • + getSNMPAuthentication +
  • +
  • + setSNMPAuthentication +
  • setSnmpCommunity
  • @@ -299,10 +336,49 @@
  • - actions + SNMP/TCP SENSORS
  • @@ -315,11 +391,25 @@
  • - alert profiles + company +
  • +
  • + alert profiles +
  • @@ -394,6 +487,12 @@
  • AgentStatusEvent
  • +
  • + AgentVPNActiveConnection +
  • +
  • + AgentVPNConnection +
  • AlertProfile
  • @@ -403,6 +502,12 @@
  • AlertProfileDeviceBinding
  • +
  • + Area +
  • +
  • + ConnectionConsumption +
  • ConnectionSession
  • @@ -412,6 +517,12 @@
  • DeviceBaseType
  • +
  • + DeviceConfigurationChangeEvent +
  • +
  • + DeviceConfigurationMisalignmentEvent +
  • DeviceConnection
  • @@ -419,10 +530,10 @@ DeviceCredentials
  • - DeviceDetails + DeviceDiscoveryEvent
  • - DeviceDiscoveryEvent + DeviceEyeSNMPHistorySample
  • DeviceHeartbeatLostEvent @@ -457,6 +568,9 @@
  • DeviceTCPEvent
  • +
  • + DomotzEyesUsageInformation +
  • DummyDevice
  • @@ -472,9 +586,42 @@
  • NetworkSpeedSample
  • +
  • + SNMPDomotzAuthentication +
  • +
  • + SNMPDomotzEye +
  • +
  • + SNMPDomotzEyeCreation +
  • +
  • + SNMPDomotzEyeTrigger +
  • +
  • + SNMPDomotzEyeTriggerFunction +
  • +
  • + SNMPDomotzSnmpTriggerAlertCreation +
  • +
  • + SNMPDomotzSnmpTriggerCreation +
  • SubnetIpDevice
  • +
  • + TCPDomotzEye +
  • +
  • + TCPDomotzEyeCreation +
  • +
  • + Team +
  • +
  • + TeamCreation +
  • User
  • @@ -487,26 +634,22 @@
    -

    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

    -## 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)

    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| - -
    - -

    Webhook Events

    - - - - - - - - - - - +|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" + } +] +``` - - - - - - +

    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

    - -
    Event NameMethodSchemaExpected Reply
    device_heartbeat_lostPOSTDeviceHeartbeatLostEvent201
    device_ip_changePOSTDeviceIPChangeEvent201
    device_rtdPOSTDeviceTCPEvent201
    device_snmpPOSTDeviceSNMPEvent201
    device_statusPOSTDeviceStatusChangeEvent201
    device_tcpPOSTDeviceTCPEvent201
    +Status Code **200** -
    +|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|

    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
    | -|details|[DeviceDetails](#schemadevicedetails)|false|none| +|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| @@ -5310,18 +9304,22 @@ Returns the User information }, "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": { @@ -5359,6 +9357,9 @@ Returns the User information |» 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| @@ -5397,18 +9398,22 @@ Returns the User information }, "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": { @@ -5424,11 +9429,7 @@ Returns the User information "agent": "string", "package": "string" }, - "listen_on": "string", - "location": { - "latitude": "string", - "longitude": "string" - } + "listen_on": "string" } ``` @@ -5457,7 +9458,7 @@ Returns the User information ```json { - "timestamp": "2019-06-11T09:08:10Z", + "timestamp": "2019-08-24T14:15:22Z", "type": "CONNECTION_RECOVERED" } @@ -5495,7 +9496,7 @@ Returns the User information ] }, "name": "agent_security_issue", - "timestamp": "2019-06-11T09:08:10Z" + "timestamp": "2019-08-24T14:15:22Z" } ``` @@ -5542,7 +9543,7 @@ Returns the User information } }, "name": "agent_speed_test", - "timestamp": "2019-06-11T09:08:10Z" + "timestamp": "2019-08-24T14:15:22Z" } ``` @@ -5584,7 +9585,7 @@ Returns the User information "value": "UP" }, "name": "agent_status", - "timestamp": "2019-06-11T09:08:10Z" + "timestamp": "2019-08-24T14:15:22Z" } ``` @@ -5609,6 +9610,67 @@ Returns the User information |value|DOWN| |name|agent_status| +

    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