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

NameTypeRequiredConstraintsDescription
projectIdintegerYesThe unique ID for a specified project.
entityIdstringYesEntity ID (unique within project)

Request body

Content type: application/json

PropertyTypeRequiredConstraintsDescription
dataarray<object>YesTime-series data. Each entry contains the timestamp of the value in RFC3339 format.
Properties of data
PropertyTypeRequiredConstraintsDescription
areasarray<object>NoThe areas associated with the location
attributesobjectNoThe attributes that belong to the location, separated as key-value pairs.
createdAtstringNoCreated date time in RFC3339 format.
floorIdnumberNoThe floor ID of the location
geometryobjectYesThe GeoJSON object of the location.
timestampstringYesTime 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"
    }
  ]
}

Responses

204 The data has been successfully processed. There is no response body.