1. Prepare selected files

PUT {{api-server}}/{{Filerobot-Token}}/v5/bulk/prepare

Body parameters:

NameDescriptionSyntaxValue/Example
bulkThe main Object, containing information about the files that need to be updated ( target) and the changes that need to be applied ( changes)Object"bulk": {
"target": {}, "changes" : []
}
targetContains the file_uuids that need to be updatedObject"target" : { "file_uuids" : [] }
file_uuidsA List of fileuuids that need to be updated. The fileuuids can be taken from the response of the Seach/List API endpoint or Get File DetailsList"file_uuids" : [
"file_uuid1",
"file_uuid2",
...
]
changesDescribes the changes that need to be applied.List"changes":[
{"type":"tags.del",
"value":"#tg5d14b"},{"type":"tags.del",
"value":"#tg25ac1"}
]
typeDescribes the type of the Update operation.String.
Several options are possible:

tags.add - the new values will be added to the current list of Tags

tags.del - the values will be removed from the selected assets.
"type": "tags.add"
valueThe Tag valueIt can be taken from the response of endpoint Get List of Tags, field tags.sid"value":"#tgbff61"

Request Body

{"bulk"=>{"target"=>{"files_uuids"=>["f98a69b0-7391-59af-afd8-bf338b750000", "689b8a2f-151a-5d0f-98e1-fd0cdd550000", "6b66979a-6edd-5bfc-af01-6a017e050000"]}, "changes"=>[{"type"=>"meta.replace", "key"=>"warranty", "value"=>{"en"=>"123"}}]}}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
X-Filerobot-KeystringThe API key or the SASS_key generated from a Security template

RESPONSES

status: OK

{"status":"success","bulk_uuid":"fda71174-d656-4fd8-8b2b-95e022ac2767","api_version":{"hash":"376984c150c4e7a5fa9919eba263111d4fa7e041","datetime":"2024-07-05T04:46:26+00:00","module":"elastic_v2"}}