Avatar

How web request works?

1

Hi,

We want to know how works this notification option.

Do you have any documentation or example?

Aarón Galván

Please sign in to leave a comment.

6 comments

0
Avatar

Hi Aaron,

Geotab rules can be setup such that when a rule is broken our system will perform an HTTP GET or POST request to a URI you that you specify. This can be used to call web services on your own systems to handle the business logic yourself. The URI you use allows for templating, which means that information about the current exception can be passed along in the HTTP URI itself.

Let's say you had a web service that wants to know when people leave a zone. That web service may be available on the web at:

https://mywebservice.com/zones

You could then use that as the base URL for an HTTP GET request and pass along query string parameters for your HTTP handler. That might look something like this:

http://mywebservice.com/zones?date={date}&zone={zone}

You would create a web request template by going to this URI:

https://my3.geotab.com/__YOURDATABASE__/#notificationTemplateWebRequest

You will be able to see all the available tokens for sending along with your web service call there.

Adam Stirtan 0 votes
0
Avatar

Hi Adam,

We are testing the web request feature, but we have some questions about the tokens:

Is there a data type for each token?
for instance, the zone token, is an entity object or a string?
What if we want to receive the zone Id instead of the zone name?

Aarón Galván 0 votes
0
Avatar

All of the tokens are strings because they need to work with a myriad of different services (web service calls, emails, text messages).

I have seen some people using the tokens provided to reach a web service, then from that web service if additional information is required from Geotab the client side web service will issue an HTTP request for what else is required based on what was provided. I think this will be the correct approach if you need something else the tokens do not provide.

Adam Stirtan 0 votes
0
Avatar

You need to make sure your web service can handle a very large load for processing.  It is possible to get bombarded with web requests during a reprocess that will put a major load on you.  So make sure you are properly threading your web service application.

Michael Head 0 votes
0
Avatar

We have MDT set on preferences, the post is sending values in utc, is there a way to post dates according time zone preferences

Jose Martin Rodriguez 0 votes