Query container assets
GET
/container/<containerId>/assets?fields=...
Description
Query all assets for a given container. (removed assets are not included).
Path parameters
Param |
Description |
containerId |
Container Id. |
Query parameters
Param |
Default |
Description |
fields |
id |
Fields to return (see fields below for all available fields). |
collectors |
none |
Collector fields. If at least one field is given, the result will include "collectors" with an array of collector objects (see Collectors below for all available collector fields). |
kind |
none |
Only assets with the given kind (e.g kind=Windows). |
not-kind |
none |
Only assets with another kind than the given kind (e.g not-kind=Asset). |
mode |
none |
Only assets with the given mode (e.g mode=normal). |
not-mode |
none |
Only assets with another mode than the given mode (e.g not-mode=disabled). |
collector |
none |
Only assets with the given collector (e.g collector=tcp). |
not-collector |
none |
Only assets without the given collector (e.g not-collector=wmi). |
label |
none |
Only assets with the given label Id (e.g label=123). |
not-label |
none |
Only assets without the given label Id (e.g not-label=456). |
Fields
Field |
Return type |
Description |
id |
integer |
Asset Id. |
container |
integer |
Asset container Id (Equal to containerId). |
name |
string |
Asset name. |
kind |
string |
One of the kinds (see set-kind api) |
description |
string |
Asset description. |
mode |
string |
One of normal , maintenance or disabled . |
labels |
array(integer) |
List with label Ids. |
disabledChecks |
array(object) |
List with check objects. Each check object contains a collector and check property, both with the key as value. |
Collectors
Collector field |
Return type |
Description |
key |
string |
Collector key. |
name |
string |
Collector name. |
kind |
string |
One of agent , probe or service . |
config |
object/null |
Configuration for the collector if config exists. |
Return codes
Error code |
Reason |
200 |
Success. |
400 |
Unknown field. |
401 |
Invalid or missing token. |
403 |
Insufficient permissions (required: API +READ ). |
404 |
Container not found. |
Example
Curl request:
curl \
-X GET 'https://api.infrasonar.com/container/123/assets?fields=id,name,mode' \
-H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
Response:
[
{
"id": 123,
"name": "my-host.local",
"mode": "normal"
}
]