Aller au contenu principal
CloudStudio

Traqueurs de localisation

Reporting Endpoint Status

The HTTP integration of location trackers uses the following structure:

POST /services/gear/DeviceIntegrationService.svc/UpdateLocationTrackerStatus HTTP/1.1
Host: gear.cloud.studio
Content-Type: application/json

{
	"accessToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	"endpointID": 1,
	"latitude": -13.9957594,
	"longitude": 48.9339384,
	"flags": 0,
	"timestamp": "2021-02-23T14:55:03"
}

Parameters

NameDescriptionData Type
accessTokenAccess token with permissions to update endpoint information. See this page for more information.text
endpointIDUnique endpoint identifier or combination of device address and endpoint address in format [deviceAddress]:endpointAddress (e.g.: [device-1234]:1). These values can be found on the endpoint management page.numeric
latitudeIndica la latitud. El valor debe ser entre -90 y 90. El separador para los decimales es el puntonumeric
longitudeIndica la longitud. El valor debe ser entre -180 y 180. El separador para los decimales es el puntonumeric
flagsIndica información extra para la posición. Es un valor entero que representa una suma bit a bit. Los estados disponibles son: 0 = Nada en especial1 = La posición del sensor está cambiando2 = El sensor no puede adquirir la posición4 = El sensor no funciona correctamente. La posición informada puede ser incorrecta8 = La posición informada tiene baja precisiónLos valores pueden combinarse a través de la operación OR. Por ejemplo, para indicar que la posición informada tiene baja precisión, y la posición está cambiando, debe utilizarse (8 OR 1) = 9.numeric
timestampOptional value indicating the UTC date and time corresponding to the measurement. The date format must match one of those specified in the date formats section. If the field is omitted, the platform will assume the measurement corresponds to the current date and time.text

Reporting Status in "raw" Format

El estado del endpoint can be reported as a raw value using the expression converter. This option is convenient when the device is unable to perform conversions and emits values that need to be transformed before being injected into the platform.

Below is an example of a raw format request:

POST /services/gear/DeviceIntegrationService.svc/UpdateLocationTrackerStatusRaw HTTP/1.1
Host: gear.cloud.studio
Content-Type: application/json

{
	"accessToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	"endpointID": 1,
	"rawData": "-13.9957594,48.933938,0",
	"timestamp": "2021-02-23T14:55:03"
}

Parameters

NameDescriptionData Type
accessTokenAccess token with permissions to update endpoint information. See this page for more information.text
endpointIDUnique endpoint identifier, which can be found on the endpoint management page.numeric
rawDataValor reportado por el sensor, como texto. Deben indicarse dos expresiones en el conversor de expresiones:La primera expresión debe devolver un valor numérico indicando la longitud. El valor debe ser entre -90 y 90. El separador para los decimales es el puntoLa segunda expresión debe devolver un valor numérico indicando la longitud. El valor debe ser entre -180 y 180. El separador para los decimales es el puntoLa tercera expresión debe devolver un valor entero indicando detalles de la posición (flags). Es un valor entero que representa una suma bit a bit. Los estados disponibles son:0 = Nada en especial1 = La posición del sensor está cambiando2 = El sensor no puede adquirir la posición4 = El sensor no funciona correctamente. La posición informada puede ser incorrecta8 = La posición informada tiene baja precisiónLos valores pueden combinarse a través de la operación OR. Por ejemplo, para indicar que la posición informada tiene baja precisión, y la posición está cambiando, debe utilizarse (8 OR 1) = 9.text
timestampOptional value indicating the UTC date and time corresponding to the measurement. The date format must match one of those specified in the date formats section. If the field is omitted, the platform will assume the measurement corresponds to the current date and time.text

Dernière mise à jour le

Sur cette page