OData API feeds management


This article explains how to set up a Devo data query as an OData feed. This will allow you to stream the data to external tools like, for example, Microsoft ExcelTableau or Power BI. Currently, Devo feeds implement OData version 2.0.

Set up an OData feed

  1. Go to Data Search and run query whose data you want to share via OData.
  2. Click the gear icon in the table toolbar, then select Query Info → OData URI.



  3. The Create ODataV2 URL window opens.

    The following table describes the fields in this window:

    Feed friendly name  Enter a name for the data feed.
    Authentication type 

    Choose one of the following authentication options:

    • No authentication - For security reasons we do not recommend this mode.
    • Domain authentication - This is the default, recommended option. It automatically uses the OData API credentials from your account preferences. You can check and edit them in the Preferences → Account Preferences area. Go to the Preferences article for more information.
    • Standard authentication - This allows you to create a user and password that will only be used for this feed.
    Tags Add tags to the feed to easily identify it in the Api/OData tab of the Data Management area.
  4. Click Create. The feed URL is generated and you can copy it to your clipboard.

All the feeds that have been created in your domain are listed in the Administration → Data Management → Api/OData area. Check the Data Management article for more information.

OData feed parameters

You can add query string parameters to the OData feed URI to specify the data you want to retrieve. These parameters can be used to, for example, control the amount and order of the data that an OData service returns for the query identified by the URI.

OData feed URIs may include as many parameters as required, which are always prefixed with a "&" character (except the $metadata parameter). 

The following table lists the supported parameters:



$top

Add the $top parameter to return only the first N events of the query.

Example

https://api.logtrust.com/odatav2/Query.svc/716ae082-4943-43b-ab3a-48940fb168ce/544dd94cfaa4e48e831f0e7e26d8fa3/query?from=2018-10-03T07:00:00&to=2018-10-04T07:10:00&$top=10



$skip

Add the $skip parameter to skip the first N events and show only the remaining ones.

Example

https://api.logtrust.com/odatav2/Query.svc/716ae082-4943-43b-ab3a-48940fb168ce/544dd94cfaa4e48e831f0e7e26d8fa3/query?from=2018-10-03T07:00:00&to=2018-10-04T07:10:00&$skip=9


$select

Add the $select parameter to specify the columns of the data table you want to retrieve.

Example

https://api.logtrust.com/odatav2/Query.svc/716ae082-4943-43b-ab3a-48940fb168ce/544dd94cfaa4e48e831f0e7e26d8fa3/query?from=2018-10-03T07:00:00&to=2018-10-04T07:10:00&$select=eventdate,cid




$format

Add the $format parameter to return the data in a specific format. The valid formats are:

  • Atom xml (default format)
  • JSON

Add =json or =xml after the parameter to indicate the format. For example: &$format=json

Example

https://api.logtrust.com/odatav2/Query.svc/716ae082-4943-43b-ab3a-48940fb168ce/544dd94cfaa4e48e831f0e7e26d8fa3/query?from=2018-10-03T07:00:00&to=2018-10-04T07:10:00&$format=json




$metadata

Add the $metadata parameter to return only the query metadata. You cannot combine this parameter with other ones.

To add this parameter to the OData feed URI, first remove the query time information at the end of the URI, then add the parameter without including the '&' character.

Example

https://api.logtrust.com/odatav2/Query.svc/716ae082-4943-43b-ab3a-48940fb168ce/544dd94cfaa4e48e831f0e7e26d8fa3/query?from=2018-10-03T07:00:00&to=2018-10-04T07:10:00$metadata

The following is an example of an OData feed with four different parameters:

https://api.logtrust.com/odatav2/Query.svc/0c6f1165-4ac8-4ca4-87df-06bede2d1f53/e59f069b5bf113da8101372f50d90b8b/query?from=2018-10-02T09:40:18.224&to=2018-10-03T09:40:00&$select=eventdate,cid&$top=10&$skip=9&$format=json

In this case, you will only receive the data in the eventdate and cid columns, as specified in the select parameter. The top parameter indicates that only the first 10 events will be shown and the skip parameter will make the counting start after the first nine events. As a result, only 10 events from the event number 10 will be shown. Data will be retrieved in JSON format as indicated in the format parameter.

See the OData documentation for further details.

Have we answered your question?

If not, please contact our technical support team via email by clicking the button below.

CONTACT US