Query asset
GET
/asset/<assetId>?fields=...
Description
Query asset details.
Path parameters
Param |
Description |
assetId |
Asset Id. |
Query parameters
Param |
Default |
Description |
fields |
all fields |
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). |
Fields
Field |
Return type |
Description |
id |
integer |
Asset Id. |
container |
integer |
Asset container Id. |
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. |
properties |
array(object) |
List with property object. Each property container a key and value property. |
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 |
Asset not found. |
Example
Curl request:
curl \
-X GET 'https://api.infrasonar.com/asset/123' \
-H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
Response:
{
"id": 123,
"name": "my-host.local",
"kind": "Asset",
"description": "My host",
"mode": "normal",
"labels": [456, 789],
"disabledChecks": [],
"properties": [{
"key": "myProp",
"value": "some value"
}]
}