List all structured metadata field's text entries
I have a structured metatadata text field called "Part Number" (external_id: PartNumber) and I would like to be able to generate a list of all data that has been entered into that field.
Big picture, is there a way to generate a CSV or some sort of list, to be able to evaluate part number coverage of our library though that structured metatadata?
-
Hi Kyle,
Thanks for reaching out.
What you are looking to do is not directly possible, as in we currently do not have an API method to do this.
But you could write a script. The general idea is that you would use the resources() method of the Admin API to get all of the assets in your account. Then you would loop over those assets and for each asset check if the metadata property exists. If it does, do another check to see if it's the external id that you are looking for. When all checks pass, you would add the value to a Set, to ensure unique values. From there you could write that out to a text file if needed.You can find our documentation on the resources() method of the Admin API here: https://cloudinary.com/documentation/admin_api#get_resources
I do think this would be a great enhancement to our API, so I will submit a feature request on your behalf. If our team decides to implement this in the future, I will let you know.
I hope this helps. If you have any questions, do not hesitate to ask.
Kind Regards,
Tia
Post is closed for comments.
Comments
1 comment