Sensor Interface#
Create a Sensor Interface#
To create a Sensor Interface for a Sensor POST
an AddSensorInterfaceRequest
to the
Sensor’s base interface path:
curl -X POST "https://api.mnemonic.no/sensors/v1/sensor/{idOrShortname}/interface" -H "accept: application/json" -H "Content-Type: application/json" -H "Argus-API-Key: my/api/key"
-d '{
"interfaceName": "string",
"location": "locationIdOrShortname",
"active": false,
"customer": "customerIdOrShortname"
}'
For the request to be successful:
The user must have the
addSensorInterface
andupdateSensor
permissions for the Sensor’s customer, a role that grants them, or belong to a group with said permissionsThe Sensor for which we want to create the Interface must exist
The Location of the Interface must exist
The Interface name must be unique for the targeted Sensor i.e. different Sensors can have Interfaces with the same name but a Sensor cannot have multiple Interfaces with the same name
The Customer must exist and if the shared customer data flag is not set the interface’s customer must be the same as the sensor’s
Note
Sensor Customer
Once the Sensor Interface is created, it is not possible to modify its Customer.
List a Sensor’s Interfaces#
To list a Sensor’s interfaces GET
the Sensor’s base interface path:
curl -X GET "https://api.mnemonic.no/sensors/v1/sensor/{idOrShortname}/interface" -H "Argus-API-Key: my/api/key"
For the request to be successful:
The user must have the
viewSensorInterface
permission for the Sensor’s customer, a role that grants them, or belong to a group with said permissionsThe Sensor must exist
Get a Sensor’s Interface#
To get a specific Sensor Interface append the Interface’s ID or name to the Sensor’s base interface path
curl -X GET "https://api.mnemonic.no/sensors/v1/sensor/{idOrShortname}/interface/{idOrName}" -H "Argus-API-Key: my/api/key"
For the request to be successful:
The user must have the
viewSensorInterface
permission for the Sensor’s customer, a role that grants them, or belong to a group with said permissionsThe Sensor must exist
The Interface must exist
Update a Sensor’s Interface#
To update a specific Sensor’s Interface PUT
an UpdateSensorInterfaceRequest
to that
Sensor Interface’s path:
curl -X PUT "https://api.mnemonic.no/sensors/v1/sensor/{idOrShortname}/interface/{idOrName}" -H "accept: application/json" -H "Content-Type: application/json" -H "Argus-API-Key: my/api/key"
-d '{
"interfaceName": "newName",
"location": "newIdOrShortname",
"active": true
}'
For the request to be successful:
The user must have the
viewSensors
,updateSensor
,viewSensorInterface
, andupdateSensorInterface
permissions for the Sensor’s customer, a role that grants them, or belong to a group with said permissionsThe Sensor must exist
The Interface must exist
The request must be valid
Any new name must be unique to the Sensor
Any new Location must exist and belong to the same Customer as the Interface’s Sensor
Delete a Sensor’s Interface#
To delete a specific Sensor’s Interface submit a DELETE
request to that
Sensor Interface’s path:
curl -X DELETE "https://api.mnemonic.no/sensors/v1/sensor/{idOrShortname}/interface/{idOrName}" -H "Argus-API-Key: my/api/key"
For the request to be successful:
The user must have the
updateSensor
andremoveSensorInterface
permissions for the Sensor’s customer, a role that grants them, or belong to a group with said permissionsThe Sensor must exist
The Interface must exist