Hello,
I have an osdk client that can load objects from my ontology. The objects have a mediaReference
field. The mediaReference
has the following structure:
{
"mimeType": "application/pdf",
"reference": {
"type": "mediaSetViewItem",
"mediaSetViewItem": {
"mediaSetRid": "ri.mio.main.media-set.4481bead-68b2-41a1-9457-fb0dccae869e",
"mediaSetViewRid": "ri.mio.main.view.1ed1751c-c755-40bb-ad23-94cb2bfc1430",
"mediaItemRid": "ri.mio.main.media-item.19b139cd-83b3-45bc-9cc5-56682a3cb900"
}
}
}
The mediaSet in my case is pointing to a pdf.
To my knowledge, there is currently no way to load the raw pdf data from the mediaSet using the osdk.
The work-around I have used in the past was to hit the following endpoint:
api/v2/mediasets/${mediaSetRid}/items/${mediaItemRid}?preview=true
Which used to return raw pdf data, but recently the endpoint has been updated and now returns a json object with the following structure:
{
"viewRid": "ri.mio.main.view.1ed1751c-c755-40bb-ad23-94cb2bfc1430",
"path": "89b21871-ccf4-4271-97e0-33788e3541b2.pdf",
"logicalTimestamp": "1722996827653669",
"attribution": {
"creatorId": "986f6d53-0128-4583-bacd-df6e11133f71",
"creationTimestamp": "2024-08-07T02:29:34.713058456Z"
}
}
This change is now breaking my application as I can no longer load/view pdfs.
I can not find much documentation regarding loading mediaSet data, so Iām reaching out to the community.
If anyone knows how to load mediaSet data from an osdk client or through endpoints, the help would be much appreciated.
Thanks,
Conner.