Update Configuration
POST {{base_url}}/api/v2/configuration/update
Update Configuration Documentation
Description
This API endpoint allows you add a new endpoint for the configuration of a device in the assetflo system. The configuration includes various settings and parameters related to the device, such aslteFrequency, motionRate
, gpsOnly
, inShipping
which can be changed to update calibration.
New Endpoint
POST http://localhost:5500/api/configuration/update
Request Body
The request body is a JSON object containing the following fields:
deviceId
(string): The unique identifier of the device (also known as MAC)organization
(string):assetflo
assetName
(string): The name of the asset.industry
(string):assetflo
deviceType
(string): The type of the device (Tag
orLocator
).isDefault
(boolean): Indicates whether the device is set as the default.protocol
(string): The protocol used by the device (BLE,
WIFI,
LTE,
IOX").name
(string): The name of the device configuration.profile
(object): Additional profile settings for the device customized for the calibration.lteFrequency
(integer): The idle frequency in the user interface. Represents how many times per day an event is sent when the service is idle. (Idle frequency every 6 hours ~ 24/6 = 4 = lteFrequency)motionRate
(integer): The motion frequency in the user interface. Represents how many times per day an event is sent when the service is in motion. (Motion frequency every 15 minutes ~ 24/0.25 = 96 = motionFrequency)gpsOnly
(boolean): Indicates whether only GPS scanning is enabled.inShipping
(boolean): Indicates whether the device is in shipping.
groups
(array of strings): An array of group identifiers associated with the device.deviceProtocol
(string): The protocol used by the device (BLE,
WIFI,
LTE,
IOX").
Successful Response
If the POST request update is successful, the API will return the entire updated object as the response.
Summary
The purpose of this post request is to update the configuration of a device in the assetflo system. By sending the necessary parameters and settings in the request body, you can modify the calibratuon details of the specified device. This API is particularly useful when you need to update specific properties or settings associated with a device, such as its frequency, motion rate, GPS scanning, shipping status, and other related attributes. The successful response will provide the updated object, confirming the successful execution of the update operation.
Request Body
{"deviceId"=>"Device MAC Address", "organization"=>"assetflotest", "assetName"=>"Asset Name", "industry"=>"assetflo", "deviceType"=>"Tag", "isDefault"=>false, "protocol"=>"LTE", "name"=>"Configuration Name", "profile"=>{"lteFrequency"=>96, "motionRate"=>2880, "gpsOnly"=>false, "inShipping"=>false}, "deviceProtocol"=>"LTE"}