I've been creating a tool to mass-upload images to a large cloud database of targets using the VWS API. Each of these markers are identified by a unique product ID, which is assigned as the target name.
I've been able to upload these files so that their filenames correspond to the target names on the database, but the problem I'm having is the case where a file is uploaded that has the same name as an existing target on the database. As expected, Vuforia responds with the status code "TargetNameExist" and fails to upload.
However, the reason these conflicting files would have been submitted for uploading is in the event that their image has changed and needs to be updated (for example, a pre-release product image was used and then is changed once the product is fully released.)
When I get the JSON response for a TargetNameExists error, the target ID of the existing target is not given, so there is no way to know from the response how to update the target with the new image. I'm not sure what a good solution for this would be, and it's possible I'm missing out on some feature of the API. The only other way I can think of doing this is to get a list of every target ID, then get a TargetRecord for each ID and using the name property against the filenames calculate which targets should be updated and which should be uploaded beforehand. For such a large database this is a pretty absurd amount of API usage, all of it needless in the case that all the targets are new additions to the database.