Search documentation
karat

+

K

User Documentation ↗

List Linked Objects

GET/api/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/links/{linkType}

Lists the linked objects for a specific object and the given link 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.

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.

objectType
string

The API name of the object type. To find the API name, use the List object types endpoint or check the Ontology Manager.

primaryKey
string

The primary key of the object from which the links originate. To look up the expected primary key for your object type, use the Get object type endpoint or the Ontology Manager.

linkType
string

The API name of the link that exists between the object and the requested objects. To find the API name for your link type, check the Ontology Manager.

Query parameters

pageSize
integer
optional

The desired size of the page to be returned. Defaults to 1,000. See page sizes for details.

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.

select
list<SelectedPropertyApiName>
optional

The properties of the object type that should be included in the response. Omit this parameter to get all the properties.

Show child attributes

Show child attributes

SelectedPropertyApiName
string

By default, anytime an object is requested, every property belonging to that object is returned. The response can be filtered to only include certain properties using the properties query parameter.

Properties to include can be specified in one of two ways.

  • A comma delimited list as the value for the properties query parameter properties={property1ApiName},{property2ApiName}
  • Multiple properties query parameters. properties={property1ApiName}&properties={property2ApiName}

The primary key of the object will always be returned even if it wasn't specified in the properties values.

Unknown properties specified in the properties list will result in a PropertiesNotFound error.

To find the API name for your property, use the Get object type endpoint or check the Ontology Manager.

orderBy
string
optional

A command representing the list of properties to order by. Properties should be delimited by commas and prefixed by p or properties. The format expected format is orderBy=properties.{property}:{sortDirection},properties.{property}:{sortDirection}...

By default, the ordering for a property is ascending, and this can be explicitly specified by appending :asc (for ascending) or :desc (for descending).

Example: use orderBy=properties.lastName:asc to order by a single property, orderBy=properties.lastName,properties.firstName,properties.age:desc to order by multiple properties. You may also use the shorthand p instead of properties such as orderBy=p.lastName:asc.

artifactRepository
string
optional

The repository associated with a marketplace installation.

packageName
string
optional

The package name of the generated SDK.

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

ListLinkedObjectsResponseV2
object

Success response.

Hide child attributes

Hide child attributes

data
list<OntologyObjectV2>
optional
Show child attributes

Show child attributes

OntologyObjectV2
map<PropertyApiName, PropertyValue>

Represents an object in the Ontology.

Show child attributes

Show child attributes

PropertyApiName
string

The name of the property in the API. To find the API name for your property, use the Get object type endpoint or check the Ontology Manager.

PropertyValue
any

Represents the value of a property in the following format.

TypeJSON encodingExample
Arrayarray["alpha", "bravo", "charlie"]
AttachmentJSON encoded AttachmentProperty object{"rid":"ri.blobster.main.attachment.2f944bae-5851-4204-8615-920c969a9f2e"}
Booleanbooleantrue
Bytenumber31
DateISO 8601 extended local date string"2021-05-01"
Decimalstring"2.718281828"
Doublenumber3.14159265
Floatnumber3.14159265
GeoPointgeojson{"type":"Point","coordinates":[102.0,0.5]}
GeoShapegeojson{"type":"LineString","coordinates":[[102.0,0.0],[103.0,1.0],[104.0,0.0],[105.0,1.0]]}
Integernumber238940
Longstring"58319870951433"
Shortnumber8739
Stringstring"Call me Ishmael"
TimestampISO 8601 extended offset date-time string in UTC zone"2021-01-04T05:00:00Z"

Note that for backwards compatibility, the Boolean, Byte, Double, Float, Integer, and Short types can also be encoded as JSON strings.

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.

Examples

Request

Copied!
1 2 3 curl \ -H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/ontologies/palantir/objects/employee/50030/links/directReport"

Response

Copied!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 { "nextPageToken": "v1.QnVpbGQgdGhlIEZ1dHVyZTogaHR0cHM6Ly93d3cucGFsYW50aXIuY29tL2NhcmVlcnMvP2xldmVyLXNvdXJjZSU1YiU1ZD1BUElEb2NzI29wZW4tcG9zaXRpb25z", "data": [ { "__rid": "ri.phonograph2-objects.main.object.74f00352-8f13-4764-89ea-28e13e086136", "__primaryKey": 80060, "__apiName": "Employee", "id": 80060, "firstName": "Anna", "lastName": "Smith" }, { "__rid": "ri.phonograph2-objects.main.object.74f00352-8f13-4764-89ea-28e13e086136", "__primaryKey": 51060, "__apiName": "Employee", "id": 51060, "firstName": "James", "lastName": "Matthews" } ] }