Navbar
Curl JavaScript Node.JS Python Ruby Go

Domotz Public API v1.12.1

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

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.

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

Authentication

agent

listAgents

Code samples

curl -X GET {baseURL}/public-api/v1/agent \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent',
  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('{baseURL}/public-api/v1/agent',
{
  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('{baseURL}/public-api/v1/agent', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent',
  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", "{baseURL}/public-api/v1/agent", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent

Returns the agents list

Curl

curl -X GET {baseURL}/public-api/v1/agent \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'

Parameters

Parameter In Type Required Description
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)

Example responses

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,
    "installation_info": {
      "contract_id": "string",
      "customer_id": "string"
    },
    "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"
    },
    "organization": {
      "id": 0,
      "name": "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"
    }
  }
]

Responses

Status Meaning Description Schema
200 OK The agent list Inline

Response Schema

Status Code 200

Name Type Required Description
anonymous [AgentBase] false none
» access_right object false none
»» api_enabled boolean false If false the 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
» installation_info object false none
»» contract_id string false none
»» customer_id string false 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
» organization object false none
»» id integer(int32) false none
»» name 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

countAgents

Code samples

curl -X HEAD {baseURL}/public-api/v1/agent \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent',
  method: 'head',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'X-Api-Key':'API_KEY'

};

fetch('{baseURL}/public-api/v1/agent',
{
  method: 'HEAD',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'X-Api-Key': 'API_KEY'
}

r = requests.head('{baseURL}/public-api/v1/agent', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.head '{baseURL}/public-api/v1/agent',
  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("HEAD", "{baseURL}/public-api/v1/agent", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

HEAD /agent

Counts the agents

Curl

curl -X HEAD {baseURL}/public-api/v1/agent \ -H 'X-Api-Key: API_KEY'

Parameters

Parameter In Type Required Description
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)

Responses

Status Meaning Description Schema
204 No Content The number of agents matching the filtering criteria None

Response Headers

Status Header Type Format Description
204 X-Entities-Count integer int32 The number of agents matching the filtering criteria

deleteAgent

Code samples

curl -X DELETE {baseURL}/public-api/v1/agent/{agent_id} \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/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('{baseURL}/public-api/v1/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('{baseURL}/public-api/v1/agent/{agent_id}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.delete '{baseURL}/public-api/v1/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", "{baseURL}/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 {baseURL}/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 none None

getAgent

Code samples

curl -X GET {baseURL}/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: '{baseURL}/public-api/v1/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('{baseURL}/public-api/v1/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('{baseURL}/public-api/v1/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 '{baseURL}/public-api/v1/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", "{baseURL}/public-api/v1/agent/{agent_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/{agent_id}

Returns the details of an agent

Curl

curl -X GET {baseURL}/public-api/v1/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

{
  "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,
  "installation_info": {
    "contract_id": "string",
    "customer_id": "string"
  },
  "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"
  },
  "organization": {
    "id": 0,
    "name": "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 {baseURL}/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: '{baseURL}/public-api/v1/agent/{agent_id}/connection/consumption',
  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('{baseURL}/public-api/v1/agent/{agent_id}/connection/consumption',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/connection/consumption', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/connection/consumption',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/connection/consumption", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/{agent_id}/connection/consumption

Get the connection consumption on the given agent

Curl

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/connection/consumption \ -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

{
  "current": 0,
  "limit": 0
}

Responses

Status Meaning Description Schema
200 OK none ConnectionConsumption

getAgentVPNActiveConnections

Code samples

curl -X GET {baseURL}/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: '{baseURL}/public-api/v1/agent/{agent_id}/connection/vpn-session',
  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('{baseURL}/public-api/v1/agent/{agent_id}/connection/vpn-session',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/connection/vpn-session', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/connection/vpn-session',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/connection/vpn-session", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/{agent_id}/connection/vpn-session

Get the Active VPN connections for the agent

Curl

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/connection/vpn-session \ -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

[
  {
    "bytes": 0,
    "creation_time": "2019-08-24T14:15:22Z",
    "expiration_time": "2019-08-24T14:15:22Z",
    "id": 0,
    "name": "string",
    "status": "ACTIVE"
  }
]

Responses

Status Meaning Description Schema
200 OK Agent VPN Connection information Inline

Response Schema

Status Code 200

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

metrics

getAgentListUptime

Code samples

curl -X GET {baseURL}/public-api/v1/agent/uptime \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/uptime',
  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('{baseURL}/public-api/v1/agent/uptime',
{
  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('{baseURL}/public-api/v1/agent/uptime', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/uptime',
  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", "{baseURL}/public-api/v1/agent/uptime", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/uptime

Returns the uptime of all agents

Curl

curl -X GET {baseURL}/public-api/v1/agent/uptime \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'

Parameters

Parameter In Type Required Description
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

[
  {
    "agent_id": 0,
    "downtime_intervals": [
      {
        "end": "2019-08-24T14:15:22Z",
        "start": "2019-08-24T14:15:22Z"
      }
    ],
    "online_seconds": 0,
    "total_seconds": 0,
    "uptime": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK The uptime of the agents Inline

Response Schema

Status Code 200

Name Type Required Description
anonymous [AgentUptime] false none
» agent_id integer(int32) true none
» downtime_intervals [object] false none
»» end string(date-time) false none
»» start string(date-time) false none
» online_seconds integer(int32) true none
» total_seconds integer(int32) true none
» uptime string true The uptime percentage of the agent

getAgentRTDStats

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/device/rtd \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/rtd',
  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('{baseURL}/public-api/v1/agent/{agent_id}/device/rtd',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/device/rtd', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/device/rtd',
  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", "{baseURL}/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 {baseURL}/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

[
  {
    "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 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

getDeviceStatusHistory

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/device/{device_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: '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event',
  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('{baseURL}/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);
});

import requests
headers = {
  'Accept': 'application/json',
  'X-Api-Key': 'API_KEY'
}

r = requests.get('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/history/network/event',
  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", "{baseURL}/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 {baseURL}/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

[
  {
    "details": {
      "new_ip": [
        "string"
      ],
      "old_ip": [
        "string"
      ]
    },
    "timestamp": "2019-08-24T14:15:22Z",
    "type": "IP_CHANGE"
  }
]

Responses

Status Meaning Description Schema
200 OK A time series Inline

Response Schema

Status Code 200

Name Type Required Description
anonymous [DeviceHistory] 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

curl -X GET {baseURL}/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: '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd',
  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('{baseURL}/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);
});

import requests
headers = {
  'Accept': 'application/json',
  'X-Api-Key': 'API_KEY'
}

r = requests.get('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/history/rtd',
  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", "{baseURL}/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 {baseURL}/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

[
  {
    "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 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 none
» timestamp string(date-time) true The time the sample was reported to Domotz

getDeviceUptime

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/uptime \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/uptime',
  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('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/uptime',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/uptime', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/uptime',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/uptime", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/{agent_id}/device/{device_id}/uptime

Returns the uptime of the device

Curl

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/uptime \ -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

{
  "agent_uptime": "string",
  "downtime_intervals": [
    {
      "end": "2019-08-24T14:15:22Z",
      "start": "2019-08-24T14:15:22Z"
    }
  ],
  "online_seconds": 0,
  "total_seconds": 0,
  "uptime": "string"
}

Responses

Status Meaning Description Schema
200 OK The uptime of the device DeviceUptime

getAgentStatusHistory

Code samples

curl -X GET {baseURL}/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: '{baseURL}/public-api/v1/agent/{agent_id}/history/network/event',
  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('{baseURL}/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);
});

import requests
headers = {
  'Accept': 'application/json',
  'X-Api-Key': 'API_KEY'
}

r = requests.get('{baseURL}/public-api/v1/agent/{agent_id}/history/network/event', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/history/network/event',
  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", "{baseURL}/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 {baseURL}/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

[
  {
    "timestamp": "2019-08-24T14:15:22Z",
    "type": "CONNECTION_RECOVERED"
  }
]

Responses

Status Meaning Description Schema
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

getSpeedTestHistory

Code samples

curl -X GET {baseURL}/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: '{baseURL}/public-api/v1/agent/{agent_id}/history/network/speed',
  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('{baseURL}/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);
});

import requests
headers = {
  'Accept': 'application/json',
  'X-Api-Key': 'API_KEY'
}

r = requests.get('{baseURL}/public-api/v1/agent/{agent_id}/history/network/speed', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/history/network/speed',
  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", "{baseURL}/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 {baseURL}/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

[
  {
    "timestamp": "2019-08-24T14:15:22Z",
    "values": [
      0
    ]
  }
]

Responses

Status Meaning Description Schema
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

getAgentUptime

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/uptime \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/uptime',
  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('{baseURL}/public-api/v1/agent/{agent_id}/uptime',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/uptime', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/uptime',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/uptime", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/{agent_id}/uptime

Returns the uptime of the agent

Curl

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/uptime \ -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

{
  "agent_id": 0,
  "downtime_intervals": [
    {
      "end": "2019-08-24T14:15:22Z",
      "start": "2019-08-24T14:15:22Z"
    }
  ],
  "online_seconds": 0,
  "total_seconds": 0,
  "uptime": "string"
}

Responses

Status Meaning Description Schema
200 OK The uptime of the agent AgentUptime

Activity Log

getAgentActivityLog

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/activity-log \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/activity-log',
  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('{baseURL}/public-api/v1/agent/{agent_id}/activity-log',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/activity-log', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/activity-log',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/activity-log", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/{agent_id}/activity-log

Retrieves the activity log of an agent

Curl

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/activity-log \ -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
type query string false If present, only the specified type(s) will be fetched.

Enumerated Values

Parameter Value
type note
type agent_alert_level_set
type agent_alert_resume
type rtd_session_start
type cresnet_node_reboot
type device_reboot
type firmware_update_start
type applications_terminate
type configuration_restore
type factory_reset
type network_configuration_change
type custom_driver_execute
type remote_session_start
type remote_session_terminate
type remote_session_limit_reached
type vpn_session_start
type vpn_session_terminate
type chat_started
type chat_resolved
type operator_joined
type operator_left
type power_on
type power_off
type power_cycle
type camera_snapshot
type camera_streaming_start
type configuration_management_status_change

Example responses

200 Response

[
  {
    "description": "string",
    "details": {},
    "device_id": 0,
    "timestamp": "2019-08-24T14:15:22Z",
    "type": "note",
    "user": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK List of activity log entries Inline

Response Schema

Status Code 200

Name Type Required Description
anonymous [ActivityLog] false [An activity log item]
» description string true Description of the event
» details object false Additional details of the event
» device_id integer(int32) false Device that triggered the event (if applicable)
» timestamp string(date-time) true Timestamp of the event
» type string true Type of the event
» user string true User who triggered the event

Enumerated Values

Property Value
type note
type agent_alert_level_set
type agent_alert_resume
type rtd_session_start
type cresnet_node_reboot
type device_reboot
type firmware_update_start
type applications_terminate
type configuration_restore
type factory_reset
type network_configuration_change
type custom_driver_execute
type remote_session_start
type remote_session_terminate
type remote_session_limit_reached
type vpn_session_start
type vpn_session_terminate
type chat_started
type chat_resolved
type operator_joined
type operator_left
type power_on
type power_off
type power_cycle
type camera_snapshot
type camera_streaming_start
type configuration_management_status_change

actions

createAgentVPNConnection

Code samples

curl -X POST {baseURL}/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: '{baseURL}/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",
  "ttl_hours": 1
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'text/plain',
  'X-Api-Key':'API_KEY'

};

fetch('{baseURL}/public-api/v1/agent/{agent_id}/connection/vpn-session',
{
  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',
  'Accept': 'text/plain',
  'X-Api-Key': 'API_KEY'
}

r = requests.post('{baseURL}/public-api/v1/agent/{agent_id}/connection/vpn-session', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'text/plain',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.post '{baseURL}/public-api/v1/agent/{agent_id}/connection/vpn-session',
  params: {
  }, headers: headers

p JSON.parse(result)

package main

import (
       "bytes"
       "net/http"
)

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("POST", "{baseURL}/public-api/v1/agent/{agent_id}/connection/vpn-session", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /agent/{agent_id}/connection/vpn-session

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

{
  "allowed_ip": "string",
  "routing_policy": "global",
  "ttl_hours": 1
}

Curl

curl -X POST {baseURL}/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

Parameter In Type Required Description
agent_id path integer(int32) true Agent ID
body body AgentVPNConnection true none

Example responses

201 Response

Responses

Status Meaning Description Schema
201 Created OpenVPN Configuration file content string

deleteAgentVPNConnection

Code samples

curl -X DELETE {baseURL}/public-api/v1/agent/{agent_id}/connection/vpn-session/{vpn_session_id} \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/connection/vpn-session/{vpn_session_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('{baseURL}/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);
});

import requests
headers = {
  'X-Api-Key': 'API_KEY'
}

r = requests.delete('{baseURL}/public-api/v1/agent/{agent_id}/connection/vpn-session/{vpn_session_id}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.delete '{baseURL}/public-api/v1/agent/{agent_id}/connection/vpn-session/{vpn_session_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", "{baseURL}/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 {baseURL}/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
vpn_session_id path integer(int32) true Session ID

Responses

Status Meaning Description Schema
204 No Content none None

connectToDevice

Code samples

curl -X POST {baseURL}/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: '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/connection',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "allowed_ip": "string",
  "port": 0,
  "protocol": "http",
  "ttl_hours": 1
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

fetch('{baseURL}/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);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'X-Api-Key': 'API_KEY'
}

r = requests.post('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/connection', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.post '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/connection',
  params: {
  }, headers: headers

p JSON.parse(result)

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", "{baseURL}/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

{
  "allowed_ip": "string",
  "port": 0,
  "protocol": "http",
  "ttl_hours": 1
}

Curl

curl -X POST {baseURL}/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 true none

Example responses

201 Response

{
  "allowed_ip": "string",
  "expiration": "2019-08-24T14:15:22Z",
  "id": 0,
  "link": "string",
  "port": 0,
  "protocol": "http"
}

Responses

Status Meaning Description Schema
201 Created none ConnectionSession

device

deleteDownDevices

Code samples

curl -X DELETE {baseURL}/public-api/v1/agent/{agent_id}/device \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device',
  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('{baseURL}/public-api/v1/agent/{agent_id}/device',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/device', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.delete '{baseURL}/public-api/v1/agent/{agent_id}/device',
  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", "{baseURL}/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 {baseURL}/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 none None

listDevices

Code samples

curl -X GET {baseURL}/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'

};

$.ajax({
  url: '{baseURL}/public-api/v1/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('{baseURL}/public-api/v1/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('{baseURL}/public-api/v1/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 '{baseURL}/public-api/v1/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", "{baseURL}/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 {baseURL}/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

[
  {
    "authentication_status": "NO_AUTHENTICATION",
    "details": {
      "firmware_version": "string",
      "room": "string",
      "serial": "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,
    "os": {
      "build": "string",
      "name": "string",
      "version": "string"
    },
    "protocol": "IP",
    "type": {
      "detected_id": 0,
      "id": 0,
      "label": "string"
    },
    "user_data": {
      "model": "string",
      "name": "string",
      "type": 0,
      "vendor": "string"
    }
  }
]

Responses

Status Meaning Description Schema
200 OK The list of all devices in the Agent's monitored networks Inline

Response Schema

Enumerated Values

Property Value
authentication_status NO_AUTHENTICATION
authentication_status AUTHENTICATED
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

listAgentDeviceApplications

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/device/application \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/application',
  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('{baseURL}/public-api/v1/agent/{agent_id}/device/application',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/device/application', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/device/application',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/device/application", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/{agent_id}/device/application

Retrieves the list of applications of all the devices belonging to the agent. The feature is only available on agents under the Enterprise Plan

Curl

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/device/application \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'

Parameters

Parameter In Type Required Description
agent_id path integer(int32) true Agent ID
page_size query integer(int32) false The maximum number of items to return. Min value is 1. Max value is 1000. Default value is 100
page_number query integer(int32) false The requested page number, 0-indexed. Default value is 0
name query string false Allows filtering by name
device_ids query string false Allows filtering by device_ids

Example responses

200 Response

[
  {
    "application_id": "string",
    "device_id": "string",
    "first_time_seen": "2019-08-24T14:15:22Z",
    "info": "string",
    "install_date": "2019-08-24T14:15:22Z",
    "install_location": "string",
    "last_modified": "2019-08-24T14:15:22Z",
    "last_update": "2019-08-24T14:15:22Z",
    "name": "string",
    "publisher": "string",
    "version": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK The list of applications of all the devices belonging to the agent Inline

Response Schema

Status Code 200

Name Type Required Description
anonymous [AgentDeviceApplication] false [The list of applications of all devices belonging to the agent]
» application_id string true none
» device_id string true none
» first_time_seen string(date-time) true none
» info string false none
» install_date string(date-time) false none
» install_location string false none
» last_modified string(date-time) false none
» last_update string(date-time) false none
» name string false none
» publisher string false none
» version string false none

countAgentDeviceApplications

Code samples

curl -X HEAD {baseURL}/public-api/v1/agent/{agent_id}/device/application \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/application',
  method: 'head',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'X-Api-Key':'API_KEY'

};

fetch('{baseURL}/public-api/v1/agent/{agent_id}/device/application',
{
  method: 'HEAD',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'X-Api-Key': 'API_KEY'
}

r = requests.head('{baseURL}/public-api/v1/agent/{agent_id}/device/application', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.head '{baseURL}/public-api/v1/agent/{agent_id}/device/application',
  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("HEAD", "{baseURL}/public-api/v1/agent/{agent_id}/device/application", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

HEAD /agent/{agent_id}/device/application

Counts the applications of all devices belonging to the agent. The feature is only available on agents under the Enterprise Plan

Curl

curl -X HEAD {baseURL}/public-api/v1/agent/{agent_id}/device/application \ -H 'X-Api-Key: API_KEY'

Parameters

Parameter In Type Required Description
agent_id path integer(int32) true Agent ID
name query string false Allows filtering by name
device_ids query string false Allows filtering by device_ids

Responses

Status Meaning Description Schema
204 No Content Returns the application count None

Response Headers

Status Header Type Format Description
204 X-Entities-Count integer int32 Returns the application count

createExternalHost

Code samples

curl -X POST {baseURL}/public-api/v1/agent/{agent_id}/device/external-host \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/external-host',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "host": "string",
  "name": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

fetch('{baseURL}/public-api/v1/agent/{agent_id}/device/external-host',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/device/external-host', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.post '{baseURL}/public-api/v1/agent/{agent_id}/device/external-host',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/device/external-host", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /agent/{agent_id}/device/external-host

Creates an external host

Body parameter

{
  "host": "string",
  "name": "string"
}

Curl

curl -X POST {baseURL}/public-api/v1/agent/{agent_id}/device/external-host \ -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
body body ExternalHost true none

Responses

Status Meaning Description Schema
201 Created none None

deleteDevice

Code samples

curl -X DELETE {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id} \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/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('{baseURL}/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);
});

import requests
headers = {
  'X-Api-Key': 'API_KEY'
}

r = requests.delete('{baseURL}/public-api/v1/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 '{baseURL}/public-api/v1/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", "{baseURL}/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 {baseURL}/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 none None

getDevice

Code samples

curl -X GET {baseURL}/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: '{baseURL}/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'

};

fetch('{baseURL}/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);
});

import requests
headers = {
  'Accept': 'application/json',
  'X-Api-Key': 'API_KEY'
}

r = requests.get('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/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{
        "Accept": []string{"application/json"},
        "X-Api-Key": []string{"API_KEY"},

    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "{baseURL}/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 {baseURL}/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

{
  "authentication_status": "NO_AUTHENTICATION",
  "details": {
    "firmware_version": "string",
    "room": "string",
    "serial": "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,
  "os": {
    "build": "string",
    "name": "string",
    "version": "string"
  },
  "protocol": "IP",
  "type": {
    "detected_id": 0,
    "id": 0,
    "label": "string"
  },
  "user_data": {
    "model": "string",
    "name": "string",
    "type": 0,
    "vendor": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK An object containing the device details Inline

Response Schema

Enumerated Values

Property Value
authentication_status NO_AUTHENTICATION
authentication_status AUTHENTICATED
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

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/action/power \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/action/power',
  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('{baseURL}/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);
});

import requests
headers = {
  'Accept': 'application/json',
  'X-Api-Key': 'API_KEY'
}

r = requests.get('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/action/power', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/action/power',
  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", "{baseURL}/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 {baseURL}/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

{
  "cycle": true,
  "off": true,
  "on": true,
  "software_reboot": true
}

Responses

Status Meaning Description Schema
200 OK Returns a JSON object indicating the current availability of each power action on the device DevicePowerAction

powerActionOnDevice

Code samples

curl -X POST {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field} \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field}',
  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('{baseURL}/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);
});

import requests
headers = {
  'X-Api-Key': 'API_KEY'
}

r = requests.post('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.post '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/action/power/{field}',
  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", "{baseURL}/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 {baseURL}/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 none None

listDeviceApplications

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/application \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/application',
  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('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/application',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/application', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/application',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/application", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/{agent_id}/device/{device_id}/application

Retrieves the list of applications of the device. The feature is only available on agents under the Enterprise Plan

Curl

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/application \ -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
page_size query integer(int32) false The maximum number of items to return. Min value is 1. Max value is 1000. Default value is 100
page_number query integer(int32) false The requested page number, 0-indexed. Default value is 0
name query string false Allows filtering by name
device_ids query string false Allows filtering by device_ids

Example responses

200 Response

[
  {
    "application_id": "string",
    "first_time_seen": "2019-08-24T14:15:22Z",
    "info": "string",
    "install_date": "2019-08-24T14:15:22Z",
    "install_location": "string",
    "last_modified": "2019-08-24T14:15:22Z",
    "last_update": "2019-08-24T14:15:22Z",
    "name": "string",
    "publisher": "string",
    "version": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK The list of applications of the device Inline

Response Schema

Status Code 200

Name Type Required Description
anonymous [DeviceApplication] false [The list of applications of a device]
» application_id string true none
» first_time_seen string(date-time) true none
» info string false none
» install_date string(date-time) false none
» install_location string false none
» last_modified string(date-time) false none
» last_update string(date-time) false none
» name string false none
» publisher string false none
» version string false none

countDeviceApplications

Code samples

curl -X HEAD {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/application \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/application',
  method: 'head',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'X-Api-Key':'API_KEY'

};

fetch('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/application',
{
  method: 'HEAD',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'X-Api-Key': 'API_KEY'
}

r = requests.head('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/application', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.head '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/application',
  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("HEAD", "{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/application", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

HEAD /agent/{agent_id}/device/{device_id}/application

Counts the applications. The feature is only available on agents under the Enterprise Plan

Curl

curl -X HEAD {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/application \ -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
name query string false Allows filtering by name
device_ids query string false Allows filtering by device_ids

Responses

Status Meaning Description Schema
204 No Content Returns the application count None

Response Headers

Status Header Type Format Description
204 X-Entities-Count integer int32 Returns the application count

setCredentials

Code samples

curl -X PUT {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/credentials \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/credentials',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "password": "string",
  "scope": "DEVICE_MANAGEMENT",
  "username": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

fetch('{baseURL}/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);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'X-Api-Key': 'API_KEY'
}

r = requests.put('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/credentials', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.put '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/credentials',
  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("PUT", "{baseURL}/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

{
  "password": "string",
  "scope": "DEVICE_MANAGEMENT",
  "username": "string"
}

Curl

curl -X PUT {baseURL}/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 true device credentials payload

Responses

Status Meaning Description Schema
204 No Content none None

getSNMPAuthentication

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication',
  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('{baseURL}/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);
});

import requests
headers = {
  'Accept': 'application/json',
  'X-Api-Key': 'API_KEY'
}

r = requests.get('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication',
  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", "{baseURL}/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 {baseURL}/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

{
  "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 The SNMP authentication info for the device SNMPDomotzAuthentication

setSNMPAuthentication

Code samples

curl -X PUT {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

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('{baseURL}/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);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'X-Api-Key': 'API_KEY'
}

r = requests.put('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.put '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-authentication',
  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("PUT", "{baseURL}/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.

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 PUT {baseURL}/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 true none

Responses

Status Meaning Description Schema
204 No Content none None

setSnmpCommunity

Code samples

curl -X PUT {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "read": "string",
  "write": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

fetch('{baseURL}/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);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'X-Api-Key': 'API_KEY'
}

r = requests.put('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.put '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/snmp-community',
  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("PUT", "{baseURL}/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

{
  "read": "string",
  "write": "string"
}

Curl

curl -X PUT {baseURL}/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 true The value that the snmp community entries will change to

Responses

Status Meaning Description Schema
204 No Content none None

hideDevice

Code samples

curl -X DELETE {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/visibility \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/visibility',
  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('{baseURL}/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);
});

import requests
headers = {
  'X-Api-Key': 'API_KEY'
}

r = requests.delete('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/visibility', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.delete '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/visibility',
  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", "{baseURL}/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 {baseURL}/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 none None

editDevice

Code samples

curl -X PUT {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/{field} \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/{field}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = 'string';
const headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

fetch('{baseURL}/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);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'X-Api-Key': 'API_KEY'
}

r = requests.put('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/{field}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.put '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/{field}',
  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("PUT", "{baseURL}/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

"string"

Curl

curl -X PUT {baseURL}/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 here
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
field details/serial

Responses

Status Meaning Description Schema
204 No Content none None

SNMP/TCP SENSORS

listAgentEyesSNMP

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/device/eye/snmp \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/eye/snmp',
  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('{baseURL}/public-api/v1/agent/{agent_id}/device/eye/snmp',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/device/eye/snmp', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/device/eye/snmp',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/device/eye/snmp", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/{agent_id}/device/eye/snmp

Retrieves the list of configured SNMP Domotz Sensors on the agent

Curl

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/device/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

Example responses

200 Response

[
  {
    "category": "OTHER",
    "device_id": 0,
    "id": 0,
    "name": "string",
    "oid": "string",
    "value_type": "STRING"
  }
]

Responses

Status Meaning Description Schema
200 OK The list of configured SNMP Domotz Sensors on the agent Inline

Response Schema

Status Code 200

Name Type Required Description
anonymous [SNMPDomotzAgentEye] false [Information about a configured SNMP Domotz Sensor]
» category string true The category of the OID
» device_id integer(int32) false The unique identifier of the device
» id integer(int32) true The ID of the SNMP Domotz Sensor
» name string true The name of the Domotz Sensors
» 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
value_type ENUM

listAgentEyesTCP

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/device/eye/tcp \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/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('{baseURL}/public-api/v1/agent/{agent_id}/device/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('{baseURL}/public-api/v1/agent/{agent_id}/device/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 '{baseURL}/public-api/v1/agent/{agent_id}/device/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", "{baseURL}/public-api/v1/agent/{agent_id}/device/eye/tcp", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/{agent_id}/device/eye/tcp

Retrieves the list of configured TCP Domotz Sensors on the agent

Curl

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/device/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

Example responses

200 Response

[
  {
    "device_id": 0,
    "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 Sensors on the agent and their latest values Inline

Response Schema

Status Code 200

Name Type Required Description
anonymous [TCPDomotzEye] false [Information about a configured TCP Domotz Sensor]
» device_id integer(int32) false The unique identifier of the device
» id integer(int32) true The ID of the TCP Domotz Sensor
» 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

listEyesSNMP

Code samples

curl -X GET {baseURL}/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: '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp',
  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('{baseURL}/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);
});

import requests
headers = {
  'Accept': 'application/json',
  'X-Api-Key': 'API_KEY'
}

r = requests.get('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp',
  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", "{baseURL}/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 Sensors

Curl

curl -X GET {baseURL}/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

[
  {
    "category": "OTHER",
    "device_id": 0,
    "id": 0,
    "last_update": "2019-08-24T14:15:22Z",
    "latest_enum_value": "string",
    "latest_value": "string",
    "name": "string",
    "oid": "string",
    "value_type": "STRING"
  }
]

Responses

Status Meaning Description Schema
200 OK The list of configured SNMP Domotz Sensors for the device and their latest values Inline

Response Schema

Status Code 200

Name Type Required Description
anonymous [SNMPDomotzEye] false [Information about a configured SNMP Domotz Sensor]
» category string true The category of the OID
» device_id integer(int32) false The unique identifier of the device
» id integer(int32) true The ID of the SNMP Domotz Sensor
» last_update string(date-time) true The timestamp of the latest update
» latest_enum_value string false The enum value retrieved on the OID
» latest_value string true The value retrieved on the OID
» name string true The name of the Domotz Sensors
» 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
value_type ENUM

createEyeSNMP

Code samples

curl -X POST {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

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('{baseURL}/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);
});

import requests
headers = {
  'Content-Type': 'application/json',
  'X-Api-Key': 'API_KEY'
}

r = requests.post('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.post '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp',
  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", "{baseURL}/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 Sensors

Body parameter

{
  "category": "OTHER",
  "name": "string",
  "oid": "string",
  "value_type": "STRING"
}

Curl

curl -X POST {baseURL}/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

Status Meaning Description Schema
201 Created none None

deleteEyeSNMP

Code samples

curl -X DELETE {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id} \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/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));
  }
})

const fetch = require('node-fetch');

const headers = {
  'X-Api-Key':'API_KEY'

};

fetch('{baseURL}/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);
});

import requests
headers = {
  'X-Api-Key': 'API_KEY'
}

r = requests.delete('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.delete '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_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", "{baseURL}/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 Sensor

Curl

curl -X DELETE {baseURL}/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 Sensor ID

Responses

Status Meaning Description Schema
204 No Content none None

listEyesSNMPTriggerFunction

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/function \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/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));
  }
})

const fetch = require('node-fetch');

const headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

fetch('{baseURL}/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);
});

import requests
headers = {
  'Accept': 'application/json',
  'X-Api-Key': 'API_KEY'
}

r = requests.get('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/function', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/function',
  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", "{baseURL}/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 Sensors

Curl

curl -X GET {baseURL}/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 Sensor ID

Example responses

200 Response

[
  {
    "cardinality": 0,
    "id": 0,
    "name": "string",
    "value_types": "STRING"
  }
]

Responses

Status Meaning Description Schema
200 OK The list of functions that can be used by the trigger Inline

Response Schema

Status Code 200

Name Type Required Description
anonymous [SNMPDomotzEyeTriggerFunction] 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
value_types ENUM

getEyesSNMPHistory

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/history \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/history',
  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('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/history',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/history', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/history',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/history", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/{agent_id}/device/{device_id}/eye/snmp/{sensor_id}/history

Returns the time series of the SNMP Domotz Sensors collected samples

Curl

curl -X GET {baseURL}/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 Sensor 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

[
  {
    "enum_value": "string",
    "timestamp": "2019-08-24T14:15:22Z",
    "value": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK The list of SNMP Domotz Sensors samples Inline

Response Schema

Status Code 200

Name Type Required Description
anonymous [DeviceEyeSNMPHistorySample] false none
» enum_value string false none
» timestamp string(date-time) true The time the sample was reported to Domotz
» value string true none

listEyesSNMPTrigger

Code samples

curl -X GET {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/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}/trigger

Retrieves the list of triggers for the SNMP Sensor

Curl

curl -X GET {baseURL}/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 Sensor 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 {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/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}/trigger

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

{
  "function_id": 0,
  "name": "string",
  "operands": [
    "string"
  ]
}

Curl

curl -X POST {baseURL}/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 Sensor ID
body body SNMPDomotzSnmpTriggerCreation true none

Responses

Status Meaning Description Schema
201 Created none None

deleteEyeSNMPTrigger

Code samples

curl -X DELETE {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/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 {baseURL}/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 Sensor ID
trigger_id path integer(int32) true SNMP Sensor Trigger ID

Responses

Status Meaning Description Schema
204 No Content none None

deleteEyeSNMPTriggerAlert

Code samples

curl -X DELETE {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/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 {baseURL}/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 Sensor ID
trigger_id path integer(int32) true SNMP Sensor 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 {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/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 {baseURL}/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 Sensor ID
trigger_id path integer(int32) true SNMP Sensor 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 {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/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/tcp

Retrieves the list of configured TCP Domotz Sensors

Curl

curl -X GET {baseURL}/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

[
  {
    "device_id": 0,
    "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 Sensors 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 Sensor]
» device_id integer(int32) false The unique identifier of the device
» id integer(int32) true The ID of the TCP Domotz Sensor
» 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 {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/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/tcp

Creates a new TCP Domotz Sensors

Body parameter

{
  "port": 0
}

Curl

curl -X POST {baseURL}/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 {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/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 Sensor

Curl

curl -X DELETE {baseURL}/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 Sensor ID

Responses

Status Meaning Description Schema
204 No Content none None

eyesUsageInfo

Code samples

curl -X GET {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/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-statistics

Retrieves information about Domotz Sensors usage and limits

Curl

curl -X GET {baseURL}/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 Sensors usage and limits DomotzEyesUsageInformation

MetricUsageInfo

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/metric-statistics \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/metric-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('{baseURL}/public-api/v1/agent/{agent_id}/metric-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('{baseURL}/public-api/v1/agent/{agent_id}/metric-statistics', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/metric-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", "{baseURL}/public-api/v1/agent/{agent_id}/metric-statistics", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/{agent_id}/metric-statistics

Returns Domotz Sensors usage and limits

Curl

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/metric-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": {
    "custom_driver": 0,
    "snmp": 0,
    "tcp": 0,
    "total": 0
  }
}

Responses

Status Meaning Description Schema
200 OK Current Domotz Sensors usage and limits DomotzMetricUsageInformation

variables

listAgentDeviceVariables

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/device/variable \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/variable',
  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('{baseURL}/public-api/v1/agent/{agent_id}/device/variable',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/device/variable', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/device/variable',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/device/variable", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/{agent_id}/device/variable

Retrieves the list of all device variables of the agent

Curl

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/device/variable \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'

Parameters

Parameter In Type Required Description
agent_id path integer(int32) true Agent ID
page_size query integer(int32) false The maximum number of items to return. Min value is 1. Max value is 1000. Default value is 100
page_number query integer(int32) false The requested page number, 0-indexed. Default value is 0
value query string false Allows filtering by value
path query string false Allows filtering by path
sort_by query string false Allows ordering by path, id, value, label, value_update_time, creation_time, device_id
sorting_direction query string false The default is asc
has_history query boolean false Allows filtering by has_history field
metric query string false Allows filtering by metric

Enumerated Values

Parameter Value
sort_by path
sort_by id
sort_by value
sort_by label
sort_by value_update_time
sort_by creation_time
sort_by device_id
sorting_direction asc
sorting_direction desc

Example responses

200 Response

[
  {
    "creation_time": "2019-08-24T14:15:22Z",
    "device_id": 0,
    "has_history": true,
    "id": 0,
    "label": "string",
    "metric": "string",
    "path": "string",
    "previous_value": "string",
    "unit": "string",
    "value": "string",
    "value_update_time": "2019-08-24T14:15:22Z"
  }
]

Responses

Status Meaning Description Schema
200 OK The list of all device variables of an agent Inline

Response Schema

Status Code 200

Name Type Required Description
anonymous [AgentDeviceVariable] false [The representation of a device variable]
» creation_time string(date-time) false The creation time of the variable
» device_id integer(int32) true The ID of the device
» has_history boolean true If true the history of the variable can be retrieved with getVariableHistory
» id integer(int32) true The ID of the variable
» label string false The label
» metric string false The metric
» path string true The variable path
» previous_value string false The previous value of the variable
» unit string false The unit of measurement
» value string false The variable value
» value_update_time string(date-time) false The update time of the variable value

countAgentDeviceVariables

Code samples

curl -X HEAD {baseURL}/public-api/v1/agent/{agent_id}/device/variable \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/variable',
  method: 'head',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'X-Api-Key':'API_KEY'

};

fetch('{baseURL}/public-api/v1/agent/{agent_id}/device/variable',
{
  method: 'HEAD',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'X-Api-Key': 'API_KEY'
}

r = requests.head('{baseURL}/public-api/v1/agent/{agent_id}/device/variable', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.head '{baseURL}/public-api/v1/agent/{agent_id}/device/variable',
  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("HEAD", "{baseURL}/public-api/v1/agent/{agent_id}/device/variable", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

HEAD /agent/{agent_id}/device/variable

Returns the device variables count of the agent

Curl

curl -X HEAD {baseURL}/public-api/v1/agent/{agent_id}/device/variable \ -H 'X-Api-Key: API_KEY'

Parameters

Parameter In Type Required Description
agent_id path integer(int32) true Agent ID
value query string false Allows filtering by value
path query string false Allows filtering by path
has_history query boolean false Allows filtering by has_history field
metric query string false Allows filtering by metric

Responses

Status Meaning Description Schema
204 No Content The device variables count None

Response Headers

Status Header Type Format Description
204 X-Entities-Count integer int32 The device variables count

listDeviceVariables

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/variable \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/variable',
  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('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/variable',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/variable', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/variable',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/variable", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/{agent_id}/device/{device_id}/variable

Retrieves the list of device variables

Curl

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/variable \ -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
page_size query integer(int32) false The maximum number of items to return. Min value is 1. Max value is 1000. Default value is 100
page_number query integer(int32) false The requested page number, 0-indexed. Default value is 0
value query string false Allows filtering by value
path query string false Allows filtering by path
sort_by query string false Allows ordering by path, id, value, label, value_update_time, creation_time
sorting_direction query string false The default is asc
has_history query boolean false Allows filtering by has_history field
metric query string false Allows filtering by metric

Enumerated Values

Parameter Value
sort_by path
sort_by id
sort_by value
sort_by label
sort_by value_update_time
sort_by creation_time
sorting_direction asc
sorting_direction desc

Example responses

200 Response

[
  {
    "creation_time": "2019-08-24T14:15:22Z",
    "has_history": true,
    "id": 0,
    "label": "string",
    "metric": "string",
    "path": "string",
    "previous_value": "string",
    "unit": "string",
    "value": "string",
    "value_update_time": "2019-08-24T14:15:22Z"
  }
]

Responses

Status Meaning Description Schema
200 OK The list of device variables Inline

Response Schema

Status Code 200

Name Type Required Description
anonymous [DeviceVariable] false [The representation of a device variable]
» creation_time string(date-time) false The creation time of the variable
» has_history boolean true If true the history of the variable can be retrieved with getVariableHistory
» id integer(int32) true The ID of the variable
» label string false The label
» metric string false The metric
» path string true The variable path
» previous_value string false The previous value of the variable
» unit string false The unit of measurement
» value string false The variable value
» value_update_time string(date-time) false The update time of the variable value

countDeviceVariables

Code samples

curl -X HEAD {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/variable \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/variable',
  method: 'head',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'X-Api-Key':'API_KEY'

};

fetch('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/variable',
{
  method: 'HEAD',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'X-Api-Key': 'API_KEY'
}

r = requests.head('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/variable', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.head '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/variable',
  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("HEAD", "{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/variable", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

HEAD /agent/{agent_id}/device/{device_id}/variable

Returns device variables count

Curl

curl -X HEAD {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/variable \ -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
value query string false Allows filtering by value
path query string false Allows filtering by path
has_history query boolean false Allows filtering by has_history field
metric query string false Allows filtering by metric

Responses

Status Meaning Description Schema
204 No Content The device variables count None

Response Headers

Status Header Type Format Description
204 X-Entities-Count integer int32 The device variables count

getVariableHistory

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/variable/{variable_id}/history \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/variable/{variable_id}/history',
  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('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/variable/{variable_id}/history',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/variable/{variable_id}/history', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/variable/{variable_id}/history',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/variable/{variable_id}/history", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/{agent_id}/device/{device_id}/variable/{variable_id}/history

Returns the variable history

Curl

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/variable/{variable_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
variable_id path integer(int32) true Variable 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

[
  {
    "timestamp": "2019-08-24T14:15:22Z",
    "value": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK The variable's history, a list of dictionaries, each composed by the timestamp (a datetime) and the value (a string) Inline

Response Schema

Status Code 200

Name Type Required Description
anonymous [VariableHistorySample] false none
» timestamp string(date-time) true The time the sample was reported to Domotz
» value string true The sample value

listAgentVariables

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/variable \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/variable',
  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('{baseURL}/public-api/v1/agent/{agent_id}/variable',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/variable', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/variable',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/variable", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/{agent_id}/variable

Retrieves the list of all agent variables of the agent

Curl

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/variable \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'

Parameters

Parameter In Type Required Description
agent_id path integer(int32) true Agent ID
page_size query integer(int32) false The maximum number of items to return. Min value is 1. Max value is 1000. Default value is 100
page_number query integer(int32) false The requested page number, 0-indexed. Default value is 0
value query string false Allows filtering by value
path query string false Allows filtering by path
sort_by query string false Allows ordering by path, id, value, label, value_update_time, creation_time
sorting_direction query string false The default is asc
has_history query boolean false Allows filtering by has_history field
metric query string false Allows filtering by metric

Enumerated Values

Parameter Value
sort_by path
sort_by id
sort_by value
sort_by label
sort_by value_update_time
sort_by creation_time
sorting_direction asc
sorting_direction desc

Example responses

200 Response

[
  {
    "creation_time": "2019-08-24T14:15:22Z",
    "has_history": true,
    "id": 0,
    "label": "string",
    "metric": "string",
    "path": "string",
    "previous_value": "string",
    "unit": "string",
    "value": "string",
    "value_update_time": "2019-08-24T14:15:22Z"
  }
]

Responses

Status Meaning Description Schema
200 OK The list of all agent variables of the agent Inline

Response Schema

Status Code 200

Name Type Required Description
anonymous [AgentVariable] false [The representation of an agent variable]
» creation_time string(date-time) false The creation time of the variable
» has_history boolean true If true the history of the variable can be retrieved with getVariableHistory
» id integer(int32) true The ID of the variable
» label string false The label
» metric string false The metric
» path string true The variable path
» previous_value string false The previous value of the variable
» unit string false The unit of measurement
» value string false The variable value
» value_update_time string(date-time) false The update time of the variable value

countAgentVariables

Code samples

curl -X HEAD {baseURL}/public-api/v1/agent/{agent_id}/variable \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/variable',
  method: 'head',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');

const headers = {
  'X-Api-Key':'API_KEY'

};

fetch('{baseURL}/public-api/v1/agent/{agent_id}/variable',
{
  method: 'HEAD',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

import requests
headers = {
  'X-Api-Key': 'API_KEY'
}

r = requests.head('{baseURL}/public-api/v1/agent/{agent_id}/variable', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.head '{baseURL}/public-api/v1/agent/{agent_id}/variable',
  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("HEAD", "{baseURL}/public-api/v1/agent/{agent_id}/variable", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

HEAD /agent/{agent_id}/variable

Returns the agent variables count of the agent

Curl

curl -X HEAD {baseURL}/public-api/v1/agent/{agent_id}/variable \ -H 'X-Api-Key: API_KEY'

Parameters

Parameter In Type Required Description
agent_id path integer(int32) true Agent ID
value query string false Allows filtering by value
path query string false Allows filtering by path
has_history query boolean false Allows filtering by has_history field
metric query string false Allows filtering by metric

Responses

Status Meaning Description Schema
204 No Content The agent variables count None

Response Headers

Status Header Type Format Description
204 X-Entities-Count integer int32 The agent variables count

getAgentVariableHistory

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/variable/{variable_id}/history \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/variable/{variable_id}/history',
  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('{baseURL}/public-api/v1/agent/{agent_id}/variable/{variable_id}/history',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/variable/{variable_id}/history', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/variable/{variable_id}/history',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/variable/{variable_id}/history", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/{agent_id}/variable/{variable_id}/history

Returns the agent variable history

Curl

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/variable/{variable_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
variable_id path integer(int32) true Variable 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

[
  {
    "timestamp": "2019-08-24T14:15:22Z",
    "value": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK The agent variable's history, a list of dictionaries, each composed by the timestamp (a datetime) and the value (a string) Inline

Response Schema

Status Code 200

Name Type Required Description
anonymous [VariableHistorySample] false none
» timestamp string(date-time) true The time the sample was reported to Domotz
» value string true The sample value

inventory

getDeviceInventory

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/inventory \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/inventory',
  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('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/inventory',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/inventory', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/inventory',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/inventory", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/{agent_id}/device/{device_id}/inventory

Returns the device's inventory data

Curl

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/inventory \ -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

[
  {
    "creation_time": "2019-08-24T14:15:22Z",
    "key": "string",
    "value": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK The device's inventory, with the fields sorted alphabetically. Not set fields will be null Inline

Response Schema

Status Code 200

Name Type Required Description
anonymous [DeviceInventoryField] false [A device inventory field]
» creation_time string(date-time) false none
» key string true The name of the field, unique in the Inventory
» value string true none

deleteDeviceInventoryField

Code samples

curl -X DELETE {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/inventory/{inventory_field} \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/inventory/{inventory_field}',
  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('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/inventory/{inventory_field}',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/inventory/{inventory_field}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.delete '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/inventory/{inventory_field}',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/inventory/{inventory_field}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /agent/{agent_id}/device/{device_id}/inventory/{inventory_field}

Deletes the Inventory field for the device

Curl

curl -X DELETE {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/inventory/{inventory_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
inventory_field path string true Field identifier, unique within the Inventory

Responses

Status Meaning Description Schema
204 No Content none None

setDeviceInventoryFieldValue

Code samples

curl -X PUT {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/inventory/{inventory_field} \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/inventory/{inventory_field}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = 'string';
const headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

fetch('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/inventory/{inventory_field}',
{
  method: 'PUT',
  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.put('{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/inventory/{inventory_field}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.put '{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/inventory/{inventory_field}',
  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("PUT", "{baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/inventory/{inventory_field}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /agent/{agent_id}/device/{device_id}/inventory/{inventory_field}

Sets the value of an Inventory field for the device, a value can't be set to null

Body parameter

"string"

Curl

curl -X PUT {baseURL}/public-api/v1/agent/{agent_id}/device/{device_id}/inventory/{inventory_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
inventory_field path string true Field identifier, unique within the Inventory
body body string true none

Responses

Status Meaning Description Schema
204 No Content none None

deleteInventory

Code samples

curl -X DELETE {baseURL}/public-api/v1/inventory \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/inventory',
  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('{baseURL}/public-api/v1/inventory',
{
  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('{baseURL}/public-api/v1/inventory', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.delete '{baseURL}/public-api/v1/inventory',
  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", "{baseURL}/public-api/v1/inventory", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /inventory

Clears the inventory

Responses

Status Meaning Description Schema
204 No Content none None

getInventory

Code samples

curl -X GET {baseURL}/public-api/v1/inventory \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/inventory',
  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('{baseURL}/public-api/v1/inventory',
{
  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('{baseURL}/public-api/v1/inventory', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/inventory',
  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", "{baseURL}/public-api/v1/inventory", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /inventory

Enumerates all the Inventory fields

Example responses

200 Response

[
  {
    "label": "string",
    "creation_time": "2019-08-24T14:15:22Z",
    "defined_by_user": 0,
    "key": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK The inventory fields, sorted by creation time Inline

Response Schema

Status Code 200

Name Type Required Description
anonymous [allOf] false none

allOf

Name Type Required Description
» anonymous WriteInventoryField false DTO Used for creating/updating Inventory fields
»» label string true A detailed description of the field, for documentation

and

Name Type Required Description
» anonymous object false DTO Returned by the API describing an Inventory Field
»» creation_time string(date-time) false none
»» defined_by_user integer(int32) false The id of the user that defined the inventory field - if different from your id, this field can't be deleted or changed
»» key string true The name of the field, unique in the Inventory

deleteInventoryField

Code samples

curl -X DELETE {baseURL}/public-api/v1/inventory/{inventory_field} \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/inventory/{inventory_field}',
  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('{baseURL}/public-api/v1/inventory/{inventory_field}',
{
  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('{baseURL}/public-api/v1/inventory/{inventory_field}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.delete '{baseURL}/public-api/v1/inventory/{inventory_field}',
  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", "{baseURL}/public-api/v1/inventory/{inventory_field}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /inventory/{inventory_field}

Deletes the Inventory Field

Curl

curl -X DELETE {baseURL}/public-api/v1/inventory/{inventory_field} \ -H 'X-Api-Key: API_KEY'

Parameters

Parameter In Type Required Description
inventory_field path string true Field identifier, unique within the Inventory

Responses

Status Meaning Description Schema
204 No Content none None

createInventoryField

Code samples

curl -X POST {baseURL}/public-api/v1/inventory/{inventory_field} \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/inventory/{inventory_field}',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "label": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

fetch('{baseURL}/public-api/v1/inventory/{inventory_field}',
{
  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('{baseURL}/public-api/v1/inventory/{inventory_field}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.post '{baseURL}/public-api/v1/inventory/{inventory_field}',
  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", "{baseURL}/public-api/v1/inventory/{inventory_field}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /inventory/{inventory_field}

Creates a new Inventory Field - the user will be able to set key-values pairs on every device

Body parameter

{
  "label": "string"
}

Curl

curl -X POST {baseURL}/public-api/v1/inventory/{inventory_field} \ -H 'Content-Type: application/json' \ -H 'X-Api-Key: API_KEY'

Parameters

Parameter In Type Required Description
inventory_field path string true Field identifier, unique within the Inventory
body body WriteInventoryField true none

Responses

Status Meaning Description Schema
201 Created The inventory field will be referenced to with its name None

updateInventoryField

Code samples

curl -X PUT {baseURL}/public-api/v1/inventory/{inventory_field} \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/inventory/{inventory_field}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "label": "string"
}';
const headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

fetch('{baseURL}/public-api/v1/inventory/{inventory_field}',
{
  method: 'PUT',
  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.put('{baseURL}/public-api/v1/inventory/{inventory_field}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.put '{baseURL}/public-api/v1/inventory/{inventory_field}',
  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("PUT", "{baseURL}/public-api/v1/inventory/{inventory_field}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /inventory/{inventory_field}

Updates the Inventory Field

Body parameter

{
  "label": "string"
}

Curl

curl -X PUT {baseURL}/public-api/v1/inventory/{inventory_field} \ -H 'Content-Type: application/json' \ -H 'X-Api-Key: API_KEY'

Parameters

Parameter In Type Required Description
inventory_field path string true Field identifier, unique within the Inventory
body body WriteInventoryField true none

Responses

Status Meaning Description Schema
204 No Content none None

multimedia

onvifSnapshot

Code samples

curl -X GET {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/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/snapshot

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 endpoint

Curl

curl -X GET {baseURL}/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

networking

getAgentIPConflicts

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/ip-conflict \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/ip-conflict',
  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('{baseURL}/public-api/v1/agent/{agent_id}/ip-conflict',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/ip-conflict', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/ip-conflict',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/ip-conflict", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/{agent_id}/ip-conflict

Returns the list of active IP conflicts on an agent

Curl

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/ip-conflict \ -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

[
  {
    "conflicting_devices": [
      {
        "id": 0,
        "mac": "string"
      }
    ],
    "ip": "string"
  }
]

Responses

Status Meaning Description Schema
200 OK none Inline

Response Schema

Status Code 200

Name Type Required Description
anonymous [AgentIpConflict] false none
» conflicting_devices [object] false none
»» id integer(int32) false none
»» mac string false none
» ip string false none

setDHCPDeviceDiscovery

Code samples

curl -X PUT {baseURL}/public-api/v1/agent/{agent_id}/network/dhcp-device-discovery \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/network/dhcp-device-discovery',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "dhcp_device_discovery": true
}';
const headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

fetch('{baseURL}/public-api/v1/agent/{agent_id}/network/dhcp-device-discovery',
{
  method: 'PUT',
  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.put('{baseURL}/public-api/v1/agent/{agent_id}/network/dhcp-device-discovery', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.put '{baseURL}/public-api/v1/agent/{agent_id}/network/dhcp-device-discovery',
  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("PUT", "{baseURL}/public-api/v1/agent/{agent_id}/network/dhcp-device-discovery", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /agent/{agent_id}/network/dhcp-device-discovery

Enable/disable the Agent DHCP Device Discovery

Body parameter

{
  "dhcp_device_discovery": true
}

Curl

curl -X PUT {baseURL}/public-api/v1/agent/{agent_id}/network/dhcp-device-discovery \ -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
body body DHCPDeviceDiscoverySetting true Enable/disable the DHCP Device Discovery on the agent

Responses

Status Meaning Description Schema
204 No Content none None

deleteAgentExternalHostScanPolicy

Code samples

curl -X DELETE {baseURL}/public-api/v1/agent/{agent_id}/network/external-host-scan-policy \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/network/external-host-scan-policy',
  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('{baseURL}/public-api/v1/agent/{agent_id}/network/external-host-scan-policy',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/network/external-host-scan-policy', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.delete '{baseURL}/public-api/v1/agent/{agent_id}/network/external-host-scan-policy',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/network/external-host-scan-policy", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /agent/{agent_id}/network/external-host-scan-policy

Restore the external host scan policy to default.

Curl

curl -X DELETE {baseURL}/public-api/v1/agent/{agent_id}/network/external-host-scan-policy \ -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 none None

getAgentExternalHostScanPolicy

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/network/external-host-scan-policy \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/network/external-host-scan-policy',
  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('{baseURL}/public-api/v1/agent/{agent_id}/network/external-host-scan-policy',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/network/external-host-scan-policy', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/network/external-host-scan-policy',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/network/external-host-scan-policy", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/{agent_id}/network/external-host-scan-policy

Returns the current external host scan policy.

Curl

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/network/external-host-scan-policy \ -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

{
  "icmp": {
    "enabled": true
  },
  "tcp_ack": {
    "enabled": true,
    "ports": [
      0
    ]
  },
  "tcp_syn": {
    "enabled": true,
    "ports": [
      0
    ]
  }
}

Responses

Status Meaning Description Schema
200 OK The external host scan policy. AgentExternalHostScanPolicy

setAgentExternalHostScanPolicy

Code samples

curl -X PUT {baseURL}/public-api/v1/agent/{agent_id}/network/external-host-scan-policy \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/network/external-host-scan-policy',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "icmp": {
    "enabled": true
  },
  "tcp_ack": {
    "enabled": true,
    "ports": [
      0
    ]
  },
  "tcp_syn": {
    "enabled": true,
    "ports": [
      0
    ]
  }
}';
const headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

fetch('{baseURL}/public-api/v1/agent/{agent_id}/network/external-host-scan-policy',
{
  method: 'PUT',
  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.put('{baseURL}/public-api/v1/agent/{agent_id}/network/external-host-scan-policy', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.put '{baseURL}/public-api/v1/agent/{agent_id}/network/external-host-scan-policy',
  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("PUT", "{baseURL}/public-api/v1/agent/{agent_id}/network/external-host-scan-policy", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /agent/{agent_id}/network/external-host-scan-policy

Updates the current external host scan policy. It is possible to enable/disable each one of the three available methods (ICMP, TCP-SYN, TCP-ACK). For TCP-SYN and TCP-ACK is mandatory to specify a set of TCP ports. If a method is not specified in the payload of the request, it will be configured as disabled

Body parameter

{
  "icmp": {
    "enabled": true
  },
  "tcp_ack": {
    "enabled": true,
    "ports": [
      0
    ]
  },
  "tcp_syn": {
    "enabled": true,
    "ports": [
      0
    ]
  }
}

Curl

curl -X PUT {baseURL}/public-api/v1/agent/{agent_id}/network/external-host-scan-policy \ -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
body body AgentExternalHostScanPolicy true The external host scan policy to be applied

Responses

Status Meaning Description Schema
204 No Content none None

getAgentInterfaces

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/network/interfaces \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/network/interfaces',
  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('{baseURL}/public-api/v1/agent/{agent_id}/network/interfaces',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/network/interfaces', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/network/interfaces',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/network/interfaces", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/{agent_id}/network/interfaces

Returns the networks monitored by the agent

Curl

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/network/interfaces \ -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

{
  "attached": [
    {
      "address": "string",
      "mac_address": "string",
      "name": "string",
      "netmask": 0
    }
  ],
  "routed": [
    {
      "address": "string",
      "name": "string",
      "netmask": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The networks monitored by the agent AllAgentInterfaces

deleteAgentInterfacesPolicy

Code samples

curl -X DELETE {baseURL}/public-api/v1/agent/{agent_id}/network/interfaces-policy \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/network/interfaces-policy',
  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('{baseURL}/public-api/v1/agent/{agent_id}/network/interfaces-policy',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/network/interfaces-policy', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.delete '{baseURL}/public-api/v1/agent/{agent_id}/network/interfaces-policy',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/network/interfaces-policy", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /agent/{agent_id}/network/interfaces-policy

Resets the network interface filtering policy to the default value

Curl

curl -X DELETE {baseURL}/public-api/v1/agent/{agent_id}/network/interfaces-policy \ -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 none None

getAgentInterfacesPolicy

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/network/interfaces-policy \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/network/interfaces-policy',
  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('{baseURL}/public-api/v1/agent/{agent_id}/network/interfaces-policy',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/network/interfaces-policy', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/network/interfaces-policy',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/network/interfaces-policy", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/{agent_id}/network/interfaces-policy

Returns the current network interface filtering policy. The interfaces policy defines the set of interfaces which will be ignored (deny) or scanned (allow) by the agent. The default behavior is to scan all available interfaces

Curl

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/network/interfaces-policy \ -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

{
  "policy": "allow",
  "rules": [
    "string"
  ]
}

Responses

Status Meaning Description Schema
200 OK The current network interface filtering policy AgentInterfacesPolicy

setAgentInterfacesPolicy

Code samples

curl -X PUT {baseURL}/public-api/v1/agent/{agent_id}/network/interfaces-policy \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/network/interfaces-policy',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "policy": "allow",
  "rules": [
    "string"
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

fetch('{baseURL}/public-api/v1/agent/{agent_id}/network/interfaces-policy',
{
  method: 'PUT',
  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.put('{baseURL}/public-api/v1/agent/{agent_id}/network/interfaces-policy', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.put '{baseURL}/public-api/v1/agent/{agent_id}/network/interfaces-policy',
  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("PUT", "{baseURL}/public-api/v1/agent/{agent_id}/network/interfaces-policy", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /agent/{agent_id}/network/interfaces-policy

Updates the current network interface filtering policy

Body parameter

{
  "policy": "allow",
  "rules": [
    "string"
  ]
}

Curl

curl -X PUT {baseURL}/public-api/v1/agent/{agent_id}/network/interfaces-policy \ -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
body body AgentInterfacesPolicy true the filtering policy to be applied

Responses

Status Meaning Description Schema
204 No Content none None

deleteAgentIPScanPolicy

Code samples

curl -X DELETE {baseURL}/public-api/v1/agent/{agent_id}/network/ip-scan-policy \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/network/ip-scan-policy',
  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('{baseURL}/public-api/v1/agent/{agent_id}/network/ip-scan-policy',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/network/ip-scan-policy', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.delete '{baseURL}/public-api/v1/agent/{agent_id}/network/ip-scan-policy',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/network/ip-scan-policy", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /agent/{agent_id}/network/ip-scan-policy

Resets the IP scan policy to the default value

Curl

curl -X DELETE {baseURL}/public-api/v1/agent/{agent_id}/network/ip-scan-policy \ -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 none None

getAgentIPScanPolicy

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/network/ip-scan-policy \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/network/ip-scan-policy',
  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('{baseURL}/public-api/v1/agent/{agent_id}/network/ip-scan-policy',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/network/ip-scan-policy', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/network/ip-scan-policy',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/network/ip-scan-policy", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/{agent_id}/network/ip-scan-policy

Returns the current IP addresses management policy. It is possible to specify a set of IP addresses in the forced_ip_addresses field array or a set of IP address ranges in the forced_ip_ranges field array to be always scanned.

Curl

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/network/ip-scan-policy \ -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

{
  "forced_ip_addresses": [
    "string"
  ],
  "forced_ip_ranges": [
    {
      "end": "string",
      "start": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK The IP scan policy. AgentIPScanPolicy

setAgentIPScanPolicy

Code samples

curl -X PUT {baseURL}/public-api/v1/agent/{agent_id}/network/ip-scan-policy \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/network/ip-scan-policy',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "forced_ip_addresses": [
    "string"
  ],
  "forced_ip_ranges": [
    {
      "end": "string",
      "start": "string"
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

fetch('{baseURL}/public-api/v1/agent/{agent_id}/network/ip-scan-policy',
{
  method: 'PUT',
  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.put('{baseURL}/public-api/v1/agent/{agent_id}/network/ip-scan-policy', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.put '{baseURL}/public-api/v1/agent/{agent_id}/network/ip-scan-policy',
  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("PUT", "{baseURL}/public-api/v1/agent/{agent_id}/network/ip-scan-policy", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /agent/{agent_id}/network/ip-scan-policy

Updates the current IP address scan policy. The list of IP addresses provided in forced_ip_addresses and the list of IP address ranges provided in forced_ip_ranges will be scanned regardless of the automatic discovery settings of the agent.

Body parameter

{
  "forced_ip_addresses": [
    "string"
  ],
  "forced_ip_ranges": [
    {
      "end": "string",
      "start": "string"
    }
  ]
}

Curl

curl -X PUT {baseURL}/public-api/v1/agent/{agent_id}/network/ip-scan-policy \ -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
body body AgentIPScanPolicy true the IP scan policy to be applied

Responses

Status Meaning Description Schema
204 No Content none None

createRoutedNetwork

Code samples

curl -X POST {baseURL}/public-api/v1/agent/{agent_id}/network/routed \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/network/routed',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "address": "string",
  "name": "string",
  "netmask": 0
}';
const headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

fetch('{baseURL}/public-api/v1/agent/{agent_id}/network/routed',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/network/routed', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.post '{baseURL}/public-api/v1/agent/{agent_id}/network/routed',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/network/routed", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /agent/{agent_id}/network/routed

Creates a routed network

Body parameter

{
  "address": "string",
  "name": "string",
  "netmask": 0
}

Curl

curl -X POST {baseURL}/public-api/v1/agent/{agent_id}/network/routed \ -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
body body RoutedNetwork true none

Responses

Status Meaning Description Schema
201 Created none None

topology

getNetworkTopology

Code samples

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/network-topology \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/agent/{agent_id}/network-topology',
  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('{baseURL}/public-api/v1/agent/{agent_id}/network-topology',
{
  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('{baseURL}/public-api/v1/agent/{agent_id}/network-topology', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/agent/{agent_id}/network-topology',
  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", "{baseURL}/public-api/v1/agent/{agent_id}/network-topology", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /agent/{agent_id}/network-topology

Returns the agent's network topology

Curl

curl -X GET {baseURL}/public-api/v1/agent/{agent_id}/network-topology \ -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

{
  "edges": [
    {
      "from": 0,
      "to": 0
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK none NetworkTopology

company

moveAgent

Code samples

curl -X PUT {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/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. Note: This API is restricted to users on the Enterprise Plan. Please contact sales@domotz.com to learn more.

Curl

curl -X PUT {baseURL}/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 {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/public-api/v1/area", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /area

Returns all the areas of a Company. Note: This API is restricted to users on the Enterprise Plan. Please contact sales@domotz.com to learn more.

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 {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/public-api/v1/area/{area_id}/team", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /area/{area_id}/team

Returns all the teams of an Area. Note: This API is restricted to users on the Enterprise Plan. Please contact sales@domotz.com to learn more.

Curl

curl -X GET {baseURL}/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 {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/public-api/v1/area/{area_id}/team", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /area/{area_id}/team

Creates a new Team. Note: This API is restricted to users on the Enterprise Plan. Please contact sales@domotz.com to learn more.

Body parameter

{
  "leader": {
    "details": {
      "display_name": "string"
    },
    "name": "string",
    "password": "string"
  },
  "name": "string"
}

Curl

curl -X POST {baseURL}/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

getAlertProfiles2

Code samples

curl -X GET {baseURL}/public-api/v1/alert-profile \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/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('{baseURL}/public-api/v1/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('{baseURL}/public-api/v1/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 '{baseURL}/public-api/v1/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", "{baseURL}/public-api/v1/alert-profile", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /alert-profile

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)

Example responses

200 Response

[
  {
    "description": "string",
    "events": [
      "device_status_up"
    ],
    "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

getAgentAlertProfile

Code samples

curl -X GET {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/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 {baseURL}/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 {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/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}/device

Get the alert profile bindings of the devices of an agent

Curl

curl -X GET {baseURL}/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 {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/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 {baseURL}/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 {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/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 {baseURL}/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_feature_discovery POST FeatureDiscoveryEvent 201
agent_feature_discovery_mib POST MibDiscoveryEvent 201
agent_lan_change POST AgentLANChangeEvent 201
agent_security_issue POST AgentSecurityIssueEvent 201
agent_speed_test POST AgentSpeedTestEvent 201
agent_status_down POST AgentStatusEvent 201
agent_status_up POST AgentStatusEvent 201
agent_wan_change POST AgentWANChangeEvent 201

unbindAlertProfileFromDevice

Code samples

curl -X DELETE {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/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 {baseURL}/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 {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/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 {baseURL}/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_down POST DeviceStatusChangeEvent 201
device_status_up POST DeviceStatusChangeEvent 201
device_tcp POST DeviceTCPEvent 201
monitoring_profile_state_changed POST MonitoringProfileStateChanged 201

getAlertProfiles Deprecated (please use getAlertProfiles2)

Code samples

curl -X GET {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/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-profile

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 GET {baseURL}/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_up"
    ],
    "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

Custom Drivers

listCustomDrivers

Code samples

curl -X GET {baseURL}/public-api/v1/custom-driver \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/custom-driver',
  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('{baseURL}/public-api/v1/custom-driver',
{
  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('{baseURL}/public-api/v1/custom-driver', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/custom-driver',
  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", "{baseURL}/public-api/v1/custom-driver", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /custom-driver

Retrieves the list of available Custom Drivers

Example responses

200 Response

[
  {
    "code_inspection": {
      "has_independent_variables": true,
      "has_parameters": true,
      "has_table": true
    },
    "description": "string",
    "device_ids": [
      0
    ],
    "id": 0,
    "is_valid": true,
    "minimal_sample_period": 0,
    "name": "string",
    "requires_credentials": true
  }
]

Responses

Status Meaning Description Schema
200 OK The list of available Custom Drivers Inline

Response Schema

Status Code 200

Name Type Required Description
anonymous [CustomDriver] false [A Custom Driver that can be applied on devices]
» code_inspection object true Result of the Custom Driver code analysis
»» has_independent_variables boolean true True if the Custom Driver creates independent variables on execution
»» has_parameters boolean true True if the Custom Driver uses parameters during execution
»» has_table boolean true True if the Custom Driver creates a variable table on execution
» description string false Description of the Custom Driver
» device_ids [integer] true List of the device IDs the Custom Driver is applied on
» id integer(int32) true The identifier of the Custom Driver
» is_valid boolean true True if the Custom Driver has valid code, False otherwise
» minimal_sample_period integer(int32) true The minimal sampling interval of the Custom Driver (in seconds)
» name string true Name of the Custom Driver
» requires_credentials boolean true True if the Custom Driver requires credentials to run, False otherwise

listCustomDriverAssociations

Code samples

curl -X GET {baseURL}/public-api/v1/custom-driver/agent/{agent_id}/association \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/custom-driver/agent/{agent_id}/association',
  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('{baseURL}/public-api/v1/custom-driver/agent/{agent_id}/association',
{
  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('{baseURL}/public-api/v1/custom-driver/agent/{agent_id}/association', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/custom-driver/agent/{agent_id}/association',
  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", "{baseURL}/public-api/v1/custom-driver/agent/{agent_id}/association", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /custom-driver/agent/{agent_id}/association

Retrieves a list of all Custom Driver associations for an agent

Curl

curl -X GET {baseURL}/public-api/v1/custom-driver/agent/{agent_id}/association \ -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

[
  {
    "custom_driver_id": 0,
    "device_id": 0,
    "id": 0,
    "last_inspection_time": "2019-08-24T14:15:22Z",
    "parameters": [
      {
        "custom_driver_parameter_id": 0,
        "description": "string",
        "name": "string",
        "value": null,
        "value_type": "STRING"
      }
    ],
    "sample_period": 0,
    "status": "ENABLED",
    "used_variables": 0
  }
]

Responses

Status Meaning Description Schema
200 OK The list of Custom Driver associations Inline

Response Schema

Status Code 200

Name Type Required Description
anonymous [CustomDriverAssociation] false [An association between a Custom Driver and a device]
» custom_driver_id integer(int32) true The id of the Custom Driver
» device_id integer(int32) true The id of the device the Custom Driver is applied to
» id integer(int32) true The id of the association
» last_inspection_time string(date-time) true The last time (datetime) the device inspection was executed
» parameters [object] false Parameters used in the association
»» custom_driver_parameter_id integer(int32) true The id of the parameter on the driver level
»» description string false Description of the parameter
»» name string true The identifier by which the parameter is called in the driver script
»» value any false Value of the parameter used for the association. In case it is not set on the association level, the Custom Driver default is shown. Empty if the parameter was added to the Custom Driver without a default value after the association was created
»» value_type string true Value type of the parameter. Numbers are treated as floats, list items are treated as strings
» sample_period integer(int32) true The sampling interval of the Custom Driver (in seconds)
» status string true
  • ENABLED: The association is enabled and running
  • DISABLED: The association is disabled due to failure
» used_variables integer(int32) true The number of variables used by this Custom Driver association

Enumerated Values

Property Value
value_type STRING
value_type NUMBER
value_type LIST
status ENABLED
status DISABLED

getCustomDriver

Code samples

curl -X GET {baseURL}/public-api/v1/custom-driver/{custom_driver_id} \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/custom-driver/{custom_driver_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('{baseURL}/public-api/v1/custom-driver/{custom_driver_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('{baseURL}/public-api/v1/custom-driver/{custom_driver_id}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.get '{baseURL}/public-api/v1/custom-driver/{custom_driver_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", "{baseURL}/public-api/v1/custom-driver/{custom_driver_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /custom-driver/{custom_driver_id}

Returns details of a Custom Driver

Curl

curl -X GET {baseURL}/public-api/v1/custom-driver/{custom_driver_id} \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'

Parameters

Parameter In Type Required Description
custom_driver_id path integer(int32) true Custom Driver ID

Example responses

200 Response

{
  "actions": [
    {
      "documentation": "string",
      "id": 0,
      "label": "string",
      "line": 0
    }
  ],
  "code": "string",
  "code_inspection": {
    "has_independent_variables": true,
    "has_parameters": true,
    "has_table": true
  },
  "description": "string",
  "errors": [
    {
      "line": 0,
      "message": "string",
      "type": "string"
    }
  ],
  "id": 0,
  "is_valid": true,
  "minimal_sample_period": 0,
  "name": "string",
  "parameters": [
    {
      "default_value": null,
      "description": "string",
      "id": 0,
      "name": "string",
      "value_type": "STRING"
    }
  ],
  "requires_credentials": true
}

Responses

Status Meaning Description Schema
200 OK Custom Driver details CustomDriverDetails

createCustomDriverAssociation

Code samples

curl -X POST {baseURL}/public-api/v1/custom-driver/{custom_driver_id}/agent/{agent_id}/device/{device_id}/association \
  -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: '{baseURL}/public-api/v1/custom-driver/{custom_driver_id}/agent/{agent_id}/device/{device_id}/association',
  method: 'post',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "credentials": {
    "password": "string",
    "username": "string"
  },
  "parameters": [
    {
      "custom_driver_parameter_id": 0,
      "value": null
    }
  ],
  "sample_period": 0
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

fetch('{baseURL}/public-api/v1/custom-driver/{custom_driver_id}/agent/{agent_id}/device/{device_id}/association',
{
  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',
  'Accept': 'application/json',
  'X-Api-Key': 'API_KEY'
}

r = requests.post('{baseURL}/public-api/v1/custom-driver/{custom_driver_id}/agent/{agent_id}/device/{device_id}/association', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.post '{baseURL}/public-api/v1/custom-driver/{custom_driver_id}/agent/{agent_id}/device/{device_id}/association',
  params: {
  }, headers: headers

p JSON.parse(result)

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", "{baseURL}/public-api/v1/custom-driver/{custom_driver_id}/agent/{agent_id}/device/{device_id}/association", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /custom-driver/{custom_driver_id}/agent/{agent_id}/device/{device_id}/association

Apply a Custom Driver to a device

Body parameter

{
  "credentials": {
    "password": "string",
    "username": "string"
  },
  "parameters": [
    {
      "custom_driver_parameter_id": 0,
      "value": null
    }
  ],
  "sample_period": 0
}

Curl

curl -X POST {baseURL}/public-api/v1/custom-driver/{custom_driver_id}/agent/{agent_id}/device/{device_id}/association \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'

Parameters

Parameter In Type Required Description
custom_driver_id path integer(int32) true Custom Driver ID
agent_id path integer(int32) true Agent ID
device_id path integer(int32) true Device ID
body body CustomDriverAssociationCreation false none

Example responses

201 Response

{
  "error": "string",
  "result": 0
}

Responses

Status Meaning Description Schema
201 Created The outcome of the association CustomDriverAssociationCreationResult

executeCustomDriverAction

Code samples

curl -X POST {baseURL}/public-api/v1/custom-driver/{custom_driver_id}/agent/{agent_id}/device/{device_id}/execute/{action_id} \
  -H 'Accept: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Accept':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/custom-driver/{custom_driver_id}/agent/{agent_id}/device/{device_id}/execute/{action_id}',
  method: 'post',

  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('{baseURL}/public-api/v1/custom-driver/{custom_driver_id}/agent/{agent_id}/device/{device_id}/execute/{action_id}',
{
  method: 'POST',

  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.post('{baseURL}/public-api/v1/custom-driver/{custom_driver_id}/agent/{agent_id}/device/{device_id}/execute/{action_id}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.post '{baseURL}/public-api/v1/custom-driver/{custom_driver_id}/agent/{agent_id}/device/{device_id}/execute/{action_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("POST", "{baseURL}/public-api/v1/custom-driver/{custom_driver_id}/agent/{agent_id}/device/{device_id}/execute/{action_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /custom-driver/{custom_driver_id}/agent/{agent_id}/device/{device_id}/execute/{action_id}

Execute a Custom Driver action on an associated device. The agent variables limit for Custom Drivers must not be exceeded.

Curl

curl -X POST {baseURL}/public-api/v1/custom-driver/{custom_driver_id}/agent/{agent_id}/device/{device_id}/execute/{action_id} \ -H 'Accept: application/json' \ -H 'X-Api-Key: API_KEY'

Parameters

Parameter In Type Required Description
custom_driver_id path integer(int32) true Custom Driver ID
agent_id path integer(int32) true Agent ID
device_id path integer(int32) true Device ID
action_id path integer(int32) true Custom Driver Action id. Valid range 1-30

Example responses

200 Response

{
  "elapsed": 0,
  "errorMessage": "string",
  "errorType": "string",
  "log": [
    "string"
  ],
  "outcome": "undefined"
}

Responses

Status Meaning Description Schema
200 OK The outcome of the custom action execution CustomDriverExecutionResult

deleteCustomDriverAssociation

Code samples

curl -X DELETE {baseURL}/public-api/v1/custom-driver/{custom_driver_id}/association/{association_id} \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/custom-driver/{custom_driver_id}/association/{association_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('{baseURL}/public-api/v1/custom-driver/{custom_driver_id}/association/{association_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('{baseURL}/public-api/v1/custom-driver/{custom_driver_id}/association/{association_id}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.delete '{baseURL}/public-api/v1/custom-driver/{custom_driver_id}/association/{association_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", "{baseURL}/public-api/v1/custom-driver/{custom_driver_id}/association/{association_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /custom-driver/{custom_driver_id}/association/{association_id}

Remove a Custom Driver from a device. This irreversibly deletes all variables created by the driver for that device

Curl

curl -X DELETE {baseURL}/public-api/v1/custom-driver/{custom_driver_id}/association/{association_id} \ -H 'X-Api-Key: API_KEY'

Parameters

Parameter In Type Required Description
custom_driver_id path integer(int32) true Custom Driver ID
association_id path integer(int32) true Custom Driver Association ID

Responses

Status Meaning Description Schema
204 No Content none None

updateCustomDriverAssociationParameters

Code samples

curl -X PUT {baseURL}/public-api/v1/custom-driver/{custom_driver_id}/association/{association_id} \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: API_KEY'

var headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

$.ajax({
  url: '{baseURL}/public-api/v1/custom-driver/{custom_driver_id}/association/{association_id}',
  method: 'put',

  headers: headers,
  success: function(data) {
    console.log(JSON.stringify(data));
  }
})

const fetch = require('node-fetch');
const inputBody = '{
  "parameters": [
    {
      "custom_driver_parameter_id": 0,
      "value": null
    }
  ]
}';
const headers = {
  'Content-Type':'application/json',
  'X-Api-Key':'API_KEY'

};

fetch('{baseURL}/public-api/v1/custom-driver/{custom_driver_id}/association/{association_id}',
{
  method: 'PUT',
  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.put('{baseURL}/public-api/v1/custom-driver/{custom_driver_id}/association/{association_id}', params={

}, headers = headers)

print r.json()

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'X-Api-Key' => 'API_KEY'
}

result = RestClient.put '{baseURL}/public-api/v1/custom-driver/{custom_driver_id}/association/{association_id}',
  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("PUT", "{baseURL}/public-api/v1/custom-driver/{custom_driver_id}/association/{association_id}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /custom-driver/{custom_driver_id}/association/{association_id}

Update the parameters for a Custom Driver association

Body parameter

{
  "parameters": [
    {
      "custom_driver_parameter_id": 0,
      "value": null
    }
  ]
}

Curl

curl -X PUT {baseURL}/public-api/v1/custom-driver/{custom_driver_id}/association/{association_id} \ -H 'Content-Type: application/json' \ -H 'X-Api-Key: API_KEY'

Parameters

Parameter In Type Required Description
custom_driver_id path integer(int32) true Custom Driver ID
association_id path integer(int32) true Custom Driver Association ID
body body CustomDriverAssociationParameterCreation true A list of parameters to update

Responses

Status Meaning Description Schema
204 No Content none None

meta

apiUsageInfo

Code samples

curl -X GET {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/public-api/v1/meta/usage", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /meta/usage

Retrieves 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 {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/public-api/v1/type/device/base", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /type/device/base

Returns 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 Device entity
» 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 VITAL as soon as recognised

listDeviceDetectedTypes

Code samples

curl -X GET {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/public-api/v1/type/device/detected", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /type/device/detected

Returns 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 Device entity
» 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 type

user

getUser

Code samples

curl -X GET {baseURL}/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: '{baseURL}/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('{baseURL}/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('{baseURL}/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 '{baseURL}/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", "{baseURL}/public-api/v1/user", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /user

Returns 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 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": "NO_AUTHENTICATION",
  "details": {
    "firmware_version": "string",
    "room": "string",
    "serial": "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,
  "os": {
    "build": "string",
    "name": "string",
    "version": "string"
  },
  "protocol": "IP",
  "type": {
    "detected_id": 0,
    "id": 0,
    "label": "string"
  },
  "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
» firmware_version string false none
» room string false none
» serial string false Set to null to reset and allow the automatically discovered serial number to be used for device
» 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
os object false DeviceOS
» build string false none
» name string false none
» version string false none
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
» label string 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 NO_AUTHENTICATION
authentication_status AUTHENTICATED
authentication_status PENDING
authentication_status REQUIRED
authentication_status WRONG_CREDENTIALS
importance VITAL
importance FLOATING
protocol IP
protocol DUMMY
protocol IP_EXTERNAL

ActivityLog

{
  "description": "string",
  "details": {},
  "device_id": 0,
  "timestamp": "2019-08-24T14:15:22Z",
  "type": "note",
  "user": "string"
}

An activity log item

Properties

Name Type Required Description
description string true Description of the event
details object false Additional details of the event
device_id integer(int32) false Device that triggered the event (if applicable)
timestamp string(date-time) true Timestamp of the event
type string true Type of the event
user string true User who triggered the event

Enumerated Values

Property Value
type note
type agent_alert_level_set
type agent_alert_resume
type rtd_session_start
type cresnet_node_reboot
type device_reboot
type firmware_update_start
type applications_terminate
type configuration_restore
type factory_reset
type network_configuration_change
type custom_driver_execute
type remote_session_start
type remote_session_terminate
type remote_session_limit_reached
type vpn_session_start
type vpn_session_terminate
type chat_started
type chat_resolved
type operator_joined
type operator_left
type power_on
type power_off
type power_cycle
type camera_snapshot
type camera_streaming_start
type configuration_management_status_change

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,
  "installation_info": {
    "contract_id": "string",
    "customer_id": "string"
  },
  "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"
  },
  "organization": {
    "id": 0,
    "name": "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 false the 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
installation_info object false none
» contract_id string false none
» customer_id string false 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
organization object false none
» id integer(int32) false none
» name 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,
  "installation_info": {
    "contract_id": "string",
    "customer_id": "string"
  },
  "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"
  },
  "organization": {
    "id": 0,
    "name": "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

AgentDeviceApplication

{
  "application_id": "string",
  "device_id": "string",
  "first_time_seen": "2019-08-24T14:15:22Z",
  "info": "string",
  "install_date": "2019-08-24T14:15:22Z",
  "install_location": "string",
  "last_modified": "2019-08-24T14:15:22Z",
  "last_update": "2019-08-24T14:15:22Z",
  "name": "string",
  "publisher": "string",
  "version": "string"
}

The list of applications of all devices belonging to the agent

Properties

Name Type Required Description
application_id string true none
device_id string true none
first_time_seen string(date-time) true none
info string false none
install_date string(date-time) false none
install_location string false none
last_modified string(date-time) false none
last_update string(date-time) false none
name string false none
publisher string false none
version string false none

AgentDeviceVariable

{
  "creation_time": "2019-08-24T14:15:22Z",
  "device_id": 0,
  "has_history": true,
  "id": 0,
  "label": "string",
  "metric": "string",
  "path": "string",
  "previous_value": "string",
  "unit": "string",
  "value": "string",
  "value_update_time": "2019-08-24T14:15:22Z"
}

The representation of a device variable

Properties

Name Type Required Description
creation_time string(date-time) false The creation time of the variable
device_id integer(int32) true The ID of the device
has_history boolean true If true the history of the variable can be retrieved with getVariableHistory
id integer(int32) true The ID of the variable
label string false The label
metric string false The metric
path string true The variable path
previous_value string false The previous value of the variable
unit string false The unit of measurement
value string false The variable value
value_update_time string(date-time) false The update time of the variable value

AgentExternalHostScanPolicy

{
  "icmp": {
    "enabled": true
  },
  "tcp_ack": {
    "enabled": true,
    "ports": [
      0
    ]
  },
  "tcp_syn": {
    "enabled": true,
    "ports": [
      0
    ]
  }
}

Properties

Name Type Required Description
icmp object false none
» enabled boolean true Enable/disable this scan method
tcp_ack object false none
» enabled boolean true Enable/disable this scan method. The agent sends a TCP packet with only the acknowledgement (ACK) flag set, and a responding reset (RST) packet from the host reveals its presence.
» ports [integer] true The list of TCP port to be scanned with this method. The list cannot be empty if this method is enabled
tcp_syn object false none
» enabled boolean true Enable or disable this scan method. The agent sends a SYN packet to the target host and waits for a response. If the target responds with a SYN/ACK packet or an RST packet, the host is considered up.
» ports [integer] true The list of TCP port to be scanned with this method. The list cannot be empty if this method is enabled

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

AgentIPScanPolicy

{
  "forced_ip_addresses": [
    "string"
  ],
  "forced_ip_ranges": [
    {
      "end": "string",
      "start": "string"
    }
  ]
}

Properties

Name Type Required Description
forced_ip_addresses [string] true The list of IP addresses always checked by the agent. By default the list is empty and the agent performs hosts discovery automatically. The addresses must be expressed in dotted decimal notation and must belong to private networks (see iana-ipv4-special-registry)
forced_ip_ranges [object] true The list of IP address ranges always checked by the agent. By default the list is empty and the agent performs hosts discovery automatically. The addresses must be expressed in dotted decimal notation and must belong to private networks (see iana-ipv4-special-registry)
» end string true 192.168.1.10
» start string true 192.168.1.1

AgentInterfacesPolicy

{
  "policy": "allow",
  "rules": [
    "string"
  ]
}

Properties

Name Type Required Description
policy string true none
rules [string] true Rules can be expressed as lists of case-insensitive strings representing the names of the interfaces to be matched. The * wildcard can be used to match variable parts of the interface name. Example: ["eth*", "tun0"]

Enumerated Values

Property Value
policy allow
policy deny

AgentIpConflict

{
  "conflicting_devices": [
    {
      "id": 0,
      "mac": "string"
    }
  ],
  "ip": "string"
}

Properties

Name Type Required Description
conflicting_devices [object] false none
» id integer(int32) false none
» mac string false none
ip string false none

AgentLANChangeEvent

{
  "data": {
    "agent": {
      "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,
      "installation_info": {
        "contract_id": "string",
        "customer_id": "string"
      },
      "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"
      },
      "organization": {
        "id": 0,
        "name": "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"
      }
    },
    "agent_id": 0,
    "dhcp": {
      "new": [
        "string"
      ],
      "old": [
        "string"
      ]
    },
    "dns": {
      "new": [
        "string"
      ],
      "old": [
        "string"
      ]
    },
    "gateway": {
      "new": "string",
      "old": "string"
    }
  },
  "name": "agent_lan_change",
  "timestamp": "2019-08-24T14:15:22Z"
}

Triggered when gateway, DNS servers, DHCP servers change

Properties

Name Type Required Description
data object false none
» agent AgentBase false none
» agent_id integer(int32) true The id of the agent
» dhcp object false none
»» new [string] false none
»» old [string] false none
» dns object false none
»» new [string] false none
»» old [string] false none
» gateway object false none
»» new string false none
»» old string false none
» name string true none
» timestamp string(date-time) true The timestamp of the event

Enumerated Values

Property Value
name agent_lan_change

AgentSecurityIssueEvent

{
  "data": {
    "agent": {
      "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,
      "installation_info": {
        "contract_id": "string",
        "customer_id": "string"
      },
      "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"
      },
      "organization": {
        "id": 0,
        "name": "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"
      }
    },
    "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 AgentBase false none
» agent_id integer(int32) false The id of the agent
» value [object] false none
»» port integer(int32) false 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

AgentSpeedTestEvent

{
  "data": {
    "agent": {
      "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,
      "installation_info": {
        "contract_id": "string",
        "customer_id": "string"
      },
      "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"
      },
      "organization": {
        "id": 0,
        "name": "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"
      }
    },
    "agent_id": 0,
    "status": "SPEED_TEST_ISSUE_DETECTED",
    "threshold": {
      "download": 0,
      "upload": 0
    },
    "value": {
      "download": 0,
      "upload": 0
    }
  },
  "name": "agent_speed_test",
  "timestamp": "2019-08-24T14:15:22Z"
}

Triggered when the measured Internet speed goes below the defined threshold

Properties

Name Type Required Description
data object false none
» agent AgentBase false none
» agent_id integer(int32) false The id of the agent
» status string false none
» threshold object false none
»» download integer(int32) false The configured download threshold
»» upload integer(int32) false The configured upload threshold
» value object false none
»» download integer(int32) false The measured download value
»» upload integer(int32) false The measured upload value
» name string true none
» timestamp string(date-time) true The timestamp of the event

Enumerated Values

Property Value
status SPEED_TEST_ISSUE_DETECTED
status SPEED_TEST_ISSUE_RESOLVED
name agent_speed_test

AgentStatusEvent

{
  "data": {
    "agent": {
      "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,
      "installation_info": {
        "contract_id": "string",
        "customer_id": "string"
      },
      "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"
      },
      "organization": {
        "id": 0,
        "name": "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"
      }
    },
    "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
» agent AgentBase false none
» agent_id integer(int32) false The id of the agent
» value string false none
name string true none
timestamp string(date-time) true The timestamp of the event

Enumerated Values

Property Value
value UP
value DOWN
name agent_status

AgentUptime

{
  "agent_id": 0,
  "downtime_intervals": [
    {
      "end": "2019-08-24T14:15:22Z",
      "start": "2019-08-24T14:15:22Z"
    }
  ],
  "online_seconds": 0,
  "total_seconds": 0,
  "uptime": "string"
}

Properties

Name Type Required Description
agent_id integer(int32) true none
downtime_intervals [object] false none
» end string(date-time) false none
» start string(date-time) false none
online_seconds integer(int32) true none
total_seconds integer(int32) true none
uptime string true The uptime percentage of the agent

AgentVPNActiveConnection

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

{
  "allowed_ip": "string",
  "routing_policy": "global",
  "ttl_hours": 1
}

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.
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
ttl_hours integer(int32) false The duration in hours of the connection.

Enumerated Values

Property Value
routing_policy global
routing_policy local

AgentVariable

{
  "creation_time": "2019-08-24T14:15:22Z",
  "has_history": true,
  "id": 0,
  "label": "string",
  "metric": "string",
  "path": "string",
  "previous_value": "string",
  "unit": "string",
  "value": "string",
  "value_update_time": "2019-08-24T14:15:22Z"
}

The representation of an agent variable

Properties

Name Type Required Description
creation_time string(date-time) false The creation time of the variable
has_history boolean true If true the history of the variable can be retrieved with getVariableHistory
id integer(int32) true The ID of the variable
label string false The label
metric string false The metric
path string true The variable path
previous_value string false The previous value of the variable
unit string false The unit of measurement
value string false The variable value
value_update_time string(date-time) false The update time of the variable value

AgentWANChangeEvent

{
  "data": {
    "agent": {
      "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,
      "installation_info": {
        "contract_id": "string",
        "customer_id": "string"
      },
      "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"
      },
      "organization": {
        "id": 0,
        "name": "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"
      }
    },
    "agent_id": 0,
    "ip": {
      "new": {
        "address": "string",
        "name": "string"
      },
      "old": {
        "address": "string",
        "name": "string"
      }
    },
    "provider": {
      "new": {
        "country": "string",
        "descr": "string",
        "inetnum": "string",
        "netname": "string"
      },
      "old": {
        "country": "string",
        "descr": "string",
        "inetnum": "string",
        "netname": "string"
      }
    }
  },
  "name": "agent_wan_change",
  "timestamp": "2019-08-24T14:15:22Z"
}

Triggered when ISP or Public IP address changes

Properties

Name Type Required Description
data object false none
» agent AgentBase false none
» agent_id integer(int32) true The id of the agent
» ip object false none
»» new object false none
»»» address string false none
»»» name string false none
»» old object false none
»»» address string false none
»»» name string false none
»» provider object false none
»»» new object false none
»»»» country string false none
»»»» descr string false none
»»»» inetnum string false none
»»»» netname string false none
»»» old object false none
»»»» country string false none
»»»» descr string false none
»»»» inetnum string false none
»»»» netname string false none
»»» name string true none
»»» timestamp string(date-time) true The timestamp of the event

Enumerated Values

Property Value
name agent_wan_change

AlertProfile

{
  "description": "string",
  "events": [
    "device_status_up"
  ],
  "id": 0,
  "is_enabled": true,
  "name": "string",
  "tag": "string"
}

Properties

Name Type Required Description
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

AlertProfileAgentBinding

{
  "alert_profile_id": 0
}

Properties

Name Type Required Description
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
alert_profile_id integer(int32) true The id of the alert profile
device_id integer(int32) true none

AllAgentInterfaces

{
  "attached": [
    {
      "address": "string",
      "mac_address": "string",
      "name": "string",
      "netmask": 0
    }
  ],
  "routed": [
    {
      "address": "string",
      "name": "string",
      "netmask": 0
    }
  ]
}

Properties

Name Type Required Description
attached [object] true none
» address string false none
» mac_address string false none
» name string true none
» netmask integer(int32) false none
routed [object] true none
» address string false none
» name string true none
» netmask integer(int32) false none

Area

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

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

{
  "allowed_ip": "string",
  "expiration": "2019-08-24T14:15:22Z",
  "id": 0,
  "link": "string",
  "port": 0,
  "protocol": "http"
}

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

Property Value
protocol http
protocol https
protocol tcp
protocol ssh
protocol rdp

CustomDriver

{
  "code_inspection": {
    "has_independent_variables": true,
    "has_parameters": true,
    "has_table": true
  },
  "description": "string",
  "device_ids": [
    0
  ],
  "id": 0,
  "is_valid": true,
  "minimal_sample_period": 0,
  "name": "string",
  "requires_credentials": true
}

A Custom Driver that can be applied on devices

Properties

Name Type Required Description
code_inspection object true Result of the Custom Driver code analysis
» has_independent_variables boolean true True if the Custom Driver creates independent variables on execution
» has_parameters boolean true True if the Custom Driver uses parameters during execution
» has_table boolean true True if the Custom Driver creates a variable table on execution
description string false Description of the Custom Driver
device_ids [integer] true List of the device IDs the Custom Driver is applied on
id integer(int32) true The identifier of the Custom Driver
is_valid boolean true True if the Custom Driver has valid code, False otherwise
minimal_sample_period integer(int32) true The minimal sampling interval of the Custom Driver (in seconds)
name string true Name of the Custom Driver
requires_credentials boolean true True if the Custom Driver requires credentials to run, False otherwise

CustomDriverAssociation

{
  "custom_driver_id": 0,
  "device_id": 0,
  "id": 0,
  "last_inspection_time": "2019-08-24T14:15:22Z",
  "parameters": [
    {
      "custom_driver_parameter_id": 0,
      "description": "string",
      "name": "string",
      "value": null,
      "value_type": "STRING"
    }
  ],
  "sample_period": 0,
  "status": "ENABLED",
  "used_variables": 0
}

An association between a Custom Driver and a device

Properties

Name Type Required Description
custom_driver_id integer(int32) true The id of the Custom Driver
device_id integer(int32) true The id of the device the Custom Driver is applied to
id integer(int32) true The id of the association
last_inspection_time string(date-time) true The last time (datetime) the device inspection was executed
parameters [object] false Parameters used in the association
» custom_driver_parameter_id integer(int32) true The id of the parameter on the driver level
» description string false Description of the parameter
» name string true The identifier by which the parameter is called in the driver script
» value any false Value of the parameter used for the association. In case it is not set on the association level, the Custom Driver default is shown. Empty if the parameter was added to the Custom Driver without a default value after the association was created
» value_type string true Value type of the parameter. Numbers are treated as floats, list items are treated as strings
sample_period integer(int32) true The sampling interval of the Custom Driver (in seconds)
status string true
  • ENABLED: The association is enabled and running
  • DISABLED: The association is disabled due to failure
used_variables integer(int32) true The number of variables used by this Custom Driver association

Enumerated Values

Property Value
value_type STRING
value_type NUMBER
value_type LIST
status ENABLED
status DISABLED

CustomDriverAssociationCreation

{
  "credentials": {
    "password": "string",
    "username": "string"
  },
  "parameters": [
    {
      "custom_driver_parameter_id": 0,
      "value": null
    }
  ],
  "sample_period": 0
}

Properties for associating a Custom Driver and a device

Properties

Name Type Required Description
credentials object false The credentials for the Custom Driver (with scope CUSTOM_DRIVER_MANAGEMENT). Only required if the driver requires credentials, and there are none saved for the device
» password string true password
» username string true username
parameters [object] false A list of parameters to be used for the association. Only required if the Custom Driver uses parameters. Parameters with default values at the driver level can be skipped.
» custom_driver_parameter_id integer(int32) true The id of the parameter on the driver level
» value any false Value of the parameter for the association. Its type can be either a float, a string or a list based on its value_type. The following restrictions apply based on the value type:
  • STRING: maximum 100 characters
  • LIST: maximum 50 items, maximum 100 characters each
sample_period integer(int32) false The sampling interval of the Custom Driver (in seconds). Must be one of [300, 600, 900, 1800, 3600, 7200, 21600, 43200, 86400] and equal to or greater than the minimal_sample_period of the Custom Driver. Default value is the minimal_sample_period of the Custom Driver

CustomDriverAssociationCreationResult

{
  "error": "string",
  "result": 0
}

The outcome of applying a Custom Driver to a device

Properties

Name Type Required Description
error string false Description of the error that occurred. Returned in case of failure.
result integer(int32) false The id of the newly created association. Returned in case of success.

CustomDriverAssociationParameterCreation

{
  "parameters": [
    {
      "custom_driver_parameter_id": 0,
      "value": null
    }
  ]
}

Creation data for multiple association parameters

Properties

Name Type Required Description
parameters [object] true none
» custom_driver_parameter_id integer(int32) true The id of the parameter on the driver level
» value any false Value of the parameter for the association. Its type can be either a float, a string or a list based on its value_type. The following restrictions apply based on the value type:
  • STRING: maximum 100 characters
  • LIST: maximum 50 items, maximum 100 characters each

CustomDriverDetails

{
  "actions": [
    {
      "documentation": "string",
      "id": 0,
      "label": "string",
      "line": 0
    }
  ],
  "code": "string",
  "code_inspection": {
    "has_independent_variables": true,
    "has_parameters": true,
    "has_table": true
  },
  "description": "string",
  "errors": [
    {
      "line": 0,
      "message": "string",
      "type": "string"
    }
  ],
  "id": 0,
  "is_valid": true,
  "minimal_sample_period": 0,
  "name": "string",
  "parameters": [
    {
      "default_value": null,
      "description": "string",
      "id": 0,
      "name": "string",
      "value_type": "STRING"
    }
  ],
  "requires_credentials": true
}

Detailed information for a Custom Driver that can be applied on devices

Properties

Name Type Required Description
actions [object] true A list of the custom actions that can be executed by this Custom Driver (empty if none exist)
» documentation string true Detailed description of the custom driver action
» id integer(int32) true Identifier of the custom driver action. Used in execution API Values range 1-30 depending on defined actions in the driver code
» label string true The label of the action, shown as the button label in the ui when the driver is applied to a device
» line integer(int32) true Line number of the function declaration for the action
code string true The source code of the driver
code_inspection object true Result of the Custom Driver code analysis
» has_independent_variables boolean true True if the Custom Driver creates independent variables on execution
» has_parameters boolean true True if the Custom Driver uses parameters during execution
» has_table boolean true True if the Custom Driver creates a variable table on execution
description string false Description of the Custom Driver
errors [object] false A list of errors in this drivers's code. Only returned if the driver's code is invalid and cannot be executed
» line integer(int32) false The line number in the code that raised the error.
» message string false Error message
» type string true Type of the error
id integer(int32) true The identifier of the Custom Driver
is_valid boolean true True if the Custom Driver has valid code, False otherwise
minimal_sample_period integer(int32) true The minimal sampling interval of the Custom Driver (in seconds)
name string true Name of the Custom Driver
parameters [object] false A list of parameters used by this Custom Driver. Only returned if the driver has parameters defined
» default_value any false Default value of the parameter. Its type can be either a float, a string or a list based on its value_type.
» description string false Description of the parameter
» id integer(int32) true Unique id
» name string true The identifier by which the parameter is called in the driver script
» value_type string true Value type of the parameter. Numbers are treated as floats, list items are treated as strings
requires_credentials boolean true True if the Custom Driver requires credentials to run, False otherwise

Enumerated Values

Property Value
value_type STRING
value_type NUMBER
value_type LIST

CustomDriverExecutionResult

{
  "elapsed": 0,
  "errorMessage": "string",
  "errorType": "string",
  "log": [
    "string"
  ],
  "outcome": "undefined"
}

The result of a Custom Driver execution command

Properties

Name Type Required Description
elapsed integer(int32) false The time it took to Execute the Custom Driver Action (in milliseconds)
errorMessage string false Expanded description of the errorType returned in a failed Custom Driver Execution
errorType string false Short name of the error returned with a failed outcome of the Custom Driver Execution
log [string] false List of log messages generated during the Custom Driver Execution
outcome string true Outcome from the Custom Driver Execution

Enumerated Values

Property Value
outcome success
outcome failure
outcome undefined

DHCPDeviceDiscoverySetting

{
  "dhcp_device_discovery": true
}

Properties

Name Type Required Description
dhcp_device_discovery boolean true When set to 'true', the agent will create devices that initiate DHCP requests even if they fail to obtain an IP address

DetectedDeviceType

{
  "capabilities": [
    "string"
  ],
  "id": 0,
  "identifier": "string",
  "label": "string",
  "type_id": 0
}

A device type, detected by the Domotz device identification feature

Properties

Name Type Required Description
capabilities [string] false The features of the device
id integer(int32) false An unique identifier of the type, referred in the Device entity
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 type

DeviceApplication

{
  "application_id": "string",
  "first_time_seen": "2019-08-24T14:15:22Z",
  "info": "string",
  "install_date": "2019-08-24T14:15:22Z",
  "install_location": "string",
  "last_modified": "2019-08-24T14:15:22Z",
  "last_update": "2019-08-24T14:15:22Z",
  "name": "string",
  "publisher": "string",
  "version": "string"
}

The list of applications of a device

Properties

Name Type Required Description
application_id string true none
first_time_seen string(date-time) true none
info string false none
install_date string(date-time) false none
install_location string false none
last_modified string(date-time) false none
last_update string(date-time) false none
name string false none
publisher string false none
version string false none

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 Type Required Description
id integer(int32) false An unique identifier of the type, referred in the Device entity
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 VITAL as soon as recognised

DeviceConfigurationChangeEvent

{
  "data": {
    "agent": {
      "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,
      "installation_info": {
        "contract_id": "string",
        "customer_id": "string"
      },
      "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"
      },
      "organization": {
        "id": 0,
        "name": "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"
      }
    },
    "agent_id": 0,
    "device": {
      "authentication_status": "NO_AUTHENTICATION",
      "details": {
        "firmware_version": "string",
        "room": "string",
        "serial": "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,
      "os": {
        "build": "string",
        "name": "string",
        "version": "string"
      },
      "protocol": "IP",
      "type": {
        "detected_id": 0,
        "id": 0,
        "label": "string"
      },
      "user_data": {
        "model": "string",
        "name": "string",
        "type": 0,
        "vendor": "string"
      }
    },
    "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 AgentBase false none
» agent_id integer(int32) false The id of the agent
» device AbstractDevice false Base abstract class for all devices
» 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

{
  "data": {
    "agent": {
      "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,
      "installation_info": {
        "contract_id": "string",
        "customer_id": "string"
      },
      "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"
      },
      "organization": {
        "id": 0,
        "name": "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"
      }
    },
    "agent_id": 0,
    "device": {
      "authentication_status": "NO_AUTHENTICATION",
      "details": {
        "firmware_version": "string",
        "room": "string",
        "serial": "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,
      "os": {
        "build": "string",
        "name": "string",
        "version": "string"
      },
      "protocol": "IP",
      "type": {
        "detected_id": 0,
        "id": 0,
        "label": "string"
      },
      "user_data": {
        "model": "string",
        "name": "string",
        "type": 0,
        "vendor": "string"
      }
    },
    "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 AgentBase false none
» agent_id integer(int32) false The id of the agent
» device AbstractDevice false Base abstract class for all devices
» 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

{
  "allowed_ip": "string",
  "port": 0,
  "protocol": "http",
  "ttl_hours": 1
}

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.
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.
- 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.
ttl_hours integer(int32) false The duration in hours of the connection.

Enumerated Values

Property Value
protocol http
protocol https
protocol tcp
protocol ssh
protocol rdp

DeviceCredentials

{
  "password": "string",
  "scope": "DEVICE_MANAGEMENT",
  "username": "string"
}

Properties

Name Type Required Description
password string true password
scope string false The Scope for the Credentials. Default is 'DEVICE_MANAGEMENT' used for device integrations
username string true username

Enumerated Values

Property Value
scope CUSTOM_DRIVER_MANAGEMENT
scope CONFIGURATION_MANAGEMENT
scope DEVICE_MANAGEMENT
scope OS_MANAGEMENT

DeviceDiscoveryEvent

{
  "data": {
    "agent": {
      "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,
      "installation_info": {
        "contract_id": "string",
        "customer_id": "string"
      },
      "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"
      },
      "organization": {
        "id": 0,
        "name": "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"
      }
    },
    "agent_id": 0,
    "device": {
      "authentication_status": "NO_AUTHENTICATION",
      "details": {
        "firmware_version": "string",
        "room": "string",
        "serial": "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,
      "os": {
        "build": "string",
        "name": "string",
        "version": "string"
      },
      "protocol": "IP",
      "type": {
        "detected_id": 0,
        "id": 0,
        "label": "string"
      },
      "user_data": {
        "model": "string",
        "name": "string",
        "type": 0,
        "vendor": "string"
      }
    },
    "device_id": 0
  },
  "name": "agent_device_discovery",
  "timestamp": "2019-08-24T14:15:22Z"
}

Triggered when a new device appears on the network

Properties

Name Type Required Description
data object false none
» agent AgentBase false none
» agent_id integer(int32) false The id of the agent
» device AbstractDevice false Base abstract class for all devices
» device_id integer(int32) false The id of the device
name string true none
timestamp string(date-time) true The timestamp of the event

Enumerated Values

Property Value
name agent_device_discovery

DeviceEyeSNMPHistorySample

{
  "enum_value": "string",
  "timestamp": "2019-08-24T14:15:22Z",
  "value": "string"
}

Properties

Name Type Required Description
enum_value string false none
timestamp string(date-time) true The time the sample was reported to Domotz
value string true none

DeviceHeartbeatLostEvent

{
  "data": {
    "agent": {
      "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,
      "installation_info": {
        "contract_id": "string",
        "customer_id": "string"
      },
      "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"
      },
      "organization": {
        "id": 0,
        "name": "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"
      }
    },
    "agent_id": 0,
    "device": {
      "authentication_status": "NO_AUTHENTICATION",
      "details": {
        "firmware_version": "string",
        "room": "string",
        "serial": "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,
      "os": {
        "build": "string",
        "name": "string",
        "version": "string"
      },
      "protocol": "IP",
      "type": {
        "detected_id": 0,
        "id": 0,
        "label": "string"
      },
      "user_data": {
        "model": "string",
        "name": "string",
        "type": 0,
        "vendor": "string"
      }
    },
    "device_id": 0
  },
  "name": "device_heartbeat_lost",
  "timestamp": "2019-08-24T14:15:22Z"
}

Triggered when a device does not respond to a ping

Properties

Name Type Required Description
data object false none
» agent AgentBase false none
» agent_id integer(int32) false The id of the agent
» device AbstractDevice false Base abstract class for all devices
» 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_heartbeat_lost

DeviceHistory

{
  "details": {
    "new_ip": [
      "string"
    ],
    "old_ip": [
      "string"
    ]
  },
  "timestamp": "2019-08-24T14:15:22Z",
  "type": "IP_CHANGE"
}

Properties

Name Type Required Description
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

DeviceIPChangeEvent

{
  "data": {
    "agent": {
      "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,
      "installation_info": {
        "contract_id": "string",
        "customer_id": "string"
      },
      "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"
      },
      "organization": {
        "id": 0,
        "name": "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"
      }
    },
    "agent_id": 0,
    "device": {
      "authentication_status": "NO_AUTHENTICATION",
      "details": {
        "firmware_version": "string",
        "room": "string",
        "serial": "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,
      "os": {
        "build": "string",
        "name": "string",
        "version": "string"
      },
      "protocol": "IP",
      "type": {
        "detected_id": 0,
        "id": 0,
        "label": "string"
      },
      "user_data": {
        "model": "string",
        "name": "string",
        "type": 0,
        "vendor": "string"
      }
    },
    "device_id": 0,
    "old_ip_addresses": [
      "string"
    ],
    "value": [
      "string"
    ]
  },
  "name": "device_ip_change",
  "timestamp": "2019-08-24T14:15:22Z"
}

Triggered when the device IP address changes

Properties

Name Type Required Description
data object false none
» agent AgentBase false none
» agent_id integer(int32) false The id of the agent
» device AbstractDevice false Base abstract class for all devices
» device_id integer(int32) true The id of the device
» old_ip_addresses [string] false The list of previous IP addresses
» value [string] false The list of new IP addresses
name string true none
timestamp string(date-time) true The timestamp of the event

Enumerated Values

Property Value
name device_ip_change

DeviceInventoryField

{
  "creation_time": "2019-08-24T14:15:22Z",
  "key": "string",
  "value": "string"
}

A device inventory field

Properties

Name Type Required Description
creation_time string(date-time) false none
key string true The name of the field, unique in the Inventory
value string true none

DevicePowerAction

{
  "cycle": true,
  "off": true,
  "on": true,
  "software_reboot": true
}

Properties

Name Type Required Description
cycle boolean false Indicates that a power cycle on the device is possible. Available if the device is connected to just one PDU.
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.

DeviceRTDHistorySample

{
  "lost_packet_count": 0,
  "max": "string",
  "median": "string",
  "min": "string",
  "sent_packet_count": 0,
  "timestamp": "2019-08-24T14:15:22Z"
}

Properties

Name Type Required Description
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

DeviceRTDIssueEvent

{
  "data": {
    "agent": {
      "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,
      "installation_info": {
        "contract_id": "string",
        "customer_id": "string"
      },
      "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"
      },
      "organization": {
        "id": 0,
        "name": "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"
      }
    },
    "agent_id": 0,
    "device": {
      "authentication_status": "NO_AUTHENTICATION",
      "details": {
        "firmware_version": "string",
        "room": "string",
        "serial": "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,
      "os": {
        "build": "string",
        "name": "string",
        "version": "string"
      },
      "protocol": "IP",
      "type": {
        "detected_id": 0,
        "id": 0,
        "label": "string"
      },
      "user_data": {
        "model": "string",
        "name": "string",
        "type": 0,
        "vendor": "string"
      }
    },
    "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"
}

Triggered when the Round-Trip-Delay values of a device exceeds the defined thresholds

Properties

Name Type Required Description
data object false none
» agent AgentBase false none
» agent_id integer(int32) false The id of the agent
» device AbstractDevice false Base abstract class for all devices
» device_id integer(int32) true The id of the device
» status string false none
» threshold object false none
»» latency integer(int32) false The configured latency threshold
»» packet_loss_percentage integer(int32) false The configured packet loss percentage threshold
» value object false none
»» latency integer(int32) false The current latency value
»» packet_loss_percentage integer(int32) false The current packet loss percentage value
» name string true none
» timestamp string(date-time) true The timestamp of the event

Enumerated Values

Property Value
status RTD_ISSUE_DETECTED
status RTD_ISSUE_RESOLVED
name device_rtd

DeviceRTDStatistics

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

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

DeviceSNMPEvent

{
  "data": {
    "agent": {
      "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,
      "installation_info": {
        "contract_id": "string",
        "customer_id": "string"
      },
      "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"
      },
      "organization": {
        "id": 0,
        "name": "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"
      }
    },
    "agent_id": 0,
    "device": {
      "authentication_status": "NO_AUTHENTICATION",
      "details": {
        "firmware_version": "string",
        "room": "string",
        "serial": "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,
      "os": {
        "build": "string",
        "name": "string",
        "version": "string"
      },
      "protocol": "IP",
      "type": {
        "detected_id": 0,
        "id": 0,
        "label": "string"
      },
      "user_data": {
        "model": "string",
        "name": "string",
        "type": 0,
        "vendor": "string"
      }
    },
    "device_id": 0,
    "enum_value": "string",
    "trigger_name": "string",
    "value": "string"
  },
  "name": "device_snmp",
  "timestamp": "2019-08-24T14:15:22Z"
}

Triggered when the status of an SNMP value changes

Properties

Name Type Required Description
data object false none
» agent AgentBase false none
» agent_id integer(int32) false The id of the agent
» device AbstractDevice false Base abstract class for all devices
» device_id integer(int32) true The id of the device
» enum_value string false The current enum value of the SNMP sensor if the OID is of type enum
» trigger_name string false none
» value string false The current value of the SNMP sensor
name string true none
timestamp string(date-time) true The timestamp of the event

Enumerated Values

Property Value
name device_snmp

DeviceSnmpCommunity

{
  "read": "string",
  "write": "string"
}

Properties

Name Type Required Description
read string true Defines new read snmp community
write string false Defines new write snmp community (defaults to read community if not used)

DeviceStatusChangeEvent

{
  "data": {
    "agent": {
      "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,
      "installation_info": {
        "contract_id": "string",
        "customer_id": "string"
      },
      "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"
      },
      "organization": {
        "id": 0,
        "name": "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"
      }
    },
    "agent_id": 0,
    "device": {
      "authentication_status": "NO_AUTHENTICATION",
      "details": {
        "firmware_version": "string",
        "room": "string",
        "serial": "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,
      "os": {
        "build": "string",
        "name": "string",
        "version": "string"
      },
      "protocol": "IP",
      "type": {
        "detected_id": 0,
        "id": 0,
        "label": "string"
      },
      "user_data": {
        "model": "string",
        "name": "string",
        "type": 0,
        "vendor": "string"
      }
    },
    "device_id": 0,
    "value": "UP"
  },
  "name": "device_status",
  "timestamp": "2019-08-24T14:15:22Z"
}

Triggered when the status of a device changes

Properties

Name Type Required Description
data object false none
» agent AgentBase false none
» agent_id integer(int32) false The id of the agent
» device AbstractDevice false Base abstract class for all devices
» device_id integer(int32) true The id of the device
» value string false none
name string true none
timestamp string(date-time) true The timestamp of the event

Enumerated Values

Property Value
value UP
value DOWN
name device_status

DeviceTCPEvent

{
  "data": {
    "agent": {
      "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,
      "installation_info": {
        "contract_id": "string",
        "customer_id": "string"
      },
      "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"
      },
      "organization": {
        "id": 0,
        "name": "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"
      }
    },
    "agent_id": 0,
    "device": {
      "authentication_status": "NO_AUTHENTICATION",
      "details": {
        "firmware_version": "string",
        "room": "string",
        "serial": "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,
      "os": {
        "build": "string",
        "name": "string",
        "version": "string"
      },
      "protocol": "IP",
      "type": {
        "detected_id": 0,
        "id": 0,
        "label": "string"
      },
      "user_data": {
        "model": "string",
        "name": "string",
        "type": 0,
        "vendor": "string"
      }
    },
    "device_id": 0,
    "value": [
      {
        "port": 0,
        "status": "UP"
      }
    ]
  },
  "name": "device_tcp",
  "timestamp": "2019-08-24T14:15:22Z"
}

Triggered when the status of a monitored TCP service changes

Properties

Name Type Required Description
data object false none
» agent AgentBase false none
» agent_id integer(int32) false The id of the agent
» device AbstractDevice false Base abstract class for all devices
» device_id integer(int32) true The id of the device
» value [object] false none
»» port integer(int32) false none
»» status string false none
» name string true none
» timestamp string(date-time) true The timestamp of the event

Enumerated Values

Property Value
status UP
status DOWN
name device_tcp

DeviceUptime

{
  "agent_uptime": "string",
  "downtime_intervals": [
    {
      "end": "2019-08-24T14:15:22Z",
      "start": "2019-08-24T14:15:22Z"
    }
  ],
  "online_seconds": 0,
  "total_seconds": 0,
  "uptime": "string"
}

Properties

Name Type Required Description
agent_uptime string true The uptime percentage of the agent
downtime_intervals [object] false none
» end string(date-time) false none
» start string(date-time) false none
online_seconds integer(int32) true none
total_seconds integer(int32) true none
uptime string true The uptime percentage of the device

DeviceVariable

{
  "creation_time": "2019-08-24T14:15:22Z",
  "has_history": true,
  "id": 0,
  "label": "string",
  "metric": "string",
  "path": "string",
  "previous_value": "string",
  "unit": "string",
  "value": "string",
  "value_update_time": "2019-08-24T14:15:22Z"
}

The representation of a device variable

Properties

Name Type Required Description
creation_time string(date-time) false The creation time of the variable
has_history boolean true If true the history of the variable can be retrieved with getVariableHistory
id integer(int32) true The ID of the variable
label string false The label
metric string false The metric
path string true The variable path
previous_value string false The previous value of the variable
unit string false The unit of measurement
value string false The variable value
value_update_time string(date-time) false The update time of the variable value

DomotzEyesUsageInformation

{
  "limit": 0,
  "usage": {
    "snmp": 0,
    "tcp": 0,
    "total": 0
  }
}

Information about Domotz Sensors current usage and limits

Properties

Name Type Required Description
limit integer(int32) false Number of allowed Domotz Sensors for the agent
usage object false none
» snmp integer(int32) false Number of configured Domotz Sensors of type snmp on the agent.
» tcp integer(int32) false Number of configured Domotz Sensors of type tcp on the agent.
» total integer(int32) false Number of configured Domotz Sensors on the agent.

DomotzMetricUsageInformation

{
  "limit": 0,
  "usage": {
    "custom_driver": 0,
    "snmp": 0,
    "tcp": 0,
    "total": 0
  }
}

Information about Domotz Sensors current usage and limits

Properties

Name Type Required Description
limit integer(int32) false Number of allowed Domotz Sensors for the agent
usage object false none
» custom_driver integer(int32) false Number of configured Domotz Sensors of type custom driver on the agent.
» snmp integer(int32) false Number of configured Domotz Sensors of type snmp on the agent.
» tcp integer(int32) false Number of configured Domotz Sensors of type tcp on the agent.
» total integer(int32) false Number of configured Domotz Sensors on the agent.

DummyDevice

{
  "authentication_status": "NO_AUTHENTICATION",
  "details": {
    "firmware_version": "string",
    "room": "string",
    "serial": "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,
  "os": {
    "build": "string",
    "name": "string",
    "version": "string"
  },
  "protocol": "IP",
  "type": {
    "detected_id": 0,
    "id": 0,
    "label": "string"
  },
  "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

ExternalHost

{
  "host": "string",
  "name": "string"
}

Properties

Name Type Required Description
host string true Hostname or IP Address
name string true Device Name

ExternalIpDevice

{
  "authentication_status": "NO_AUTHENTICATION",
  "details": {
    "firmware_version": "string",
    "room": "string",
    "serial": "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,
  "os": {
    "build": "string",
    "name": "string",
    "version": "string"
  },
  "protocol": "IP",
  "type": {
    "detected_id": 0,
    "id": 0,
    "label": "string"
  },
  "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",
  "open_ports": {
    "tcp": [
      0
    ],
    "udp": [
      0
    ]
  },
  "status": "ONLINE",
  "vendor": "string",
  "names": {
    "host": "string",
    "inspection": "string"
  }
}

Properties

allOf

Name Type Required Description
anonymous IpDevice false none

and

Name Type Required Description
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
» names object false none
»» host string false none
»» inspection string false none

FeatureDiscoveryEvent

{
  "data": {
    "agent": {
      "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,
      "installation_info": {
        "contract_id": "string",
        "customer_id": "string"
      },
      "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"
      },
      "organization": {
        "id": 0,
        "name": "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"
      }
    },
    "agent_id": 0,
    "device": {
      "authentication_status": "NO_AUTHENTICATION",
      "details": {
        "firmware_version": "string",
        "room": "string",
        "serial": "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,
      "os": {
        "build": "string",
        "name": "string",
        "version": "string"
      },
      "protocol": "IP",
      "type": {
        "detected_id": 0,
        "id": 0,
        "label": "string"
      },
      "user_data": {
        "model": "string",
        "name": "string",
        "type": 0,
        "vendor": "string"
      }
    },
    "device_id": 0,
    "feature": "mib_discovery",
    "value": {
      "data": {}
    }
  },
  "name": "agent_feature_discovery",
  "timestamp": "2019-08-24T14:15:22Z"
}

Triggered when a new feature is discovered on a device

Properties

Name Type Required Description
data object false none
» agent AgentBase false none
» agent_id integer(int32) false The id of the agent
» device AbstractDevice false Base abstract class for all devices
» device_id integer(int32) false The id of the device
» feature string false The discovered feature
» value object false none
»» data object false none
» name string true none
» timestamp string(date-time) true The timestamp of the event

Enumerated Values

Property Value
feature mib_discovery
name agent_feature_discovery

InventoryField

{
  "label": "string",
  "creation_time": "2019-08-24T14:15:22Z",
  "defined_by_user": 0,
  "key": "string"
}

Properties

allOf

Name Type Required Description
anonymous WriteInventoryField false DTO Used for creating/updating Inventory fields

and

Name Type Required Description
anonymous object false DTO Returned by the API describing an Inventory Field
» creation_time string(date-time) false none
» defined_by_user integer(int32) false The id of the user that defined the inventory field - if different from your id, this field can't be deleted or changed
» key string true The name of the field, unique in the Inventory

IpDevice

{
  "authentication_status": "NO_AUTHENTICATION",
  "details": {
    "firmware_version": "string",
    "room": "string",
    "serial": "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,
  "os": {
    "build": "string",
    "name": "string",
    "version": "string"
  },
  "protocol": "IP",
  "type": {
    "detected_id": 0,
    "id": 0,
    "label": "string"
  },
  "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",
  "open_ports": {
    "tcp": [
      0
    ],
    "udp": [
      0
    ]
  },
  "status": "ONLINE",
  "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 Base abstract class for all IP devices
» agent_reachable boolean false When true the device is reachable by the agent over an IP network. When false Domotz 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 is ONLINE and its value is false because 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.
» grace_period integer(int32) false The number of seconds a device must be unreachable before being declared DOWN
» ip_addresses [string] false none
» last_status_change string(date-time) false none
» model string false none
» open_ports object false The list of TCP and UDP open ports. Domotz scans a subset of all the ports, visit the user guide for more details.
»» tcp [integer] false none
»» udp [integer] false none
» status string false none
» vendor string false none

Enumerated Values

Property Value
status ONLINE
status OFFLINE
status DOWN
status HIDDEN

LocalIpDevice

{
  "authentication_status": "NO_AUTHENTICATION",
  "details": {
    "firmware_version": "string",
    "room": "string",
    "serial": "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,
  "os": {
    "build": "string",
    "name": "string",
    "version": "string"
  },
  "protocol": "IP",
  "type": {
    "detected_id": 0,
    "id": 0,
    "label": "string"
  },
  "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",
  "open_ports": {
    "tcp": [
      0
    ],
    "udp": [
      0
    ]
  },
  "status": "ONLINE",
  "vendor": "string",
  "hw_address": "string",
  "is_jammed": true,
  "names": {
    "bonjour": "string",
    "dhcp": "string",
    "host": "string",
    "inspection": "string",
    "netbios": "string",
    "snmp": "string",
    "upnp": "string",
    "zeroconf": "string"
  }
}

Properties

allOf

Name Type Required Description
anonymous IpDevice false none

and

Name Type Required Description
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
» names object false none
»» bonjour string false none
»» dhcp string false none
»» host string false none
»» inspection string false none
»» netbios string false none
»» snmp string false none
»» upnp string false none
»» zeroconf string false none

MibDiscoveryEvent

{
  "data": {
    "agent": {
      "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,
      "installation_info": {
        "contract_id": "string",
        "customer_id": "string"
      },
      "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"
      },
      "organization": {
        "id": 0,
        "name": "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"
      }
    },
    "agent_id": 0,
    "device": {
      "authentication_status": "NO_AUTHENTICATION",
      "details": {
        "firmware_version": "string",
        "room": "string",
        "serial": "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,
      "os": {
        "build": "string",
        "name": "string",
        "version": "string"
      },
      "protocol": "IP",
      "type": {
        "detected_id": 0,
        "id": 0,
        "label": "string"
      },
      "user_data": {
        "model": "string",
        "name": "string",
        "type": 0,
        "vendor": "string"
      }
    },
    "device_id": 0,
    "feature": "mib_discovery",
    "value": {
      "data": {
        "mib": [
          "string"
        ]
      }
    }
  },
  "name": "agent_feature_discovery",
  "timestamp": "2019-08-24T14:15:22Z"
}

Properties

allOf

Name Type Required Description
anonymous FeatureDiscoveryEvent false Triggered when a new feature is discovered on a device

and

Name Type Required Description
anonymous object false Triggered when a new feature MIB is discovered on a device
» data object false none
»» agent AgentBase false none
»» device AbstractDevice false Base abstract class for all devices
»» value object false none
»»» data object false none
»»»» mib [string] false The discovered MIB

MonitoringProfileStateChanged

{
  "data": {
    "agent": {
      "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,
      "installation_info": {
        "contract_id": "string",
        "customer_id": "string"
      },
      "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"
      },
      "organization": {
        "id": 0,
        "name": "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"
      }
    },
    "details": {},
    "device": {
      "authentication_status": "NO_AUTHENTICATION",
      "details": {
        "firmware_version": "string",
        "room": "string",
        "serial": "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,
      "os": {
        "build": "string",
        "name": "string",
        "version": "string"
      },
      "protocol": "IP",
      "type": {
        "detected_id": 0,
        "id": 0,
        "label": "string"
      },
      "user_data": {
        "model": "string",
        "name": "string",
        "type": 0,
        "vendor": "string"
      }
    },
    "metric": "string",
    "monitoring_profile": {
      "name": "string"
    },
    "state": {
      "current": "string",
      "previous": "string"
    },
    "value": {
      "current": {},
      "previous": {}
    },
    "variable": {
      "creation_time": "2019-08-24T14:15:22Z",
      "has_history": true,
      "id": 0,
      "label": "string",
      "metric": "string",
      "path": "string",
      "previous_value": "string",
      "unit": "string",
      "value": "string",
      "value_update_time": "2019-08-24T14:15:22Z"
    }
  },
  "name": "monitoring_profile_state_changed",
  "timestamp": "2019-08-24T14:15:22Z"
}

Triggered when a monitoring profile state changes

Properties

Name Type Required Description
data object false none
» agent AgentBase false none
» details object false none
» device AbstractDevice false Base abstract class for all devices
» metric string true none
» monitoring_profile object false none
»» name string true none
» state object false none
»» current string false none
»» previous string false none
» value object false none
»» current object false none
»» previous object false none
» variable DeviceVariable false The representation of a device variable
name string true none
timestamp string(date-time) true The timestamp of the event

Enumerated Values

Property Value
name monitoring_profile_state_changed

NetworkSpeedSample

{
  "timestamp": "2019-08-24T14:15:22Z",
  "values": [
    0
  ]
}

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 Type Required Description
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

NetworkTopology

{
  "edges": [
    {
      "from": 0,
      "to": 0
    }
  ]
}

Properties

Name Type Required Description
edges [object] true The list of edges. Each item contains the IDs of the connected devices.
» from integer(int32) true none
» to integer(int32) true none

RoutedNetwork

{
  "address": "string",
  "name": "string",
  "netmask": 0
}

Properties

Name Type Required Description
address string true none
name string true none
netmask integer(int32) true none

SNMPDomotzAgentEye

{
  "category": "OTHER",
  "device_id": 0,
  "id": 0,
  "name": "string",
  "oid": "string",
  "value_type": "STRING"
}

Information about a configured SNMP Domotz Sensor

Properties

Name Type Required Description
category string true The category of the OID
device_id integer(int32) false The unique identifier of the device
id integer(int32) true The ID of the SNMP Domotz Sensor
name string true The name of the Domotz Sensors
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
value_type ENUM

SNMPDomotzAuthentication

{
  "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
authentication_protocol SHA-224
authentication_protocol SHA-256
authentication_protocol SHA-384
authentication_protocol SHA-512
encryption_protocol DES
encryption_protocol AES
encryption_protocol AES-256B
encryption_protocol AES-256R
version V2
version V1
version V3_AUTH_PRIV
version V3_NO_AUTH
version V3_AUTH_NO_PRIV

SNMPDomotzEye

{
  "category": "OTHER",
  "device_id": 0,
  "id": 0,
  "last_update": "2019-08-24T14:15:22Z",
  "latest_enum_value": "string",
  "latest_value": "string",
  "name": "string",
  "oid": "string",
  "value_type": "STRING"
}

Information about a configured SNMP Domotz Sensor

Properties

Name Type Required Description
category string true The category of the OID
device_id integer(int32) false The unique identifier of the device
id integer(int32) true The ID of the SNMP Domotz Sensor
last_update string(date-time) true The timestamp of the latest update
latest_enum_value string false The enum value retrieved on the OID
latest_value string true The value retrieved on the OID
name string true The name of the Domotz Sensors
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
value_type ENUM

SNMPDomotzEyeCreation

{
  "category": "OTHER",
  "name": "string",
  "oid": "string",
  "value_type": "STRING"
}

SNMP Domotz Sensor Data

Properties

Name Type Required Description
category string true The category of the OID
name string true The name of the Domotz Sensors
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
value_type ENUM

SNMPDomotzEyeTrigger

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

{
  "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
value_types ENUM

SNMPDomotzSnmpTriggerAlertCreation

{}

SNMP Trigger Alert

Properties

None

SNMPDomotzSnmpTriggerCreation

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

{
  "authentication_status": "NO_AUTHENTICATION",
  "details": {
    "firmware_version": "string",
    "room": "string",
    "serial": "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,
  "os": {
    "build": "string",
    "name": "string",
    "version": "string"
  },
  "protocol": "IP",
  "type": {
    "detected_id": 0,
    "id": 0,
    "label": "string"
  },
  "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",
  "open_ports": {
    "tcp": [
      0
    ],
    "udp": [
      0
    ]
  },
  "status": "ONLINE",
  "vendor": "string",
  "names": {
    "bonjour": "string",
    "host": "string",
    "inspection": "string",
    "snmp": "string",
    "upnp": "string"
  }
}

Properties

allOf

Name Type Required Description
anonymous IpDevice false none

and

Name Type Required Description
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
» names object false none
»» bonjour string false none
»» host string false none
»» inspection string false none
»» snmp string false none
»» upnp string false none

TCPDomotzEye

{
  "device_id": 0,
  "id": 0,
  "last_update": "2019-08-24T14:15:22Z",
  "port": 0,
  "status": "UP"
}

Information about a configured TCP Domotz Sensor

Properties

Name Type Required Description
device_id integer(int32) false The unique identifier of the device
id integer(int32) true The ID of the TCP Domotz Sensor
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

{
  "port": 0
}

TCP Domotz Sensor Data

Properties

Name Type Required Description
port integer(int32) true The port number

Team

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

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

{
  "id": 0,
  "name": "string"
}

Properties

Name Type Required Description
id integer(int32) false none
name string false none

VariableHistorySample

{
  "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 The sample value

WriteInventoryField

{
  "label": "string"
}

DTO Used for creating/updating Inventory fields

Properties

Name Type Required Description
label string true A detailed description of the field, for documentation