Add

Description

Create a new rule of one of the following types:

  •  TRACK_OUT_OF_BOUNDS: Rule associated with a Track. Each time the record position is associated with a track check if this is outside the specified circular area, and if so, an alert is send with WEB Push to your service Endpoint (specified in the application configuration).

URL

/VERSION/rules/add.FORMAT

Available Format

JSON

HTTP Method

GET

Accepted Version

1

Requires

Authorization.

Headers

Parameters

  • access_token: (Required) access_token to user resources.
  • track:(Required) Track identifier which associate the rule.
  • type: (Required) TRACK_OUT_OF_BOUNDS.
  • lat: (Required) Latitude circle center the permitted area. In decimal degrees
  • lng: (Required) Length circle center the permitted area. In decimal degrees
  • radius: (Required) Circle radius of the permitted area. In decimal degrees.

Example

https://api.topoos.com/1/rules/add.json?access_token=62f5280d-c954-4ee7-a0a8-68ff9c2810d8&lat=40.953107&lng=-4.123233&radius=10&track=12678&type=TRACK_OUT_OF_BOUNDS

Reply
JSON example reply

{
    "id": 7608,
    "type": "TRACK_OUT_OF_BOUNDS"
}