删除开放扩展Delete open extension

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

从指定的资源实例中删除开放扩展(openTypeExtension 对象)。Delete an open extension (openTypeExtension object) from the specified instance of a resource.

权限Permissions

根据要从中删除扩展的资源和权限类型 (委派或应用程序) 请求的权限,下表中指定的权限是调用此 API 所需的最低特权。Depending on the resource you're deleting the extension from and the permission type (delegated or application) requested, the permission specified in the following table is the least privileged required to call this API. 若要了解详细信息,包括如何选择权限的信息,请参阅权限To learn more, including how to choose permissions, see Permissions.

支持的资源Supported resource 委派(工作或学校帐户)Delegated (work or school account) 委派(个人 Microsoft 帐户)Delegated (personal Microsoft account) 应用程序Application
设备device Directory.AccessAsUser.AllDirectory.AccessAsUser.All 不支持Not supported Device.ReadWrite.AllDevice.ReadWrite.All
事件event Calendars.ReadWriteCalendars.ReadWrite Calendars.ReadWriteCalendars.ReadWrite Calendars.ReadWriteCalendars.ReadWrite
group Group.ReadWrite.AllGroup.ReadWrite.All 不支持Not supported Group.ReadWrite.AllGroup.ReadWrite.All
组事件group event Group.ReadWrite.AllGroup.ReadWrite.All 不支持Not supported 不支持Not supported
组帖子group post Group.ReadWrite.AllGroup.ReadWrite.All 不支持Not supported Group.ReadWrite.AllGroup.ReadWrite.All
邮件message Mail.ReadWriteMail.ReadWrite Mail.ReadWriteMail.ReadWrite Mail.ReadWriteMail.ReadWrite
组织organization Organization.ReadWrite.AllOrganization.ReadWrite.All 不支持Not supported Organization.ReadWrite.AllOrganization.ReadWrite.All
个人联系人personal contact Contacts.ReadWriteContacts.ReadWrite Contacts.ReadWriteContacts.ReadWrite Contacts.ReadWriteContacts.ReadWrite
用户user User.ReadWriteUser.ReadWrite User.ReadWriteUser.ReadWrite User.ReadWrite.AllUser.ReadWrite.All
tasktask Tasks.ReadWriteTasks.ReadWrite Tasks.ReadWriteTasks.ReadWrite 全部写读。Tasks.ReadWrite.All
tasklisttasklist Tasks.ReadWriteTasks.ReadWrite Tasks.ReadWriteTasks.ReadWrite 全部写读。Tasks.ReadWrite.All

HTTP 请求HTTP request

在请求中,标识资源实例,使用资源实例的 extensions 导航属性标识扩展插件,然后对此扩展插件实例执行 DELETEIn the request, identify the resource instance, use the extensions navigation property of that instance to identify the extension, and do a DELETE on that extension instance.

DELETE /devices/{Id}/extensions/{extensionId}
DELETE /users/{id|userPrincipalName}/events/{id}/extensions/{extensionId}
DELETE /groups/{id}/extensions/{extensionId}
DELETE /groups/{id}/events/{id}/extensions/{extensionId}
DELETE /groups/{id}/threads/{id}/posts/{id}/extensions/{extensionId}
DELETE /users/{id|userPrincipalName}/messages/{id}/extensions/{extensionId}
DELETE /organization/{Id}/extensions/{extensionId}
DELETE /users/{id|userPrincipalName}/contacts/{id}/extensions/{extensionId}
DELETE /users/{id|userPrincipalName}/extensions/{extensionId}
DELETE /users/me/todo/lists/{todoTaskListId}/extensions/{extensionId}
DELETE /users/me/todo/lists/{todoTaskListId}/tasks/{taskId}/extensions/{extensionId}

注意: 以上语法显示了一些标识资源实例的常见方法,以便从中删除扩展。可以用来标识这些资源实例的所有其他语法均支持以类似的方式从中删除开放扩展。Note: The above syntax shows some common ways to identify a resource instance, in order to delete an extension from it. All other syntax that allows you to identify these resource instances supports deleting open extensions from them in a similar way.

路径参数Path parameters

参数Parameter 类型Type 说明Description
idid stringstring 实例在相应集合中的唯一标识符。必需。A unique identifier for an instance in the corresponding collection. Required.
extensionIdextensionId stringstring 这可以是一个扩展名称(即扩展的唯一文本标识符)或完全限定的名称(连接扩展类型和唯一文本标识符)。创建扩展时,在 id 属性中返回完全限定的名称。必需。This can be an extension name which is a unique text identifier for the extension, or a fully qualified name which concatenates the extension type and unique text identifier. The fully qualified name is returned in the id property when you create the extension. Required.

请求标头Request headers

名称Name Value
AuthorizationAuthorization Bearer {token}。必需。Bearer {token}. Required.

请求正文Request body

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

响应Response

如果成功,此方法返回 204 No Content 响应代码。它不在响应正文中返回任何内容。If successful, this method returns 204 No Content response code. It does not return anything in the response body.

示例Example

请求Request

第一个示例按其名称引用扩展并删除指定邮件中的扩展。The first example references an extension by its name and deletes the extension in the specified message.

DELETE https://graph.microsoft.com/v1.0/me/messages/AAMkAGE1M2IyNGNmLTI5MTktNDUyZi1iOTVl===/extensions/Com.Contoso.Referral

第二个示例删除指定组事件中的扩展。The second example deletes an extension in the specified group event.

DELETE https://graph.microsoft.com/v1.0/groups/f5480dfd-7d77-4d0b-ba2e-3391953cc74a/events/AAMkADVlN17IsAAA=/extensions/Com.Contoso.Referral
响应Response

下面是一个响应示例。Here is an example of the response.

HTTP/1.1 204 No Content