Search documentation
karat

+

K

User Documentation ↗
Version 2.0

Read Media Content

GET/api/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/media/{property}/content
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.

Gets the content of a media item referenced by this property.

Supports a single byte range specified by the Range header as bytes=start-end or bytes=start-. A satisfiable range returns 206 Partial Content with Content-Range, Accept-Ranges, and the content length of the returned range. An unsatisfiable range returns 416 Range Not Satisfiable with Content-Range: bytes */<total length> and an empty body. Unsupported or malformed ranges are ignored, returning the full content with 200 OK.

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

Path parameters

ontology
string

The API name or RID of the Ontology. To find the API name or RID, 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 with the media reference property.

property
string

The API name of the media reference property. To find the API name, check the Ontology Manager or use the Get object type endpoint.

Query parameters

sdkPackageRid
stringoptional

The package rid of the generated SDK.

sdkVersion
stringoptional

The version of the generated SDK.

branch
stringoptional

The Foundry branch to read from. If not specified, the default branch will be used.

transactionId
stringoptional

The ID of an Ontology transaction to read from. Transactions are an experimental feature and all workflows may not be supported.

scenarioRid
stringoptional

The resource identifier of an ontology scenario to read the media reference property from.

preview
booleanoptional

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

Response body

body
string

The content stream.

Examples

Request

Copied!
1 2 3 curl \ \t-H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v2/ontologies/palantir/objects/employee/50030/media/profile_picture/content?branch=ri.branch..branch.d827184f-ee0e-4351-8b70-efbe51e07252&scenarioRid=ri.actions..scenario.a1b2c3d4-e5f6-7890-abcd-ef1234567890&preview=true"