Upsert collector to asset
POST /asset/<assetId>/collector/<collectorKey>
Description
Add or configure a collector on an asset. If the collector is already attached to the asset, the configuration will be updated unless no configuration is provided in the body.
Path parameters
| Param | Description |
|---|---|
assetId |
Asset Id. |
collectorKey |
Collector key. |
Query parameters
none
Body
| Param | Type | Required | Description |
|---|---|---|---|
config |
Object | Depends | Configuration of the collector. |
A body might be required for some collectors. For most collectors the config field is optional.
Return codes
| Error code | Reason |
|---|---|
204 |
Success. |
400 |
Invalid body. |
401 |
Invalid or missing token. |
403 |
Insufficient permissions (required: API+ASSET_MANAGEMENT). |
404 |
Asset or collector not found. |
Example
Curl request: (no config required for docker agent)
curl \
-X POST 'https://api.infrasonar.com/asset/123/collector/docker' \
-H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'