Domotz Public API v1.10.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.
Authentication
- API Key (api_key)
- Parameter Name: X-Api-Key, in: header. Get you API Key from the Domotz Portal or contact us
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 |
|
» 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 |
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": "AUTHENTICATED",
"details": {
"firmware_version": "string",
"room": "string",
"snmp_read_community": "string",
"snmp_write_community": "string",
"zone": "string"
},
"display_name": "string",
"first_seen_on": "2019-08-24T14:15:22Z",
"id": 0,
"importance": "VITAL",
"main_id": 0,
"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 | AUTHENTICATED |
authentication_status | NO_AUTHENTICATION |
authentication_status | PENDING |
authentication_status | REQUIRED |
authentication_status | WRONG_CREDENTIALS |
importance | VITAL |
importance | FLOATING |
protocol | IP |
protocol | DUMMY |
protocol | IP_EXTERNAL |
status | ONLINE |
status | OFFLINE |
status | DOWN |
status | HIDDEN |
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 having the Booster Pack
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
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 |
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": "AUTHENTICATED",
"details": {
"firmware_version": "string",
"room": "string",
"snmp_read_community": "string",
"snmp_write_community": "string",
"zone": "string"
},
"display_name": "string",
"first_seen_on": "2019-08-24T14:15:22Z",
"id": 0,
"importance": "VITAL",
"main_id": 0,
"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 | AUTHENTICATED |
authentication_status | NO_AUTHENTICATION |
authentication_status | PENDING |
authentication_status | REQUIRED |
authentication_status | WRONG_CREDENTIALS |
importance | VITAL |
importance | FLOATING |
protocol | IP |
protocol | DUMMY |
protocol | IP_EXTERNAL |
status | ONLINE |
status | OFFLINE |
status | DOWN |
status | HIDDEN |
getDevicePowerActions
Code samples
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 having the Booster Pack
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
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.
- snmp_read_community and snmp_write_community are relevant only for V1 and V2.
- V3_NO_AUTH requires a valid username.
- V3_AUTH_NO_PRIV requires username, authentication_protocol and authentication_key.
- V3_AUTH_PRIV requires username, authentication_protocol, authentication_key, encryption_protocol and encryption_key.
Body parameter
{
"authentication_key": "string",
"authentication_protocol": "MD5",
"encryption_key": "string",
"encryption_protocol": "DES",
"snmp_read_community": "string",
"snmp_write_community": "string",
"username": "string",
"version": "V2"
}
Curl
curl -X 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 |
body | body | string | true | The value that the field will change to |
Enumerated Values
Parameter | Value |
---|---|
field | importance |
field | user_data/model |
field | user_data/type |
field | user_data/name |
field | user_data/vendor |
field | details/room |
field | details/zone |
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | 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 |
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 | |
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 | |
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 |
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 |
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 |
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 |
networking
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. A set of IP addresses to be always scanned can be specified in the forced_ip_addresses
array.
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"
]
}
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"
]
}';
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
will be scanned regardless of the automatic discovery settings of the agent.
Body parameter
{
"forced_ip_addresses": [
"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 |
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
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
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
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
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
[
{
"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] |
» 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