Sensors#
Create a Sensor#
To create a Sensor POST
an AddSensorRequest
to the base URL:
curl -X POST "https://api.mnemonic.no/sensors/v1/sensor" -H "Argus-API-Key: my/api/key" -H "accept: application/json" -H "Content-Type: application/json"
-d '{
"sslTerminating": true,
"location": "1",
"customer": "1",
"application": "1",
"clusterSensorID": 0,
"expectedUpdateTime": 0,
"scheduledDowntimeFromTime": 0,
"scheduledDowntimeUntilTime": 0,
"information": "Optional information",
"hostname": "01-example-01.hostname.no",
"additionalData": "Optional additional data",
"active": false,
"monitored": false,
"monitoredOnlyDaytime": false,
"initialTuning": false,
"overrideDefaultUpdateTime": false,
"sharedCustomerData": false,
"ipAddress": "10.0.0.1"
}'
For such a request to be successful:
The user must have the
addSensor
permission for the Customer they’re creating to Sensor for, a role that grants it, or belong to a group with said permissionThe Customer for whom we want to create the Sensor must exist
The Location where the Sensor will be created must exist
The Application (Sensor Type) for the Sensor must be valid
At least one of Hostname or IP must be present in the payload
If clustering, the targeted Sensor must exist, belong to the same Customer, and be the same Sensor Type
Note
IP or Hostname
One of or both IP or Hostname must be provided when creating a Sensor. IPs and hostnames must be unique per Customer.
Get a Sensor#
To GET
a Sensor, append the sensorID to the base URL:
curl -X GET "https://api.mnemonic.no/sensors/v1/sensor/{sensorID}" -H "accept: application/json" -H "Argus-API-Key: my/api/key"
For the request to be successful:
The user must have the viewSensors permission for the Sensor’s customer, a role that grants it, or belong to a group with said permission
The Sensor must exist
Update a Sensor#
To update a Sensor, PUT
an UpdateSensorRequest
via PUT
to the base URL
with the sensor’s ID appended:
curl -X PUT "https://api.mnemonic.no/sensors/v1/sensor/{sensorID}" -H "Argus-API-Key: my/api/key" -H "accept: application/json" -H "Content-Type: application/json"
-d '{
"sslTerminating": true,
"location": "1",
"application": "1",
"clusterSensorID": 0,
"expectedUpdateTime": 0,
"information": "Optional updated information",
"hostname": "01-example-01.new.hostname.no",
"additionalData": "Optional updated additional data",
"initialTuning": false,
"overrideDefaultUpdateTime": false,
"sharedCustomerData": false,
"ipAddress": "10.0.0.2"
}'
For the request to be successful:
The user must have the
updateSensor
permission for the Sensor’s customer, a role that grants it, or belong to a group with said permissionThe Sensor must exist
When updating the Sensor’s Location
The Location must exist
The Location must belong to the same Customer as the Sensor
When updating the IP or hostname
The proposed IP or hostname must be unique to the Customer
One of either values must always be present and not empty e.g. if erasing a Sensor’s hostname then the IP must either already be set or will be set by the same update request
When updating the cluster Sensor
The proposed cluster Sensor must exist
The user must have permission to access the cluster Sensor
A Sensor cannot be clustered with itself
The proposed cluster Sensor must not already be bound to another Sensor
The proposed cluster Sensor must belong to the same Customer
The proposed cluster Sensor must be of the same Sensor Type
When updating the Sensor Type
The new Sensor Type must be valid and exist
When overriding the default update time
The proposed update time must be valid
The
OVERRIDE_UPDATE_TIME
flag must either be already set or is set in the request
Only these fields can be set to blank
additional data
sensor information
IP/hostname IF the other value is present
Note
Dedicated Sensor Updates
Changing a Sensor’s status, monitoring behaviour, and scheduling of downtime is handled by dedicated endpoints and request. Not via the update endpoint.
Enable a Sensor#
To activate a Sensor simply append /enable
to the Sensor’s path:
curl -X PUT "https://api.mnemonic.no/sensors/v1/sensor/{sensorID}/enable" -H "Argus-API-Key: my/api/key"
For the request to be successful:
The user must have the
enableSensor
permission for the Sensor’s customer, a role that grants it, or belong to a group with said permissionThe Sensor must exist
If the Sensor is already enabled the service will return an error
Bulk Enable Sensors#
To bulk activate Sensors PUT
an EnableSensorBulkRequest
to the bulk
enable endpoint :
curl -X PUT "https://api.mnemonic.no/sensors/v1/sensor/bulk/enable" -H "accept: application/json" -H "Content-Type: application/json" -H "Argus-API-Key: my/api/key"
-d '{
"sensorIDs": [
1,
2,
3
]
}'
For the request to be successful:
The user must have the
enableSensor
permission for the Sensors’ customer(s), a role that grants it, or belong to a group with said permissionThe Sensors must exist
Disable a Sensor#
To deactivate a Sensor simply append /disable to the Sensor’s path:
curl -X PUT "https://api.mnemonic.no/sensors/v1/sensor/{sensorID}/disable" -H "Argus-API-Key: my/api/key"
For the request to be successful
The user must have the
disableSensor
permission for the Sensor’s customer, a role that grants it, or belong to a group with said permissionThe Sensor must exist
If the Sensor is already disabled the service will return an error
Bulk Disable Sensors#
To bulk deactivate Sensors PUT a DisableSensorBulkRequest
to the bulk
disable endpoint:
curl -X PUT "https://api.mnemonic.no/sensors/v1/sensor/bulk/disable" -H "accept: application/json" -H "Content-Type: application/json" -H "Argus-API-Key: my/api/key"
-d '{
"sensorIDs": [
1,
2,
3
]
}'
For the request to be successful
The user must have the
disableSensor
permission for the Sensors’ customer(s), a role that grants it, or belong to a group with said permissionThe Sensors must exist
Enable Monitoring for a Sensor#
To enable monitoring for a Sensor PUT a request to the Sensor’s enable monitoring endpoint. The user can indicate whether to only monitor during daytime.
curl -X PUT "https://api.mnemonic.no/sensors/v1/sensor/{sensorID}/monitoring/enable?daytime={true|false}" -H "Argus-API-Key: my/api/key"
For the request to be successful
The user must have the
enableSensorMonitoring
permission for the Sensor’s customer, a role that grants it, or belong to a group with said permissionThe Sensor must exist
Disable Monitoring for a Sensor#
To disable monitoring for a Sensor PUT
a request to the Sensor’s disable
monitoring endpoint:
curl -X PUT "https://api.mnemonic.no/sensors/v1/sensor/{sensorID}/monitoring/disable" -H "Argus-API-Key: my/api/key"
For the request to be successful:
The user must have the
disableSensorMonitoring
permission for the Sensor’s customer, a role that grants it, or belong to a group with said permissionThe Sensor must exist
Bulk Enable Monitoring for Sensors#
To bulk disable monitoring for Sensors PUT
a request to the bulk enable
monitoring endpoint. Similar to the single Sensor enable monitoring
endpoint the user can indicate, for all Sensor in the request not per
Sensor, whether to only monitor during daytime.
curl -X PUT "https://api.mnemonic.no/sensors/v1/sensor/bulk/monitoring/enable?daytime={true|false}" -H "accept: application/json" -H "Content-Type: application/json" -H "Argus-API-Key: my/api/key"
-d '{
"sensorIDs": [
1,
2,
3
]
}'
For the request to be successful:
The user must have the
enableSensorMonitoring
permission for the Sensors’ customer(s), a role that grants it, or belong to a group with said permissionThe Sensor(s) must exist
Bulk Disable Monitoring for Sensors#
To bulk disable monitoring for Sensors PUT
a request to the bulk disable
monitoring endpoint:
curl -X PUT "https://api.mnemonic.no/sensors/v1/sensor/bulk/monitoring/disable" -H "accept: application/json" -H "Content-Type: application/json" -H "Argus-API-Key: my/api/key"
-d '{
"sensorIDs": [
1,
2,
3
]
}'
For the request to be successful:
The user must have the
disableSensorMonitoring
permission for the Sensor’s customer, a role that grants it, or belong to a group with said permissionThe Sensor(s) must exist
Schedule Downtime for a Sensor#
To schedule downtime for a Sensor POST a SensorScheduleDowntimeRequest
to the Sensor’s downtime endpoint:
curl -X POST "https://api.mnemonic.no/sensors/v1/sensor/{sensorID}/downtime" -H "accept: application/json" -H "Content-Type: application/json" -H "Argus-API-Key: my/api/key"
-d '{
"fromTime": 1,
"toTime": 2,
"keepDowntimeOnUpdate": true,
"comment": "optional comment"
}'
For the request to be successful:
The user must have the
scheduleSensorDowntime
permission for the Sensor’s customer, a role that grants it, or belong to a group with said permissionThe Sensor must exist
The downtime range must be valid i.e. downtime cannot start or end in the past and must end after it starts
Bulk Schedule Downtime for Sensors#
To bulk schedule downtime for Sensors POST
a
SensorScheduleDowntimeBulkRequest
to the bulk schedule downtime endpoint:
curl -X POST "https://api.mnemonic.no/sensors/v1/sensor/bulk/downtime" -H "accept: application/json" -H "Content-Type: application/json" -H "Argus-API-Key: my/api/key"
-d '{
"fromTime": 1,
"toTime": 2,
"keepDowntimeOnUpdate": true,
"comment": "optional comment",
"sensorIDs": [
1,
2,
3
]
}'
For a request to be successful:
The user must have the
scheduleSensorDowntime
permission for the Sensor’s customer, a role that grants it, or belong to a group with said permissionThe Sensor(s) must exist
The downtime range must be valid i.e. downtime cannot start or end in the past and must end after it starts
Cancel Downtime for a Sensor#
To cancel downtime for a Sensor send a DELETE
request to the Sensor’s
downtime endpoint:
curl -X DELETE "https://api.mnemonic.no/sensors/v1/sensor/{sensorID}/downtime" -H "Argus-API-Key: my/api/key"
For a request to be successful:
The user must have the
cancelSensorDowntime
permission for the Sensor’s customer, a role that grants it, or belong to a group with said permissionThe Sensor must exist
Bulk Cancel Downtime for Sensors#
To bulk cancel downtime for Sensors send a list of the SensorIDs to the bulk cancel downtime endpoint:
curl -X DELETE "https://api.mnemonic.no/sensors/v1/sensor/bulk/downtime?sensorID=1&sensorID=2&sensorID=3" -H "Argus-API-Key: my/api/key"
For the request to be successful:
The user must have the
cancelSensorDowntime
permission for the Sensors’ customer(s), a role that grants it, or belong to a group with said permissionThe Sensor(s) must exist
Delete a Sensor#
To delete a Sensor submit a DELETE
request to the Sensor path:
curl -X DELETE "https://api.mnemonic.no/sensors/v1/sensor/{sensorID}" -H "Argus-API-Key: my/api/key"
For the request to be successful:
The user must have the
deleteSensor
permission for the Sensor’s customer, a role that grants it, or belong to a group with said permissionThe Sensor must exist