By: Jeff Levy

 
 
 

Introduction

In today’s world, REST APIs are a common way to exchange data across IT systems. This article will demonstrate how to view a sample REST API response from Uber, the peer-to-peer ride-sharing company. The API response will display price estimates from the Key2 Consulting office (in Johns Creek, GA) to the Atlanta Airport in a JSON object format. The price estimates shown will be for each of the various ride types that Uber offers.
 

Setup

Step 1: Download and Install Soap UI
While there are many API diagnostic tools out there, this article will focus specifically on SOAP UI. SOAP UI is a third-party tool that can be used to view and test REST APIs and SOAP Web Services.You can download the free/open source version of Soap UI here.
 

 
Step 2: Register / Sign in on Uber.com

  • Go to https://developer.uber.com/ to Register and/or Sign into your account.
  • Select the ‘Register App’ button at the bottom of the screen.


 

  • Provide a sample name and sample description, and then select the ‘Create’ button.


 

  • Scroll down to the end of the page and select ‘Generate New Access Token’. Copy the newly generated key and save it for Step 3. Note: The Access Token in the picture below was blacked out for security reasons.


 
Step 3: Configure Soap UI

  • Open up Soap UI and select ‘New REST project’


 

  • A new box will pop up and ask you for a URI. For this example, we will be using the URI displayed in the picture below. There are many other URIs that can be used; they are found through this link.


 

  • After entering in the URI, you will need to setup the Headers.
    1. Press the ‘Header’s button at the bottom left portion of the Request window (highlighted in yellow in the picture below)
    2. After pressing the ‘Headers’ button, add each of the following Headers with the green plus sign above the ‘Header’ column.
      • Authorization – Bearer
      • Accept-Language – en_US
      • Content-Type – application/json


 

  • Next, you will need to setup the Query Parameters. Use the green plus sign towards the top of the Request window to add the following Query Parameters. The values for the Query Parameters shown in the picture below represent a starting point at the Key2 Office and indicate the ending point at the Atlanta airport (this link explains how to find latitude and longitude with Google Maps).


 

Execute and View Response

The Setup is now complete and you are ready to execute! Press the Green Triangle at the top left of the Request window in order to submit the request.


 
Response Object
After submitting the request, look to the right-hand portion of the Request window. You should notice the JSON response object. If it does not appear, make sure you have selected the JSON tab (highlighted in yellow below).
 

 
And you’re done! The JSON object represented in the picture above indicates prices for the various Uber ride types for the journey to the airport.

 

Keep your data analytics sharp by subscribing to our mailing list!

Thanks for reading! Keep your knowledge sharp by subscribing to our mailing list to receive fresh Key2 content around data analytics, business intelligence, data warehousing, and more!

 
 
 
 


Key2 Consulting is a data warehousing and business intelligence company located in Atlanta, Georgia. We create and deliver custom data warehouse solutions, business intelligence solutions, and custom applications.