I’m having trouble linking an image file uploaded to the vault to the part thumbnail using the rest api. Does anyone know what the body of a patch request needs to be to set the image file_id as the thumbnail of a part?
I’m having trouble linking an image file uploaded to the vault to the part thumbnail using the rest api. Does anyone know what the body of a patch request needs to be to set the image file_id as the thumbnail of a part?
I cannot tell you the exact body (cause it can have various formats..), but the thumbnail property behaves like every other regular property. So when you are able to edit the "description" or "name" of a Part, you should also be able to update the thumbnail.
You just need to provide the correct string for the thumbnail. It contains the path to the codetree or vault directory. If you have a vaulted image, you need the file id.
The content for your property looks something like this: vault:///?fileId=123ABCDEF....
Angela
Hi Angela
Thanks for the answer. I think I have the correct body now, but maybe the problem is with the PATCH request in general. Any updates to a part I try to make fail with the response.
Hi Angela
Thanks for the answer. I think I have the correct body now, but maybe the problem is with the PATCH request in general. Any updates to a part I try to make fail with the response.
The linked blog article is still fine, but maybe a bit dated.
Have you included the aras.action inside the body?
PATCH http://host/server/odata/Part(‘0486…23BC’)
{ "@aras.action": "edit", "item_number": "P-025" }
Hi Angela,
Thanks for the feedback. I didn't realize that the "id" changes with every edit to a part, which was causing my issue with Patch requests. When I update the id to the latest version, it works with and without the "@aras.action": "edit", in the body.
Kevin
Copyright © 2025 Aras. All rights reserved.