Forum Discussion
Maria Jose Pedreira Lata
Mar 30, 2017Copper Contributor
Logo URL Property Sharepoint SubSite using API REST
I need to obtain several properties of all websites of a root site.
I am using:
http://xxxxxxx/_api/web/webinfos?$select=ServerRelativeUrl,Title,Description
With this url I get Description, Title and ServerRelativeUrl
... <content type="application/xml"> <m:properties> <d:Description>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eg</d:Description> <d:ServerRelativeUrl>/test</d:ServerRelativeUrl> <d:Title>Site name</d:Title> </m:properties> </content> ... <content type="application/xml"> <m:properties> <d:Description>Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequa</d:Description> <d:ServerRelativeUrl>/test2</d:ServerRelativeUrl> <d:Title>Second Site name</d:Title> </m:properties> </content> .....
But I can't get the url logo property for every website.
How I could obtain the url logo for all the first level websites from client side? (see resalted yellow text below)
Thank you!
- The webinfos endpoint is returning a SP.WebInformation object (https://msdn.microsoft.com/en-us/library/office/jj246973.aspx) which not contains any property for that Logo.
I think you have to jump to the specific subsite to ask for the SiteLogoUrl:
/sites/root/subsite/_api/web/SiteLogoUrl
- The webinfos endpoint is returning a SP.WebInformation object (https://msdn.microsoft.com/en-us/library/office/jj246973.aspx) which not contains any property for that Logo.
I think you have to jump to the specific subsite to ask for the SiteLogoUrl:
/sites/root/subsite/_api/web/SiteLogoUrl- Maria Jose Pedreira LataCopper Contributor
Thank you Luis, it works for me!