OData Tool Spotlight is a series in which I try to explore tools which make it easy to work with OData Service and feeds. You can read my previous articles on this series in my blog. Here is the previous article links:

In this article, we will look at one more useful tool known as "OData Explorer". So lets take a lap around OData Explorer.


What is OData Explorer ?

OData Explorer is tool from Microsoft ADO.NET Data Services or now named as WCF Data Services Team. Here is the official statement of what is OData Explorer?

A Silverlight application that can be installed in-browser and out of browser , and allows you to perform ad-hoc and guided queries across a given OData Service

Here is the official blog post announcing the OData Explorer: http://blogs.msdn.com/b/phaniraj/archive/2010/03/17/announcing-the-odata-explorer.aspx

Now lets start looking at the features of OData Explorer


Accessing OData Explorer:

To access the Silverlight OData Explorer, head over to http://www.silverlight.net/ODataExplorer. This is a Silverlight based application. So your system needs to have the Silverlight Runtime installed. This is both in-browser as well as out-of browser Silverlight application i.e. this can be accessed in the browser as well as can be installed as a desktop application.


OData Explorer Layout :

First lets familiarize ourselves with the layout of OData Explorer. It comprises of 4 Panes:

  • OData Services Pane – Lists all the Services you are connected to. OData Explorer allows you to work with more than one Service within the tool.
  • Odata Service Collections Pane – Lists all the collections that the OData Service exposes.
  • Odata Service Query Pane – Allows you to write OData queries against the selected service.
  • Results Pane – As the name suggests, this pane displays the data.

We will go through each of these panes in detail in coming sections. Here is the screen shot of the same:

OdataExplorerPanes


Connecting to OData Services:

If you visit OData Explorer for the first time in any session, you will be presented with "Add New OData Service" dialog. You will use this dialog whenever you want to add a new service to work with. Here is the screen shot of the same:

AddNewService 

You provide a friendly name for your service – so that it is easy to read in the Services Pane. You will provide the OData Service Root URI. Clicking Ok will connect to the OData Service and add it to your Services Pane. Here is a example of connecting to EBay OData Service:

AddNewService_Ebay

It also has a feature of listing out Public OData Services. If you click the button "Browse Public OData Services", it will list out all the OData Public Services as seen on OData.org site. If you select any one – the URI will be automatically filled up. Here is the screen shot:

PublicServices

After selecting a service from the list, it will take you to Add New OData Service and you click on Ok to connect to the selected OData Service.


OData Services Pane:

Services Pane is a region within the tool which will display the different OData Service you have connected to. At any point of time you can inly work with 1 OData Service. But you can be connected to more than 1 OData Service. Here is a screen shot of my Services Pane:

ServicesPane 

As you can see I have added many OData Services and they are all displayed with a friendly name in the Services Pane. Services Pane has 3 buttons. They are:

  • Add New – Used to add a new odata service to your session.
  • Delete – Used to delete a odata service from services pane.
  • PowerPivot – Used to save the OData Service Document as a ATOM Service Document.


OData Service Collection Pane:

This pane displays all the collection that a OData Service exposes. For e.g. I have added ebay odata service and when selected in the services pane, displays the collection that ebay exposes. Here is the screenshot of the same:

Collections

Clicking on any collection will execute that query and load the data in the results pane.


OData Service Query Pane:

When you click on a collection, the query pane will automatically show the query behind the collection. For e.g. I have added OData Service from Pluralsight. When I select the collection Courses from collection pane, here is what the query pane will look like:

QueryPane

As soon as you select a Collection, query is executed and results are shown in the results pane. You can also construct query filters using the "Build Query" option. Lets see an example. I want to list all courses which talk about "patterns". So I want to build the query something like – Return all course where:

  • Column "Name" contains word "pattern" AND
  • Column "ShortDescription" contains word "pattern"

Here is how the query builder can be used to build that query:

First select the column "Name", then select "Contains", then enter the word "Pattern" and click Add Query option

QueryBuilder_1

Second, select column "ShortDescription", then select "Contains", then enter word "pattern" and click Add Query Option.

QuerryBuilder-2

When above steps have been performed click Ok. The query pane will look like below:

QueryPane-2

Clicking "Go" will execute the query and show the results.


Results Pane:

The results pane, as the name goes will display the results of any query execution. When you select a collection the query gets executed and the results pane nicely shows a loading message. Here is the screenshot of the same:

ResultsPane-1

Clicking Cancel will abort the data retrieval.

Results can be displayed in 2 Modes. They are

  • Grid Mode – Data is presented in a tabular format
  • Raw Mode – Data is displayed in its native format i.e. XML

Grid Mode:

This is the default mode in which the data gets displayed. Lets take an example of Northwind Service and look at the screenshot below:

GridMode

As you can see the data is neatly displayed in a grid with all columns selected by default. The "Show Navigation Properties" checkbox controls whether the navigation property columns needs to be shown or not. In the above screen shot – since the show navigation property is checked we can see the columns "Category", "Order_Details" and "Supplier" column. You can control what columns to see by using the "Select Columns" drop down.

Raw Mode:

As the name says, the data is retrieved in its RAW format i.e. in most cases ATOM XML format. Lets see an example of retrieving Products collection from Northwind service in its RAW format:

RawMode

The data can also be viewed in JSON format. Select the data format as JSON and hit Go. Here is the response:

Json

So we saw all the features that this tool supports. It also has the capability to be installed as a Out-Of browser application. Look out for Install button on right hand top corner. Once installed you can use this tool as a desktop application.


Conclusion:

This tool is certainly of the earliest tool which was released to support OData. I think the vision was to make it like a Universal OData Browser. But after going through the features and having looked at LINQPad and Sesame Data Browser, I would recommend using LINQPad or Sesame Data Browser in place of this tool. This also has its SDK available for download, if you would like to understand how this is built. Here is the URL: odata-sdk – under "OData SDK – Sample Code" section.

Till next time, Happy Coding. Code with Passion, Decode with Patience.

  • Syam

    Hello Lohith,

    Nice blog.I want download file of the odata explorer.can you please share the link of the down loader.

    Thanks,
    Syam

    • I do not have the link to the download … looks like the odata explorer may have been withdrawn … the link i have in the blog is no more active

      • Syam

        OK..Share it if you have any alternate for executing odata explorer.

        Thanks for your help

        • i am not sure i understand your question. what do you mean by executing odata explorer … there are many client which support connecting to an Odata end point and visualize data … you can do that using even Excel or LinqPAD … so what exactly are you trying to do … you need to provide more details so that i can provide the right answers

          • Syam

            See..I have to test my odata using different query options like i can see my properties and perform the all operations

          • Download Postman … it lets you test your odata endpoints by firing a URI and will return the data back

          • Syam

            ya that i have(postman/rest client) already but i am looking for more feasibility tool like odata explorer

          • try this – http://pragmatiqa.com/xodata/ … do make sure read the notice that pops up during the start …. if you test your API in this tool … they may bookmark that API … but this is one of the best online tools i have seen in a while

          • Syam

            Ok Sure..Thanks Lohith