Need REST WCF Query to get Image Content based on Image Library Name
I'm trying to get images from Images library using ImageService.svc with ajax call using jquery. This gives me all the images libraries content. I have created a images library called "Banner Images". I want to get images only from that library. Following query gives me images from all the libraries.
~Sitefinity/Services/Content/ImageService.svc/
How to apply filter to this? Something like below will help me ( Replace filter in the below query to get specific image library images)
~Sitefinity/Services/Content/ImageService.svc/?filter=filter
Any help on this is highly appreciated.
Thanks,
Santosh
Hi Santosh,
If you want to receive images under specific library, you need to do request like that (change guid with guid of your "Banner Images" library):
/Sitefinity/Services/Content/ImageService.svc/parent/f4700cfd-f44c-4591-8369-540b1c0674cf/?managerType=&providerName=OpenAccessDataProvider&itemType=Telerik.Sitefinity.Libraries.Model.Image&provider=OpenAccessDataProvider&sortExpression=Ordinal%20ASC,%20LastModified%20DESC&skip=0&take=50
Hi Victor,
This gets images with default fields under specific library but it is not getting any of the custom fields created by me in the library.
Is there is any workaround for this?
Thanks,
Santosh
I know only one method, you need to call api for each image
/Sitefinity/Services/Content/ImageService.svc/parent/032e4668-5b7e-6884-89b2-ff000089dfbc/062e4668-5b7e-6884-89b2-ff000089dfbc/?itemType=Telerik.Sitefinity.Libraries.Model.Image&parentItemType=Telerik.Sitefinity.Libraries.Model.Library&providerName=OpenAccessDataProvider
And in response you will find custom fields