Search documentation
karat

+

K

User Documentation ↗

List Property Attachments

GET/api/v2/ontologies/{ontology}/objects/{objectType}/{primaryKey}/attachments/{property}

Get the metadata of attachments parented to the given object.

Third-party applications using this endpoint via OAuth2 must request the following operation scopes: 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 containing the attachment.

property
string

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

Query parameters

artifactRepository
string
optional

The repository associated with a marketplace installation.

packageName
string
optional

The package name of the generated SDK.

Response body

AttachmentMetadataResponse
union

Success response.

Hide child attributes

Hide child attributes

single
object
optional

The representation of an attachment.

Show child attributes

Show child attributes

rid
string

The unique resource identifier of an attachment.

filename
string

The name of a File within Foundry. Examples: my-file.txt, my-file.jpg, dataframe.snappy.parquet.

sizeBytes
string

The size of the file or attachment in bytes.

mediaType
string

The media type of the file or attachment. Examples: application/json, application/pdf, application/octet-stream, image/jpeg

multiple
object
optional
Show child attributes

Show child attributes

data
list<AttachmentV2>
optional
Show child attributes

Show child attributes

AttachmentV2
object

The representation of an attachment.

Show child attributes

Show child attributes

rid
string

The unique resource identifier of an attachment.

filename
string

The name of a File within Foundry. Examples: my-file.txt, my-file.jpg, dataframe.snappy.parquet.

sizeBytes
string

The size of the file or attachment in bytes.

mediaType
string

The media type of the file or attachment. Examples: application/json, application/pdf, application/octet-stream, image/jpeg

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/attachments/performance"

Response

Copied!
1 2 3 4 5 6 7 { "type": "single", "rid": "ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f", "filename": "My Image.jpeg", "sizeBytes": 393469, "mediaType": "image/jpeg" }