Aggregate assets

The aggregation API lets you compute aggregated results on assets, such as getting the count of all assets in a project, checking different names and descriptions of assets in your project, etc.

Aggregate filtering

Filter (filter & advancedFilter) data for aggregates

Filters behave the same way as for the Filter assets endpoint. In text properties, the values are aggregated in a case-insensitive manner.

aggregateFilter to filter aggregate results

aggregateFilter works similarly to advancedFilter but always applies to aggregate properties. For instance, in case of an aggregation for the source property, only the values (aka buckets) of the source property can be filtered out.

Request throttling

This endpoint is meant for data analytics/exploration usage and is not suitable for high load data retrieval usage.
It is a subject of the new throttling schema (limited request rate and concurrency). Please check Assets resource description for more information.

Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
Request Body schema: application/json
One of:

Request aggregate to count number of Assets matching the filters. Default aggregate for the endpoint.

aggregate
string

Type of aggregation to apply. count: Get approximate number of Assets matching the filters.

Value: "count"
(BoolFilter (and (object) or or (object) or not (object))) or (LeafFilter (equals (object) or in (object) or range (object) or prefix (object) or exists (object) or containsAny (object) or containsAll (object) or search (object)))

A filter DSL (Domain Specific Language) to define advanced filter queries.

See more information about filtering DSL here.

Supported properties:

Property Type
["labels"] array of [string]
["createdTime"] number
["dataSetId"] number
["id"] number
["lastUpdatedTime"] number
["parentId"] number
["rootId"] number
["description"] string
["externalId"] string
["metadata"] string
["metadata", "someCustomKey"] string
["name"] string
["source"] string

Note: Filtering on the ["metadata"] property has the following logic: If a value of any metadata keys in an asset matches the filter, the asset matches the filter.

object (Filter)

Filter on assets with strict matching.

Responses
200

Response with a list of aggregation results.

400

The response for a bad request.

429

The response for too many requests (concurrency or rate throttling).

post/assets/aggregate
Request samples
application/json
{
  • "aggregate": "count",
  • "advancedFilter": {
    • "or": [
      ]
    },
  • "filter": {
    • "name": "string",
    • "parentIds": [
      ],
    • "parentExternalIds": [
      ],
    • "rootIds": [
      ],
    • "assetSubtreeIds": [
      ],
    • "dataSetIds": [
      ],
    • "metadata": {
      },
    • "source": "string",
    • "createdTime": {
      },
    • "lastUpdatedTime": {
      },
    • "root": true,
    • "externalIdPrefix": "my.known.prefix",
    • "labels": {
      },
    • "geoLocation": {
      }
    }
}
Response samples
application/json
{
  • "items": [
    • {
      }
    ]
}