从网站的 "网站页面" 列表中删除页面Delete page from the site pages list of a site

命名空间: microsoft. graphNamespace: microsoft.graph

重要

/betaMicrosoft Graph 中的版本下的 api 可能会发生更改。APIs under the /beta version in Microsoft Graph are subject to change. 不支持在生产应用程序中使用这些 API。Use of these APIs in production applications is not supported.

网站的 "网站页面"[列表][]中删除sitePageRemoves a sitePage from the site pages list in a site.

权限Permissions

要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

注意: 若要删除项,用户必须已授予应用程序对要删除的项的写入权限。Note: To delete an item, the user must have granted the application write access to the item to be deleted.

权限类型Permission type 权限(从最低特权到最高特权)Permissions (from least to most privileged)
委派(工作或学校帐户)Delegated (work or school account) Sites.ReadWrite.AllSites.ReadWrite.All
委派(个人 Microsoft 帐户)Delegated (personal Microsoft account) 不支持。Not supported.
应用程序Application Sites.ReadWrite.AllSites.ReadWrite.All

HTTP 请求HTTP request

DELETE /sites/{site-id}/pages/{page-id}

可选的请求标头Optional request headers

名称Name Value 说明Description
if-matchif-match etagetag 如果包含此请求标头,且提供的 eTag 与项中的当前标记不匹配,则返回 412 Precondition Failed 响应,并且不会删除该项。If this request header is included and the eTag provided does not match the current tag on the item, a 412 Precondition Failed response is returned and the item will not be deleted.

请求正文Request body

请勿为此方法提供请求正文。Do not supply a request body with this method.

响应Response

如果成功,此调用将返回204 No Content响应,表示资源已被删除,没有任何可返回的内容。If successful, this call returns a 204 No Content response to indicate that the resource was deleted and there was nothing to return.

示例Example

请求Request
DELETE /sites/{site-id}/pages/{page-id}
响应Response
HTTP/1.1 204 No Content