We have a multifield content fragment and we are using Assets HTTP API in order to update this content fragment.
We want to specifically update just the 2nd String from the list of multifield values but the PUT call request is expecting the entire request body. Is there a way to just target the second value? Attached is the PUT call request for reference.
{
"properties": {
"cq:model": "/conf/infocus/settings/dam/cfm/models/testModel",
"name": "test",
"elements": {
"items": {
"value": [
"{\"value\":\"testPath\",\"key\":\"heroImagePath\"}",
"{\"value\":\"testPath\",\"key\":\"title\"}"
]
}
}
}
}
Solved! Go to Solution.
Views
Replies
Total Likes
No, Assets HTTP API - using PUT - we have to send all values of an Asset.
Unfortunately, there's no way to directly update a single value in a set of values using the Assets HTTP API's PUT method. You must send the entire updated set of values in your PUT request.
can you try get the existing / current values and update only 2nd value and send back all with PUT
Thanks @SureshDhulipudi
Is there a way to only do a specific second value update using the PUT call?
No, Assets HTTP API - using PUT - we have to send all values of an Asset.
Unfortunately, there's no way to directly update a single value in a set of values using the Assets HTTP API's PUT method. You must send the entire updated set of values in your PUT request.
Views
Likes
Replies