Assets
Update an asset by ID
Changed onUpdate needs to have the complete data present. <br> You can create/update/delete list entries like metadata, custom settings and properties. <br> E.g. if you want to remove an entry from metadata simply do not include this entry in the update. <br> If you want to update only a single field, use the PATCH method.
put/pimcore-studio/api/assets/{id}
Request
- Base URL: / (relative, and the document was published on a file host, not at the API’s origin)
- URL: /pimcore-studio/api/assets/{id}
- Auth: none declared
Path parameters
idinteger required
Example:83
Id of the asset
Request body
Example request
{
"data": {
"coauthorType": "agent",
"coauthor": "product-data-agent",
"metadata": [
{
"name": "custom_metadata",
"language": "en",
"type": "input",
"data": "data"
}
],
"customSettings": [
{
"key": "my_custom_setting_key",
"value": "data"
}
],
"properties": [
{
"key": "Mister Proper",
"data": "123",
"type": "document"
}
],
"image": {
"focalPoint": {
"x": 50,
"y": 50
}
}
}
}Response
One of asset types
Example response
{
"id": 83,
"parentId": 1,
"path": "/path/to/element",
"icon": {
"type": "path",
"value": "/path/to/icon"
},
"userOwner": 1,
"userModification": 1,
"locked": "locked",
"creationDate": 221846400,
"modificationDate": 327417600,
"elementType": "asset",
"customAttributes": {
"icon": {
"type": "path",
"value": "/path/to/icon"
},
"tooltip": "<b>My Tooltip</b>",
"additionalIcons": [
"some_other_icon"
],
"key": "my_custom_key",
"additionalCssClasses": [
"my_custom_class"
]
},
"type": "image",
"filename": "cool.jpg",
"mimeType": "image/jpeg",
"fullPath": "/path/to/asset.jpg",
"permissions": {
"list": true,
"view": true,
"publish": true,
"delete": true,
"rename": true,
"create": true,
"settings": true,
"versions": true,
"properties": true
},
"width": 666,
"height": 333,
"imageThumbnailPath": "/path/to/element/hulk-smash.jpg"
}Changes
- warning
removed the optional property
//from the response with the status - warning
removed the optional property
//from the response with the status - warning
removed the optional property
//from the response with the status - info
added the new optional request property
/ - info
added the new optional request property
/
- warning