Geofencing web API: Difference between revisions

From Maria GDK Wiki
Jump to navigation Jump to search
(Created page with "This page explains the use of the geofencing web API. Use [http://www.telerik.com/fiddler Fiddler] to test http POST/DELETE. == Notifications == Retrieve geofencing notifica...")
 
No edit summary
Line 15: Line 15:
|}
|}


Returns [http://support.teleplanglobe.com/mariagdkdoc/html/556A9CF2.htm NotificationQueryResult]. Note that the result contains the current notification generation of the service. By passing this number as generation input paramter on subsequent calls, only new notifications will be returned.
Returns [http://docs.maria.teleplanglobe.com/codedoc/html/556A9CF2.htm NotificationQueryResult]. Note that the result contains the current notification generation of the service. By passing this number as generation input paramter on subsequent calls, only new notifications will be returned.


== Rules ==
== Rules ==


Retrieve active geofencing rules. Uses HTTP GET. http://localhost:9006/geofencingwebservice/json/rules Returns array of [http://support.teleplanglobe.com/mariagdkdoc/html/144512D.htm GeoFenceRuleDef].
Retrieve active geofencing rules. Uses HTTP GET. http://localhost:9006/geofencingwebservice/json/rules Returns array of [http://docs.maria.teleplanglobe.com/codedoc/html/144512D.htm GeoFenceRuleDef].


== Setrule ==
== Setrule ==


Set single geofencing rule. Uses HTTP POST. http://localhost:9006/geofencingwebservice/json/setrule. Request body contains json/xml representation of single [http://support.teleplanglobe.com/mariagdkdoc/html/144512D.htm rule definition]. Sample request body:
Set single geofencing rule. Uses HTTP POST. http://localhost:9006/geofencingwebservice/json/setrule. Request body contains json/xml representation of single [http://docs.maria.teleplanglobe.com/codedoc/html/144512D.htm rule definition]. Sample request body:


<source lang="javascript">{
<source lang="javascript">{
Line 41: Line 41:
   }
   }
}</source>
}</source>
Note that "Interactions" is a bitwise combination of numerical values from [http://support.teleplanglobe.com/mariagdkdoc/html/AA6A629E.htm here]. Returns guid of rule on success.
Note that "Interactions" is a bitwise combination of numerical values from [http://docs.maria.teleplanglobe.com/codedoc/html/AA6A629E.htm here]. Returns guid of rule on success.


== Deleterule ==
== Deleterule ==

Revision as of 12:53, 5 August 2019

This page explains the use of the geofencing web API. Use Fiddler to test http POST/DELETE.

Notifications

Retrieve geofencing notifications newer than provided generation. Uses HTTP GET. http://localhost:9006/geofencingwebservice/json/notifications?generation=-1

Parameter Type Description
generation int, required Latest known generation of the caller. All notifications with generation higher than this number will be returned. Pass -1 to return all notifications

Returns NotificationQueryResult. Note that the result contains the current notification generation of the service. By passing this number as generation input paramter on subsequent calls, only new notifications will be returned.

Rules

Retrieve active geofencing rules. Uses HTTP GET. http://localhost:9006/geofencingwebservice/json/rules Returns array of GeoFenceRuleDef.

Setrule

Set single geofencing rule. Uses HTTP POST. http://localhost:9006/geofencingwebservice/json/setrule. Request body contains json/xml representation of single rule definition. Sample request body:

{
  "GeoFenceConditionXml":
  "<fieldcondition op=\"Eq\" field=\"Name\" value=\"Ytre Oslofjord\"\/>",
  "Id":"568c528a-459c-4c6f-87af-6be33486dcad",
  "Interactions":3,
  "NotificationTemplate":
  {
    "Description":null,
    "GeoShapeFields":["Name"],
    "Heading":"[time] [track.name] [interaction][ shape.Name]",
    "NotificationLevel":1,
    "PredefinedValues":[{"Key":"region","Value":"local"}],
    "TrackFields":["name","ais.DESTINATION","type","identity"]},
    "TrackConditionXml":null
  }
}

Note that "Interactions" is a bitwise combination of numerical values from here. Returns guid of rule on success.

Deleterule

Delete single geofencing rule. Uses HTTP DELETE. http://localhost:9006/geofencingwebservice/json/deleterule/4bb9385f-e2b3-457b-aef1-5b77950ff9d6. Returns true on successful delete.