Intro to the Geotab software development kit (SDK video)
DEV Channel SDK video - Steve Hansen provides step by step instructions on how to get started in the Geotab Software Development Kit.
In this helpful DEV Channel SDK video, Steve Hansen (Geotab Software Developer) provides step-by-step instructions on using the Geotab Software Development Kit (SDK). Learn about the uses of the SDK, where to find it, how to get help, and see running examples. Visit https://my.geotab.com/sdk/ to learn more about the Geotab SDK.
Watch: SDK Video Introduction
Find more training videos at the Geotab DEV Channel.
SDK Introduction for Software Developers (Video Transcription)
Hi. My name is Steve Hansen. I'm a developer at Geotab. I'm going to take you on a tour of the MyGeotab SDK.
An SDK is a software development kit which helps people use a platform to extend some functionality. The MyGeotab SDK can be used to create:
- Apps for smartphones
- Integrate MyGeotab data with third-party software. This could be accounting software that bills a customer based on trip distance.
- MyGeotab Add-Ins. Add-Ins provide a way to add new functionality or value-adding features inside the MyGeotab application.
- Automate tasks such as bulk-importing devices, users or zones to MyGeotab from an Excel spreadsheet.
Getting started with the SDK is easy. Open up your favorite browser and navigate to: http://sdk.geotab.com
Now just click on the SDK button on this page. Here you will find everything you need to get started with the SDK.
The landing page is Getting Started. This provides some general information about the SDK and illustrates how to install a device, register a database, and make your first API call.
The Concepts section describes the fundamentals of the API. The API is JSON-RPC over HTTPS, using GET and POST requests. An advantage of being web-based is that the API is not tied to a programming language. It can be used by any language that supports HTTPS.
In the Concepts section, you'll find information on:
- How to make HTTPS GET requests
- HTTPS POST requests
- Results and errors you will receive back
- How to authenticate a user
- Working with dates
- Units of measure
- Building block approach
This section is important when you first start. Read through here to get a basic understanding of how the API works and API-specific conventions.
The API reference is a list of all the methods and objects that are exposed via the API. Methods will display the required and optional parameters, and the expected data type for those parameters.
The search bar provides a convenient way to find what you're looking for. We're going to search for the GET method here.
A great feature of the SDK is the API runner. You can click Runner from any of the API methods.
Let's test this by searching for a device. I'm going to remove the search parameters form this query, add the type name device and click Run.
You'll see it's asking me for my credentials now. I'm going to add the server “my.geotab.com” and my database “G560” and my credentials and I'll click Run again.
There we go. There's my device. This is the JSON view of the device object that was returned, it's property, and the values of those properties. The runner authenticated our user against the database we specified and made a request to get one device object.
Let's head back to the SDK, to see what else is available to us.
Now let's test out of the Import Devices example. I'll enter my credentials. This is the database that the devices will be imported to. Now, I’ll click Sign In. Now I’ll head over to my MyGeotab database and see no devices added. The gray box here gives an example of the structure for the data we want to enter:
Line break, another device, line break, next device.
For my example, I'll just enter the single device. I'll enter this serial number here (G6-CC-00-00-0B-C1), then a comma, the device name - I'll just say “Steve Device” and the Group name - I'll say my Group is “Canada.” Then I'll click import device. Great, looks like our device was imported successfully.
But what's this about "Check the browser console for details"?
I'm using Chrome here, so I'll open my developer tools by pushing F12. Oh, what's this? We can see some information was logged to the console. This is just more details about what happened. “Successfully Imported Steve Device.” That's my device name. Then the device ID that was returned.
Now I'll head back to my database to see if the device was added. Let me refresh the page. There we go. There's the device. You can see my Group is “Canada.”
This example used the API to authenticate our user, get Groups from our database, and add a new device to our database, all using the API.
Let's head back to the SDK.
If you ever get stuck and can't find the answer in the SDK, a great resource is the Developer Forum.
The forum is a great way to find answers to common questions and connect with other developers in the MyGeotab community.
Geotab monitors the forums and we do our best to make sure questions are answered quickly.
The forum can be reached by clicking this link in the SDK [Forums] or by navigating to geotab.com, click Support, and click Developer Forum.
This was a short introduction to the tools available to you in the SDK. I encourage you to explore the SDK in detail to see all the great tools and resources that are available to you.
Thanks for joining me for this short introduction to the MyGeotab SDK. See you next time.
You might also like:
Learning the MyGeotab SDK - What is an SDK and how is it used?
The Beginner’s Guide to APIs - 90% of enterprises are relying on APIs in their cloud integration plans -Forbes. Learn why you should use APIs.
5 Tips From a Geotab Software Developer on Building Fleet Management Solutions - Best practices for designing code.
If you liked this post, let us know!
Geotab's blog posts are intended to provide information and encourage discussion on topics of interest to the telematics community at large. Geotab is not providing technical, professional or legal advice through these blog posts. While every effort has been made to ensure the information in this blog post is timely and accurate, errors and omissions may occur, and the information presented here may become out-of-date with the passage of time.
Geotab | Blog
Sign up for monthly news and tips from our award-winning fleet management blog. You can unsubscribe at any time.