| Method | HTTP request | Release Stage |
|---|---|---|
| aggregate | POST /v2/ontologies/{ontology}/objects/{objectType}/aggregate | Stable |
| count | POST /v2/ontologies/{ontology}/objects/{objectType}/count | Private Beta |
| get | GET /v2/ontologies/{ontology}/objects/{objectType}/{primaryKey} | Stable |
| list | GET /v2/ontologies/{ontology}/objects/{objectType} | Stable |
| search | POST /v2/ontologies/{ontology}/objects/{objectType}/search | Stable |
Perform functions on object fields in the specified ontology and object type.
| Name | Type | Description | Notes |
|---|---|---|---|
| ontology | OntologyIdentifier | ||
| object_type | ObjectTypeApiName | The type of the object to aggregate on. | |
| aggregation | List[AggregationV2] | ||
| group_by | List[AggregationGroupByV2] | ||
| accuracy | Optional[AggregationAccuracyRequest] | [optional] | |
| branch | Optional[FoundryBranch] | The Foundry branch to aggregate objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] |
| sdk_package_rid | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] |
| sdk_version | Optional[SdkVersion] | The version of the generated SDK. | [optional] |
| where | Optional[SearchJsonQueryV2] | [optional] |
AggregateObjectsResponseV2
from foundry_sdk import FoundryClient
import foundry_sdk
from pprint import pprint
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
# OntologyIdentifier
ontology = "palantir"
# ObjectTypeApiName | The type of the object to aggregate on.
object_type = "employee"
# List[AggregationV2]
aggregation = [
{"type": "min", "field": "tenure", "name": "min_tenure"},
{"type": "avg", "field": "tenure", "name": "avg_tenure"},
]
# List[AggregationGroupByV2]
group_by = [
{
"field": "startDate",
"type": "range",
"ranges": [{"startValue": "2020-01-01", "endValue": "2020-06-01"}],
},
{"field": "city", "type": "exact"},
]
# Optional[AggregationAccuracyRequest]
accuracy = None
# Optional[FoundryBranch] | The Foundry branch to aggregate objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.
branch = None
# Optional[SdkPackageRid] | The package rid of the generated SDK.
sdk_package_rid = None
# Optional[SdkVersion] | The version of the generated SDK.
sdk_version = None
# Optional[SearchJsonQueryV2]
where = {"type": "eq", "field": "name", "value": "john"}
try:
api_response = client.ontologies.OntologyObject.aggregate(
ontology,
object_type,
aggregation=aggregation,
group_by=group_by,
accuracy=accuracy,
branch=branch,
sdk_package_rid=sdk_package_rid,
sdk_version=sdk_version,
where=where,
)
print("The aggregate response:\n")
pprint(api_response)
except foundry_sdk.PalantirRPCException as e:
print("HTTP error when calling OntologyObject.aggregate: %s\n" % e)See README
| Status Code | Type | Description | Content Type |
|---|---|---|---|
| 200 | AggregateObjectsResponseV2 | Success response. | application/json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Returns a count of the objects of the given object type.
| Name | Type | Description | Notes |
|---|---|---|---|
| ontology | OntologyIdentifier | ||
| object_type | ObjectTypeApiName | The API name of the object type. To find the API name, use the List object types endpoint or check the Ontology Manager. | |
| branch | Optional[FoundryBranch] | The Foundry branch to count the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. | [optional] |
| sdk_package_rid | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] |
| sdk_version | Optional[SdkVersion] | The package version of the generated SDK. | [optional] |
CountObjectsResponseV2
from foundry_sdk import FoundryClient
import foundry_sdk
from pprint import pprint
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
# OntologyIdentifier
ontology = "palantir"
# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.
object_type = "employee"
# Optional[FoundryBranch] | The Foundry branch to count the objects from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.
branch = None
# Optional[SdkPackageRid] | The package rid of the generated SDK.
sdk_package_rid = None
# Optional[SdkVersion] | The package version of the generated SDK.
sdk_version = None
try:
api_response = client.ontologies.OntologyObject.count(
ontology,
object_type,
branch=branch,
sdk_package_rid=sdk_package_rid,
sdk_version=sdk_version,
)
print("The count response:\n")
pprint(api_response)
except foundry_sdk.PalantirRPCException as e:
print("HTTP error when calling OntologyObject.count: %s\n" % e)See README
| Status Code | Type | Description | Content Type |
|---|---|---|---|
| 200 | CountObjectsResponseV2 | Success response. | application/json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Gets a specific object with the given primary key.
| Name | Type | Description | Notes |
|---|---|---|---|
| ontology | OntologyIdentifier | ||
| object_type | ObjectTypeApiName | The API name of the object type. To find the API name, use the List object types endpoint or check the Ontology Manager. | |
| primary_key | PropertyValueEscapedString | The primary key of the requested object. To look up the expected primary key for your object type, use the Get object type endpoint or the Ontology Manager. |
|
| branch | Optional[FoundryBranch] | The Foundry branch to get the object from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported. | [optional] |
| exclude_rid | Optional[bool] | A flag to exclude the retrieval of the __rid property. Setting this to true may improve performance of this endpoint for object types in OSV2. |
[optional] |
| sdk_package_rid | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] |
| sdk_version | Optional[SdkVersion] | The version of the generated SDK. | [optional] |
| select | Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. | [optional] |
OntologyObjectV2
from foundry_sdk import FoundryClient
import foundry_sdk
from pprint import pprint
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
# OntologyIdentifier
ontology = "palantir"
# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.
object_type = "employee"
# PropertyValueEscapedString | The primary key of the requested object. To look up the expected primary key for your object type, use the `Get object type` endpoint or the **Ontology Manager**.
primary_key = 50030
# Optional[FoundryBranch] | The Foundry branch to get the object from. If not specified, the default branch is used. Branches are an experimental feature and not all workflows are supported.
branch = None
# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2.
exclude_rid = None
# Optional[SdkPackageRid] | The package rid of the generated SDK.
sdk_package_rid = None
# Optional[SdkVersion] | The version of the generated SDK.
sdk_version = None
# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties.
select = None
try:
api_response = client.ontologies.OntologyObject.get(
ontology,
object_type,
primary_key,
branch=branch,
exclude_rid=exclude_rid,
sdk_package_rid=sdk_package_rid,
sdk_version=sdk_version,
select=select,
)
print("The get response:\n")
pprint(api_response)
except foundry_sdk.PalantirRPCException as e:
print("HTTP error when calling OntologyObject.get: %s\n" % e)See README
| Status Code | Type | Description | Content Type |
|---|---|---|---|
| 200 | OntologyObjectV2 | Success response. | application/json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Lists the objects for the given Ontology and object type.
Note that this endpoint does not guarantee consistency. Changes to the data could result in missing or repeated objects in the response pages.
For Object Storage V1 backed objects, this endpoint returns a maximum of 10,000 objects. After 10,000 objects have been returned and if more objects
are available, attempting to load another page will result in an ObjectsExceededLimit error being returned. There is no limit on Object Storage V2 backed objects.
Each page may be smaller or larger than the requested page size. However, it is guaranteed that if there are more results available, at least one result will be present in the response.
Note that null value properties will not be returned.
| Name | Type | Description | Notes |
|---|---|---|---|
| ontology | OntologyIdentifier | ||
| object_type | ObjectTypeApiName | The API name of the object type. To find the API name, use the List object types endpoint or check the Ontology Manager. | |
| branch | Optional[FoundryBranch] | The Foundry branch to list objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] |
| exclude_rid | Optional[bool] | A flag to exclude the retrieval of the __rid property. Setting this to true may improve performance of this endpoint for object types in OSV2. |
[optional] |
| order_by | Optional[OrderBy] | [optional] | |
| page_size | Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See page sizes for details. | [optional] |
| page_token | Optional[PageToken] | [optional] | |
| sdk_package_rid | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] |
| sdk_version | Optional[SdkVersion] | The version of the generated SDK. | [optional] |
| select | Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties. | [optional] |
| snapshot | Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | [optional] |
ListObjectsResponseV2
from foundry_sdk import FoundryClient
import foundry_sdk
from pprint import pprint
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
# OntologyIdentifier
ontology = "palantir"
# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.
object_type = "employee"
# Optional[FoundryBranch] | The Foundry branch to list objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.
branch = None
# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2.
exclude_rid = None
# Optional[OrderBy]
order_by = None
# Optional[PageSize] | The desired size of the page to be returned. Defaults to 1,000. See [page sizes](https://palantir.com/docs/foundry/api/general/overview/paging/#page-sizes) for details.
page_size = None
# Optional[PageToken]
page_token = None
# Optional[SdkPackageRid] | The package rid of the generated SDK.
sdk_package_rid = None
# Optional[SdkVersion] | The version of the generated SDK.
sdk_version = None
# Optional[List[SelectedPropertyApiName]] | The properties of the object type that should be included in the response. Omit this parameter to get all the properties.
select = None
# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results.
snapshot = None
try:
for ontology_object in client.ontologies.OntologyObject.list(
ontology,
object_type,
branch=branch,
exclude_rid=exclude_rid,
order_by=order_by,
page_size=page_size,
page_token=page_token,
sdk_package_rid=sdk_package_rid,
sdk_version=sdk_version,
select=select,
snapshot=snapshot,
):
pprint(ontology_object)
except foundry_sdk.PalantirRPCException as e:
print("HTTP error when calling OntologyObject.list: %s\n" % e)See README
| Status Code | Type | Description | Content Type |
|---|---|---|---|
| 200 | ListObjectsResponseV2 | Success response. | application/json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Search for objects in the specified ontology and object type. The request body is used to filter objects based on the specified query. The supported queries are:
| Query type | Description | Supported Types |
|---|---|---|
| lt | The provided property is less than the provided value. | number, string, date, timestamp |
| gt | The provided property is greater than the provided value. | number, string, date, timestamp |
| lte | The provided property is less than or equal to the provided value. | number, string, date, timestamp |
| gte | The provided property is greater than or equal to the provided value. | number, string, date, timestamp |
| eq | The provided property is exactly equal to the provided value. | number, string, date, timestamp |
| isNull | The provided property is (or is not) null. | all |
| contains | The provided property contains the provided value. | array |
| not | The sub-query does not match. | N/A (applied on a query) |
| and | All the sub-queries match. | N/A (applied on queries) |
| or | At least one of the sub-queries match. | N/A (applied on queries) |
| containsAllTermsInOrderPrefixLastTerm | The provided property contains all the terms provided in order. The last term can be a partial prefix match. | string |
| containsAllTermsInOrder | The provided property contains the provided term as a substring. | string |
| containsAnyTerm | The provided property contains at least one of the terms separated by whitespace. | string |
| containsAllTerms | The provided property contains all the terms separated by whitespace. | string |
| startsWith | Deprecated alias for containsAllTermsInOrderPrefixLastTerm. | string |
Queries can be at most three levels deep. By default, terms are separated by whitespace or punctuation (?!,:;-[](){}'"~). Periods (.) on their own are ignored.
Partial terms are not matched by terms filters except where explicitly noted.
| Name | Type | Description | Notes |
|---|---|---|---|
| ontology | OntologyIdentifier | ||
| object_type | ObjectTypeApiName | The API name of the object type. To find the API name, use the List object types endpoint or check the Ontology Manager. | |
| select | List[PropertyApiName] | The API names of the object type properties to include in the response. | |
| branch | Optional[FoundryBranch] | The Foundry branch to search objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported. | [optional] |
| exclude_rid | Optional[bool] | A flag to exclude the retrieval of the __rid property. Setting this to true may improve performance of this endpoint for object types in OSV2. |
[optional] |
| order_by | Optional[SearchOrderByV2] | [optional] | |
| page_size | Optional[PageSize] | [optional] | |
| page_token | Optional[PageToken] | [optional] | |
| sdk_package_rid | Optional[SdkPackageRid] | The package rid of the generated SDK. | [optional] |
| sdk_version | Optional[SdkVersion] | The version of the generated SDK. | [optional] |
| select_v2 | Optional[List[PropertyIdentifier]] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both. | [optional] |
| snapshot | Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results. | [optional] |
| where | Optional[SearchJsonQueryV2] | [optional] |
SearchObjectsResponseV2
from foundry_sdk import FoundryClient
import foundry_sdk
from pprint import pprint
client = FoundryClient(auth=foundry_sdk.UserTokenAuth(...), hostname="example.palantirfoundry.com")
# OntologyIdentifier
ontology = "palantir"
# ObjectTypeApiName | The API name of the object type. To find the API name, use the **List object types** endpoint or check the **Ontology Manager**.
object_type = "employee"
# List[PropertyApiName] | The API names of the object type properties to include in the response.
select = None
# Optional[FoundryBranch] | The Foundry branch to search objects from. If not specified, the default branch will be used. Branches are an experimental feature and not all workflows are supported.
branch = None
# Optional[bool] | A flag to exclude the retrieval of the `__rid` property. Setting this to true may improve performance of this endpoint for object types in OSV2.
exclude_rid = None
# Optional[SearchOrderByV2]
order_by = None
# Optional[PageSize]
page_size = None
# Optional[PageToken]
page_token = None
# Optional[SdkPackageRid] | The package rid of the generated SDK.
sdk_package_rid = None
# Optional[SdkVersion] | The version of the generated SDK.
sdk_version = None
# Optional[List[PropertyIdentifier]] | The identifiers of the properties to include in the response. Only selectV2 or select should be populated, but not both.
select_v2 = None
# Optional[bool] | A flag to use snapshot consistency when paging. Setting this to true will give you a consistent view from before you start paging through the results, ensuring you do not get duplicate or missing items. Setting this to false will let new results enter as you page, but you may encounter duplicate or missing items. This defaults to false if not specified, which means you will always get the latest results.
snapshot = None
# Optional[SearchJsonQueryV2]
where = {"type": "eq", "field": "age", "value": 21}
try:
api_response = client.ontologies.OntologyObject.search(
ontology,
object_type,
select=select,
branch=branch,
exclude_rid=exclude_rid,
order_by=order_by,
page_size=page_size,
page_token=page_token,
sdk_package_rid=sdk_package_rid,
sdk_version=sdk_version,
select_v2=select_v2,
snapshot=snapshot,
where=where,
)
print("The search response:\n")
pprint(api_response)
except foundry_sdk.PalantirRPCException as e:
print("HTTP error when calling OntologyObject.search: %s\n" % e)See README
| Status Code | Type | Description | Content Type |
|---|---|---|---|
| 200 | SearchObjectsResponseV2 | Success response. | application/json |
[Back to top] [Back to API list] [Back to Model list] [Back to README]