Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
maxLevel2
typeflat

...

The service root URL for OData feeds depends on your Devo domain region:

EU

https://api-eu.devo.com/odatav2/Query.svc

US

https://api-us.devo.com/odatav2/Query.svc

CA

https://api-ca.devo.com/odatav2/Query.svc

APAC

https://api-apac.devo.com/odatav2/Query.svc

What permissions do I need?

To be able to create and mange OData feedsOData feeds in the Data Search area and mange them in the Authentication tokens tab of the Administration → Credentials area, you need to have the Manage version of the OData permission (know more about permissions here).

Having the View version will only let you see the list of existing ones in the Authentication tokens tab of the Administration → Credentials area.

...

Set up an OData feed

Rw ui steps macro
Rw step

Go to Data Search and run query whose data you want to share via OData.

Rw step

Click the gear icon in the table toolbar, then select Current query → Generate OData feed url.

Image RemovedImage Added
Rw step

The Create ODataV2 URL window opens.

Image RemovedImage Added

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 - If you choose this mode, anyone with access to the feed might execute the query. 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 → Domain Preferences area. Go to the Domain preferences 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.

Rw step

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 API & OData Feeds Authentication tokens tab of the Administration → Credentials → Tokens area. Check the Authentication tokens article for more information.

...

The following table lists the supported parameters using a feed URL for a Devo domain in the USA cloud region:


$top

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

Example

https://api-us.devo/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-us.devo/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-us.devo/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-us.devo/odatav2/Query.svc/716ae082-4943-43b-ab3a-48940fb168ce/544dd94cfaa4e48e831f0e7e26d8fa3/query?from=2018-10-03T07:00:00&to=2018-10-04T07:10:00&$format=json



timezone

Add the timezone parameter to indicate that the dates of the from and to parameters, as outlined further below, are relative to the timezone indicated. The possible values for this parameter come from an IANA standard and more information can be found here.

Example

https://api-us.devo/odatav2/Query.svc/716ae082-4943-43b-ab3a-48940fb168ce/544dd94cfaa4e48e831f0e7e26d8fa3/query?from=2018-10-03T07:00:00&to=2018-10-04T07:10:00&timezone=Europe/Madrid

Note that if no timezone is specified then UTC is always used by default. In the example provided, Madrid is UTC+2 during summertime and UTC+1 during daylight savings time. 



$metadata

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

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

Example

https://api-us.devo/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:

...

From (defines the start date)

Description

Examples

Relative

...

It retrieves the current time (day, month, hour, minutes and seconds) excluding a specified range of days/hours. The valid range dates you can use are days(d) and hours(h).

...

Example

Suppose the current date is 22/08/2016 15:20:00.

  • &from=1d → 21/08/2016 15:20:00

  • &from=7d → 15/08/2016 15:20:00

  • &from=24h -> 21/08/2016 15:20:00

  • &from=11h -> 22/08/2016 04:20:00

  • &from=26h -> 21/08/2016 13:20:00

Absolute

...

The only valid range date you can use is days(d).

...

Suppose the current date is 22/08/2016 15:20:00.

  • &from=1ad -> 21/08/2016 00:00:00

  • &from=7ad -> 15/08/2016 00:00:00

Specific

...

They are specific filters using the current date and hour, but the minutes and seconds are setup as 0.

...

Suppose the current date is 22/08/2016 15:20:00.

...

  • The result will be 22/08/2016

...

  • 15:00:00

To (defines the end date)

Description

Examples

Relative

...

The valid range dates you can use are days(d) and hours.

...

  • &from=2016-08-22T15:20:00&to=1d → 23/08/2016 15:20:00

  • &from=2016-08-22T15:20:00&to=7d → 29/08/2016 15:20:00

  • &from=2016-08-22T15:20:00&to=24h → 23/08/2016 15:20:00

  • &from=2016-08-22T15:20:00&to=3h → 22/08/2016 18:20:00

  • &from=2016-08-22T15:20:00&to=26h → 23/08/2016 17:20:00

Absolute

...

The only valid range dates you can use are days(d).

...

  • &from=2016-08-22T15:20:00&to=1ad -> 23/08/2016 00:00:00

  • &from=2016-08-22T15:20:00&to=7ad -> 29/08/2016 00:00:00

Specific

...

&to=now - it retrieves the current hour, minutes and seconds.

...

Suppose the current date is 22/08/2016 15:20:00.

  • &from=2016-08-20T00:00:00&to=now  from 20/08/2016 00:00:00 to 22/08/2016 15:20:00

&to=endday - covers the range time between "from" date and the end of the day. It's the same as "&to=1ad".

...

  • &from=2016-08-20T15:00:00&to=endday -> from 20/08/2016 15:00:00 to 21/08/2016 00:00:00

&to=endmonth - covers the range time between the current date and the end of the month.

...

  • &from=2016-08-20T15:00:00&to=endmonth -> from 20/08/2016 15:00:00 to 01/09/2016 00:00:00

Related articles

Child pages (Children Display)