Mobile Data Anywhere exposes most of its data through a REST API. This API provides access and basic CRUD operations (create, read, update, delete) for the resources described below. The API supports both XML and JSON formats.
The resources that are exposed via the API include:
The API reference documentation can be found at the link below. It describes how to authenticate with the API, and what resources are exposed.
There is also a C# .NET implementation of a client library which wraps the API in an easy to use client API. The client API also exposes a COM interface, which allows you to access the library from any COM compatible language including but not limited to the following languages:
You can download the .NET Client Library, source code and examples from the Downloads page.
The rest of this tutorial will walk you through a few examples of how to get started accessing the API using the client library in C# and in VBA.
Before you can access the API you will need to get access to your API Token which is unique for your username. Once you have your API Token you can use that in combination with your username to get access to the API.
Log into the Mobile Data Anywhere portal and go to your User Profile by pressing the link at the top right of the page. There will be a default API Token created for you in the API Accessibility section.
You can also regenerate the API Token by pressing the Edit Tab, then scrolling to the bottom of the page and pressing the Re-Generate Token button.
To get started you will need to download and install the Mobile Data Anywhere API Client Library from the downloads section.
You will also need to download and install Microsoft Visual Studio.
Download and install the Mobile Data Anywhere API Client Library on a Windows PC.
Once installed you will be able to go to the directory C:\Program Files (x86)\Mobile Data Anywhere Client API\Examples\C# and you will find file called SampleClient.csproj. Open the file with Visual Studio.
The C# example is a Console Application that relies on the Courier sample project. The Courier project will need to be uploaded into your Mobile Data Anywhere portal. When you first created your account the Courier project would have been uploaded to your account already. If you have deleted the project there is a copy in the directory C:\Program Files (x86)\Mobile Data Anywhere Client API\Examples\. Upload the project to the Portal, send it to a device, collect a few sessions and send the sessions back to the portal. Once you have the Project and the data in the portal then you must enter your Username and API Token into the source code and run the test application.
Go back to Visual Studio and open the file Program.cs. Enter the Username and API Token in the variables userName and apiSecret.
Before you run the example application make sure that there is a valid reference to the MobileDataAnywhereAPIClient Library.
To do this expand the References section in the Solution Explorer. If there is an exclamation mark on the MobileDataAnywhereAPIClient reference then you will need to add it.
To add the reference first delete the old one then right click the References folder, select Add References, Browse to the folder C:\Program Files (x86)\Mobile Data Anywhere Client API\ClientAPI and add the file MobileDataAnywhereAPIClient.dll.
Run the application by pressing F5 or the Start button at the top of the page.
To get started you will need to download and install the Mobile Data Anywhere API Client Library from the downloads section.
Download and install the Mobile Data Anywhere API Client Library on a Windows PC
Once installed you will be able to go to the directory C:\Program Files (x86)\Mobile Data Anywhere Client API\Examples\Excel and you will find the file called SampleClient.xlsm Open that file with Excel.
The example relies on the Courier sample project. The Courier project will need to be uploaded into your Mobile Data Anywhere portal. When you first created your account the Courier project would have been uploaded to your account already. If you have deleted the project there is a copy in the directory C:\Program Files (x86)\Mobile Data Anywhere Client API\Examples\. Upload the project to the portal, send it to your device, collect a few sessions and send the sessions back to the portal. Once you have the Project and the data in the Portal then you can enter your Username and API Token into the sheets in the spreadsheet and run the test application.
Go back to Excel and go to the Devices sheet. Enter the Username and API Token in the cell labelled "Enter username here" and "Enter secret API here".
Before you run the example application make sure that there is a valid reference to the MobileDataAnywhereAPIClient library.
To do this press the Developer Tab and the View Code button. This will launch Microsoft Visual Basic. Select the Tools->References menu item. If the MobileDataAnywhereAPIClient is nto available in the list of references then browse to the folder C:\Program Files (x86)\Mobile Data Anywhere Client API\ClientAPI and add the file MobileDataAnywhereAPIClient.dll.
To add the reference, first delete the old one then right click the References folder, select Add References, Browse to the folder C:\Program Files (x86)\Mobile Data Anywhere Client API\ClientAPI and add the file MobileDataAnywhereAPIClient.dll.
Go back to the Excel file in the Devices Tab and press the List Devices button.
This will access the API and display all of the Devices in your account.
Follow the same steps on the Projects Sheet to list all of the Projects in your account.
Follow the same steps on the Sessions Sheet to list all of the Sessions in the Courier Project in your account.