Search documentation
karat

+

K

User Documentation ↗

Get Attachment

GET/api/v1/attachments/{attachmentRid}

Get the metadata of an attachment.

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

Path parameters

attachmentRid
string

The RID of the attachment.

Response body

Attachment
object

Success response.

Hide children

Hide children

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

Examples

Request

Copied!
1 2 3 curl \ -H "Authorization: Bearer $TOKEN" \ "https://$HOSTNAME/api/v1/attachments/ri.attachments.main.attachment.bb32154e-e043-4b00-9461-93136ca96b6f"

Response

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