skip to main content
Getting started with OData : Testing the Data Source configuration

Try DataDirect Cloud Now

Testing the Data Source configuration

After following the steps described in Configuring an OData schema map and Setting OData options, you are ready to test. You can quickly test in the following ways: right from the DataDirect Cloud dashboard or using a REST client.
*Click the OData URI link on the Data Sources screen to submit an HTML request that returns a list of the entities that you exposed in the schema map. Testing from the DataDirect Cloud dashboard below describes how.
*Use a REST client. The advantage of using a REST client is that they usually persist information that you need to enter for every request, making it easy to try a variety of queries. Testing from the DataDirect Cloud dashboard below describes how and provides an example using Postman.

Testing from the DataDirect Cloud dashboard

To test whether your Data Source definition and schema map are configured correctly:
1. From the left navigation pane, select Data Sources to open your list of Data Sources.
2. Find the OData-enabled Data Source definition and click the OData URI link at the end of the row.DDC - OData URI link
You will be prompted for credentials.
3. Enter your DataDirect Cloud credentials.
4. The browser returns an XML document listing the entities in the schema:DDC - XML document from clicking OData URI

Testing with a REST client

To test with a REST client:
1. From the Data Source definition OData tab, copy the OData URI.
2. Paste the URI in the client as the URL for a GET request.
3. Using the controls exposed by the REST client, select basic authorization and enter your DataDirect Cloud credentials
4. If credentials for your data store are not saved in the Data Source definition, pass them as the value for ddcloud-datasource-user and ddcloud-datasource-password headers.
5. Execute the request.
The OData URI that includes the Service URI and includes only the Data Source name in the resource path returns the list of entities exposed in the schema. To formulate queries for specific entities, see Fetching records and collections, Creating, editing, and deleting records, and Navigating relationships.
The screen below shows the results of executing a request in the Postman Chrome app.
Using an example Data Source, the GET request for returns a list of the entities specified in the OData schema map. DDC - Postman example returning all entities for a data source schema map
The example was set up as follows:
*The Authorization tab has Basic Auth selected and contains the credentials for the DataDirect Cloud account. As shown in the screen above, Postman encrypted these credentials in the Authorization header.
*In this case, the example sfds Data Source definition includes credentials for the Salesforce data store. If it did not, they could be added on this screen as .
*The request parameters in the GET field include the name of the service and the DataDirect Cloud Data Source definition, but no address for specific entities. This syntax returns a list of all entities in the schema map.
*The response is in Atom format, DataDirect Cloud's default response type. You can change the response format to JSON as described in Response formatting.
See the following for more detailed information:
*Structure of OData requests details the available options for the service URI, entity addressing, headers, and response formatting.
*Formulating queries explains how to fetch, create, update, and delete records.
*OData Method Reference describes the supported syntax.