Geofencing web API: Difference between revisions
No edit summary |
No edit summary |
||
Line 15: | Line 15: | ||
|} | |} | ||
Returns [http:// | Returns [http://codedoc.maria.teleplanglobe.com/codedoc/html/163CC326.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:// | Retrieve active geofencing rules. Uses HTTP GET. http://localhost:9006/geofencingwebservice/json/rules Returns array of [http://codedoc.maria.teleplanglobe.com/codedoc/html/93F73A95.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:// | Set single geofencing rule. Uses HTTP POST. http://localhost:9006/geofencingwebservice/json/setrule. Request body contains json/xml representation of single [http://codedoc.maria.teleplanglobe.com/codedoc/html/93F73A95.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:// | Note that "Interactions" is a bitwise combination of numerical values from [http://codedoc.maria.teleplanglobe.com/codedoc/html/30FB1314.htm here]. Returns guid of rule on success. | ||
== Deleterule == | == Deleterule == |
Revision as of 12:59, 9 March 2020
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.