Search documentation
karat

+

K

User Documentation ↗

Get Linked Object

GET/api/v1/ontologies/{ontologyRid}/objects/{objectType}/{primaryKey}/links/{linkType}/{linkedObjectPrimaryKey}

Get a specific linked object that originates from another object. If there is no link between the two objects, LinkedObjectNotFound is thrown.

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

Path parameters

ontologyRid
string

The unique Resource Identifier (RID) of the Ontology that contains the object. To look up your Ontology RID, please use the List ontologies endpoint or check the Ontology Manager.

objectType
string

The API name of the object from which the links originate. 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 link originates. 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.

linkedObjectPrimaryKey
string

The primary key of the requested linked object. To look up the expected primary key for your object type, use the Get object type endpoint (passing the linked object type) or the Ontology Manager.

Query parameters

properties
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.

Response body

OntologyObject
object

Success response.

Hide child attributes

Hide child attributes

properties
map<PropertyApiName, PropertyValue>
optional

A map of the property values of the object.

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.

rid
string

The unique resource identifier of an object, useful for interacting with other Foundry APIs.

Examples

Request

Copied!
1 2 3 curl \ -H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v1/ontologies/ri.ontology.main.ontology.c61d9ab5-2919-4127-a0a1-ac64c0ce6367/objects/employee/50030/links/directReport/80060"

Response

Copied!
1 2 3 4 5 6 7 8 { "rid": "ri.phonograph2-objects.main.object.74f00352-8f13-4764-89ea-28e13e086136", "properties": { "id": 80060, "firstName": "Anna", "lastName": "Smith" } }