Admin API get metadata of images for a particular folder
Hi,
New to Cloudariny and I have a GET request that retrieves images in a folder. I'm not able to get my image meta data with this request. I try with context set to true to retrieve meta data but that is not working.
Any help would be appreciated!
Best Answer
-
That works wonderfully.. thank you Thomas! :)
0
Answers
-
Hi @smiffy_chris ,
Thanks for contacting Cloudinary.
There are different Tiers in Cloudinary and the with_field metadata only works for Tier 2 and Above.
Please find the Tier ifnormation we have:
The reference of Tier-2 in Search Expression can be found at:
I hope this helps. Please let me know if you have any further questions.
Thanks,
Sree0 -
So the GET all assets can bring back meta data for images but to get assets within a folder does not bring back meta data? Strange.
How can I get tier 2 access? I'm a small business and would like to pay as I go.
Or is there another way to use the tier 1 api? Should I use tags instead?
0 -
Hi @smiffy_chris ,
Thanks for replying.
Could you please clarify what you mean by image data? Are you referring to embedded image metadata or data such as context, tags and structured metadata which can be set on individual assets on Cloudinary?
If the latter then, using Get resources by asset folder should work by passing
metadata
,context
andtags
parameter astrue
.To view the embedded metadata of an asset, you need to use Get details of a single resource by public ID or Get details of a single resource by asset ID and pass
media_metadata
astrue
.You should not need tier 2 access currently as this mainly applies when using Search API on image analysis and embedded metadata fields.
Please let me know if you have any other questions or queries.
Kind Regards,
Thomas
0 -
I'm trying with another route to pull images with a tag and include the metadata with those images. My route pulls the images but I don't see any metadata. Here is my code… my API url is cut off so here are the two URLs:
const apiUrl = cursor
? `https://api.cloudinary.com/v1_1/${cloudName}/resources/search?max_results=${max_results}&expression=tags=${tag_name}&next_cursor=${cursor}&context=true` :
`https://api.cloudinary.com/v1_1/${cloudName}/resources/search?max_results=${max_results}&expression=tags=${tag_name}&context=true`;
0 -
With my route to pull images with a given tag, I'm not returning any metadata.. Is there a better way to be pulling this so I can include metadata?
My apiURL got cut off in the code so here are the full links
const apiUrl = cursor ? `https://api.cloudinary.com/v1_1/${cloudName}/resources/search?max_results=${max_results}&expression=tags=${tag_name}&next_cursor=${cursor}&context=true` : `https://api.cloudinary.com/v1_1/${cloudName}/resources/search?max_results=${max_results}&expression=tags=${tag_name}&context=true`;
0 -
Hi @smiffy_chris ,
Thanks for replying.
It looks like you are now using Search API so to get the metadata you need to pass the
with_field
parameter with themetadata
value.You can also look at our Postman collections to find the proper syntax of these API calls, see
.Please let me know if you have any other questions or queries.
Kind Regards,
Thomas
0