Saltar al contenido principal

Asset-centric OData service

Connect Cognite Data Fusion (CDF) as a data source and use OData clients to query, transform, and visualize data stored in CDF asset-centric resources.

The asset-centric OData service lets you access CDF resources such as assets, time series, events, files, sequences, and RAW data via an OData API.

The asset-centric OData service accepts URLs with the following schema:

https://{cluster}.cognitedata.com/odata/{apiVersion}/projects/{project}

Where:

  • {cluster}: the name of the CDF cluster, e.g., westeurope-1.
  • {apiVersion}: the version of the OData service API (latest is v1).
  • {project}: the name of the CDF project, e.g., publicdata.

If you point the OData client to the correct asset-centric OData URL and authenticate, the server returns a table with all asset-centric types currently supported by the OData service in addition to supported OData functions.​

Filtering asset-centric resource types

The asset-centric OData service can push filters down to CDF. This improves performance by ensuring that filtering happens on the server side, reducing the amount of data transmitted to the client.

Filtering options

  • Pushdown: Filter functions that are pushed down to the CDF backend. This is the most efficient filtering.
  • Local: Filtering done by the~~ OData~~ service before returning the result to the client. Less efficient than pushdown.
  • Client-side: Filtering done by the client after data is retrieved. Least efficient.

Definitions

  • FilterFunctions: Contains, StartsWith, and EndsWith.
  • Comparison: <, <=, >, >=, and =.
  • Search: uses the search API and may require additional local filtering.
información

Search returns a limited number of rows, and you may not receive all matching data in CDF.

Assets

PropertyPushdownLocal
Id==
ExternalId=, StartsWith=, FilterFunctions
Name=, Search=, FilterFunctions
DescriptionSearch=, FilterFunctions
ParentId==
ParentExternalId==
DataSetId==
Source==
MetaData=
RootId==
CreatedTimeComparisonComparison
LastUpdatedTimeComparisonComparison

Time series

PropertyPushdownLocal
Id==
ExternalId=, StartsWith=, FilterFunctions
Name=, Search=, FilterFunctions
DescriptionSearch=, FilterFunctions
IsString==
MetaData=
Unit==
IsStep==
AssetId==
SecurityCategories
DataSetId==
CreatedTimeComparisonComparison
LastUpdatedTimeComparisonComparison

Data point

PropertyPushdownLocal
Id==
TimeStampComparisonComparison

Events

PropertyPushdownLocal
Id==
ExternalId=, StartsWithFilterFunctions
DescriptionSearch=, FilterFunctions
Source==
Type==
SubType==
MetaData=
DataSetId==
StartTimeComparisonComparison
EndTimeComparisonComparison
CreatedTimeComparisonComparison
LastUpdatedTimeComparisonComparison
AssetIdsContainsContains

Files

PropertyPushdownLocal
Id==
ExternalId=, StartsWith=, FilterFunctions
Name=, Search=, FilterFunctions
Source==
MimeType==
MetaData
DataSetId==
SourceCreatedTimeComparisonComparison
SourceModifiedTimeComparisonComparison
CreatedTimeComparisonComparison
LastUpdatedTimeComparisonComparison
UploadedTimeComparisonComparison
Uploaded==
AssetIdsContainsContains

Sequences

PropertyPushdownLocal
Id*=
ExternalIdStartsWith=, StartsWith
Name=, Search=, FilterFunctions
Description=, Search=, FilterFunctions
MetaData
AssetId==
DataSetId==
CreatedTimeComparisonComparison
LastUpdatedTimeComparisonComparison
Columns
nota

Supported via the Sequences(id) syntax.

CDF RAW databases

PropertyPushdownLocal
Name==

CDF RAW tables

PropertyPushdownLocal
Name==

CDF RAW rows

PropertyPushdownLocal
Key==, FilterFunction
LastUpdatedTimeComparisonComparison

Supported OData functions

AssetsRoots

Fetch the root assets for a CDF project.

ParameterTypeDescription
No parameters

AssetsSearch

Search assets in a CDF project.

ParameterTypeDescription
SearchTextWhitespace-separated terms to search for in assets. Does a best-effort fuzzy search in relevant fields (currently name and description) for variations of any search terms. Orders results by relevance.

EventsSearch

Search events in a CDF project.

ParameterTypeDescription
SearchTextWhitespace-separated terms to search for in events. Does a best-effort fuzzy search in relevant fields (currently description) for variations of any search terms. Orders results by relevance.

TimeseriesAggregate

Aggregate data points from multiple time series.

ParameterTypeDescription
TagsTextA comma-separated list of time series IDs or external ODs to include in the query.
GranularityTextThe granularity used to fetch data point aggregates.
StartTextGet datapoints starting from and including this time.
EndText (optional)Get datapoints up to, but excluding, this point in time. If no value is provided, defaults to now.

TimeseriesSearch

Search time series in a CDF project.

ParameterTypeDescription
SearchTextA whitespace-separated terms to search for in time series. Does a best-effort fuzzy search in relevant fields (currently name and description) for variations of any search terms and orders results by relevance.