Post location data
POST/projects/{projectId}/entities/{entityId}/location/data
Base URL: https://api.tinkermode.com
Post location data. The client can use this method to update the location of an entity.
This method injects the data into the corresponding Geo Time Series Database instance.
Also, it sends an Entity location update system event (_entityLocationUpdate_) to the home of the Entity
if the data contains a point type GeoJSON record.
Note that this endpoint doesn't validate the field values. GeoTSDB will fail to process the data if it contains invalid records.
Authentication
Send an Authorization header of the form ModeCloud <AUTH_CODE>.
Must contain a user API key of a user with permission to create the entity location, a service account token with the same permission, or a project API key with admin permission.
Path parameters
| Name | Type | Required | Constraints | Description |
|---|---|---|---|---|
projectId | integer | Yes | The unique ID for a specified project. | |
entityId | string | Yes | Entity ID (unique within project) |
Request body
Content type: application/json
| Property | Type | Required | Constraints | Description | |||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data | array<object> | Yes | Time-series data. Each entry contains the timestamp of the value in RFC3339 format. | ||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||
Request example
{
"data": [
{
"areas": [
{
"areaId": "mt_fuji"
}
],
"attributes": {
"direction": 0,
"speed": 0
},
"floorId": 0,
"geometry": {
"coordinates": [
138.7275,
35.3606,
3776.24
],
"type": "Point"
},
"timestamp": "2023-01-01T00:00:00Z"
}
]
}