Forum Discussion
Xiaoyuan Zhang
Jul 14, 2017Former Employee
What's the relationship between list url and site url
I need make CSOM call, when I new a context, I need the site url. But I only have list document url, such as
https://XXX.sharepoint.com/teams/AAA/Shared Documents/
Should I remove last "Shar...
Manidurai Mohanamariappan
Jul 14, 2017Iron Contributor
Yes , you are correct, after removing /shared dodument/ you will get the site url.
Xiaoyuan Zhang
Jul 14, 2017Former Employee
Do you have some document of this ? I see some other list url like this
https://xxx.com/teams/aa/bb/
BB not always shared documents, should I remove last segment to get site url?
https://xxx.com/teams/aa/bb/
BB not always shared documents, should I remove last segment to get site url?
- Manidurai MohanamariappanJul 14, 2017Iron Contributor
Hi,
In basically site url forming like https//xxx.com/sites/sitename and your case https//xxx.com/teams/sitename so if you remove after site name you will get site url
- Xiaoyuan ZhangJul 15, 2017Former EmployeeThe truth is, I don't know the the sitename. I only have the string of list.
- Manidurai MohanamariappanJul 15, 2017Iron Contributor
Hi,
Refer the below Link for sharepoint URL structure
http://www.nothingbutsharepoint.com/2010/03/25/sharepoint-url-basics-aspx/
If you know Document libarry name then remove only the document libary name, you will get the site url, Or if yave have list name , you need to remove from /Lists/listname then you will get the site url