Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Load Object Set V2Objects Or Interfaces

POST/api/v2/ontologies/{ontology}/objectSets/loadObjectsOrInterfaces
Warning

This endpoint is in preview and may be modified or removed at any time. To use this endpoint, add preview=true to the request query parameters.

Load the ontology objects present in the ObjectSet from the provided object set definition. If the requested object set contains interfaces and the object can be viewed as an interface, it will contain the properties defined by the interface. If not, it will contain the properties defined by its object type. This allows directly loading all objects of an interface where all objects are viewed as the interface, for example.

Note that the result object set cannot contain a mix of objects with "interface" properties and "object type" properties. Attempting to load an object set like this will result in an error.

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.

Note that null value properties will not be returned. In addition, property metadata (rid, apiName, and primaryKey) will be prefixed with '$' instead of '__' as is the case in /loadObjects.

Third-party applications using this endpoint via OAuth2 must request the following operation scope: api:ontologies-read.

Path parameters

ontology
string

The API name of the ontology. To find the API name, use the List ontologies endpoint or check the Ontology Manager.

Query parameters

artifactRepository
string
optional

The repository associated with a marketplace installation.

packageName
string
optional

The package name of the generated SDK.

preview
boolean
optional

A boolean flag that, when set to true, enables the use of beta features in preview mode.

Request body

LoadObjectSetV2ObjectsOrInterfacesRequest
object

Represents the API POST body when loading an ObjectSet. Used on the /loadObjectsOrInterfaces endpoint only.

Hide child attributes

Hide child attributes

objectSet
union

Represents the definition of an ObjectSet in the Ontology.

Show child attributes

Show child attributes

orderBy
object
optional

Specifies the ordering of search results by a field and an ordering direction or by relevance if scores are required in a nearestNeighbors query. By default orderType is set to fields.

Show child attributes

Show child attributes

select
list<SelectedPropertyApiName>
optional
Show child attributes

Show child attributes

pageToken
string
optional

The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the nextPageToken field of the previous response and use it to populate the pageToken field of the next request.

pageSize
integer
optional

The page size to use for the endpoint.

excludeRid
boolean
optional

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.

Response body

LoadObjectSetV2ObjectsOrInterfacesResponse
object

Success response.

Hide child attributes

Hide child attributes

data
list<OntologyObjectV2>
optional

The list of objects in the current page.

Show child attributes

Show child attributes

nextPageToken
string
optional

The page token indicates where to start paging. This should be omitted from the first page's request. To fetch the next page, clients should take the value from the nextPageToken field of the previous response and use it to populate the pageToken field of the next request.

totalCount
string

The total number of items across all pages.

Examples

Request

Copied!
1 2 3 4 5 curl -X POST \ -H "Content-type: application/json" \ -H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/ontologies/palantir/objectSets/loadObjectsOrInterfaces?preview=true" \ -d '{"objectSet":{"type":"base","interfaceBase":"Person"},"pageSize":10000,"nextPageToken":"v1.VGhlcmUgaXMgc28gbXVjaCBsZWZ0IHRvIGJ1aWxkIC0gcGFsYW50aXIuY29tL2NhcmVlcnMv"}'

Response

Copied!
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 { "data": [ { "$rid": "ri.phonograph2-objects.main.object.5b5dbc28-7f05-4e83-a33a-1e5b851", "$primaryKey": 50030, "$objectTypeApiName": "Employee", "$interfaceTypeApiName": "Person", "personId": 50030, "firstName": "John" }, { "$rid": "ri.phonograph2-objects.main.object.88a6fccb-f333-46d6-a07e-7725c5f18b61", "$primaryKey": 20090, "$objectTypeApiName": "Employee", "$interfaceTypeApiName": "Person", "personID": 20090, "firstName": "John" }, { "$rid": "ri.phonograph2-objects.main.object.88a6fccb-f333-46d6-a07e-7725c5f18b71", "$primaryKey": 23, "$objectTypeApiName": "Athlete", "$interfaceTypeApiName": "Person", "personId": 23, "firstName": "Michael" } ], "totalCount": 3 }