Microsoft Graph API - Document library creation with navigation link

旧时模样 提交于 2020-02-06 01:40:34

问题


I am using Microsoft Graph API create a Document Library in a SharePoint Online site. I would like to know if there is a way to create at the same time I create the doc library a navigation link.

When working directly on SharePoint online there is a checkbox "Show in navigation link", which will automatically create a navigation link on the left column.

I could not find anything in the documentation, I would like to know if there is a way to do that thanks to the API.

POST https://graph.microsoft.com/v1.0/sites/{site-id}/lists

{
  "displayName": "TEST1",
  "list": {
    "contentTypesEnabled": false,
    "hidden": false,
    "template": "documentLibrary"
  }
}

回答1:


When checked, SharePoint is actually doing to things behind the scenes. First, it creates the Document Library. Then it adds a link to the Page. This isn't supported in v1.0.

I expect it will eventually become available given the recent introduction of the sitePage resource to the Beta API. At the moment there isn't a way to "update" an existing page so it likely wouldn't support your scenario today but it's logical to assume PATCHing a sitePage is coming at some point. .



来源:https://stackoverflow.com/questions/53766605/microsoft-graph-api-document-library-creation-with-navigation-link

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!