Aggregates the ontology objects present in the ObjectSet from the provided object set definition.
Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:ontologies-read.
stringThe API name or RID of the Ontology. To find the API name or RID, use the List Ontologies endpoint or check the Ontology Manager.
stringoptionalThe package rid of the generated SDK.
stringoptionalThe package version of the generated SDK.
stringoptionalThe Foundry branch to aggregate the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.
stringoptionalThe ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported.
stringoptionalThe resource identifier of an ontology scenario to aggregate the objects on.
objectlist<AggregationV2>optionalunionRepresents the definition of an ObjectSet in the Ontology.
list<AggregationGroupByV2>optionalstring (enum)optionalSpecifies the accuracy requirement for aggregation results.
REQUIRE_ACCURATE: Only return results if they are guaranteed to be accurate. If accuracy cannot be
guaranteed (e.g., due to a low maxGroupCount relative to distinct values), the request will fail
with an AggregationAccuracyNotSupported error.ALLOW_APPROXIMATE: Allow approximate results when exact computation is not feasible. This is the
default behavior if not specified.Enum values: REQUIRE_ACCURATE, ALLOW_APPROXIMATE
booleanoptionalIndicates whether the response should include compute usage details for the request. This feature is currently only available for OSDK applications. Note: Enabling this flag may slow down query performance and is not recommended for use in production.
booleanoptionalIf true, the request fails with an error when it cannot be computed in-memory. Use this to opt into fast failure on requests that would otherwise require heavier computation.
Defaults to false.
objectSuccess response.
integeroptionalstring (enum)Enum values: ACCURATE, APPROXIMATE
list<AggregateObjectsResponseItemV2>optionalnumberoptionalA measurement of compute usage expressed in compute-seconds. For more information, please refer to the Usage types documentation.
1
2
3
4
5
curl -X POST \
\t-H "Content-type: application/json" \
\t-H "Authorization: Bearer $TOKEN" \
"https://$HOSTNAME/api/v2/ontologies/palantir/objectSets/aggregate?branch=ri.branch..branch.d827184f-ee0e-4351-8b70-efbe51e07252&scenarioRid=ri.actions..scenario.a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-d '{"objectSet":{"objectType":"Employee","type":"base"},"aggregation":[{"field":"tenure","name":"min_tenure","type":"min"},{"field":"tenure","name":"avg_tenure","type":"avg"}],"groupBy":[{"field":"startDate","ranges":[{"endValue":"2020-06-01","startValue":"2020-01-01"}],"type":"range"},{"field":"city","type":"exact"}]}'1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
"data": [
{
"metrics": [
{
"name": "min_tenure",
"value": 1
},
{
"name": "avg_tenure",
"value": 3
}
],
"group": {
"startDate": {
"startValue": "2020-01-01",
"endValue": "2020-06-01"
},
"city": "New York City"
}
},
{
"metrics": [
{
"name": "min_tenure",
"value": 2
},
{
"name": "avg_tenure",
"value": 3
}
],
"group": {
"startDate": {
"startValue": "2020-01-01",
"endValue": "2020-06-01"
},
"city": "San Francisco"
}
}
]
}