You are not logged in.
We are currently using Files_SetMetadata to setting metadata for multiple asset, but this is replacing existing keywords. body for file setmeta data is as below:
{
"apiVersion":"1.0.1",
"sessionId":"BylVqplVPYNl1UF6okci9fuy70iRr6ej",
"action":"Files.SetMetaData",
"inParams":{
"assetId":[
"37182959451",
"37182955474",
"37182736317" ],
"values":{
"37182959451":{
"Keywords":[{
"value":"CTS",
"inherit":false,
"override":false
}]
},
"37182955474":{
"Keywords":[{
"value":"CTS",
"inherit":false,
"override":false
}]
},
"37182736317":{
"Keywords":[{
"value":"CTS",
"inherit":false,
"override":false
}]
}
}
}
}
I have tried to change "inherit":false,"override":false values but no effect. I was successful in appending the Keywords AddMetadata for single record, needs help with syntax for multiple assetids. or could help me with alternate API
Offline
Hi angela,
The short answer is that there is not currently a way to to append metadata to multiple files at once. The Files.SetMetadata(...) call will always overwrite with whatever you have specified in the call. So if you want to use this method you would need to start with a call to Files.GetMetadata(...), append the values as desired to the returned data, and then use this modified data in the call to Files.SetMetadata(...).
(Note that Files.GetMetadata(...) does accept an array of assetIds despite this not being mentioned in the documentation).
Alternative you could call Files.AddMetadata(...) multiple times - once for each asset you want to update.
Best wishes,
Ben
Offline