GroupItems: delete
请求
HTTP 请求
DELETE https://youtubeanalytics.googleapis.com/v2/groupItems
授权
此请求需要获得以下至少一个范围的授权(详细了解身份验证和授权)。
范围 |
https://www.googleapis.com/auth/yt-analytics.readonly |
查看 YouTube 分析工具为您的 YouTube 内容出具的报告。此范围可让您访问用户活动指标,例如观看次数和评分次数。 |
https://www.googleapis.com/auth/yt-analytics-monetary.readonly |
查看 YouTube 分析工具为您的 YouTube 内容出具的财务报告。此范围提供用户活动指标、估算收入和广告效果指标的访问权限。 |
https://www.googleapis.com/auth/youtube |
管理您的 YouTube 账号。在 YouTube Analytics API 中,频道所有者使用此作用域来管理 YouTube 数据分析组和组项。 |
https://www.googleapis.com/auth/youtubepartner |
在 YouTube 上查看和管理 YouTube 资产和相关内容。在 YouTube Analytics API 中,内容所有者使用此作用域来管理 YouTube 数据分析组和组项。 |
参数
下表列出了此查询支持的参数。列出的所有参数都是查询参数。
参数 |
必需参数 |
id |
string
id 参数指定要删除的组的 YouTube 组项 ID。 |
可选参数 |
onBehalfOfContentOwner |
string
此参数只能在经过适当授权的请求中使用。注意:此参数仅适用于拥有和管理许多不同 YouTube 频道的 YouTube 内容合作伙伴。
onBehalfOfContentOwner 参数表示请求的授权凭据标识了代表参数值中指定的内容所有者行事的 YouTube 用户。借助此功能,内容所有者只需进行一次身份验证,即可访问其所有视频和频道数据,而无需为每个频道分别提供身份验证凭据。用户进行身份验证时使用的账号必须与指定的 YouTube 内容所有者相关联。 |
响应
如果成功,此方法将返回 HTTP 204
响应代码 (No Content
)。
错误
下表列出了该 API 在响应对此方法的调用时可能会返回的错误消息。如需了解详情,请参阅错误消息文档。
错误类型 |
错误详情 |
说明 |
notFound (404) |
groupItemNotFound |
找不到使用请求的 id 属性标识的组项。 |
试试看!
使用 APIs Explorer 调用此 API 并查看 API 请求和响应。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-11-09。
[null,null,["最后更新时间 (UTC):2024-11-09。"],[[["This API endpoint is used to delete a specific item from a YouTube Analytics group using its unique ID."],["The request requires authorization using one of the listed scopes, with varying levels of access to YouTube Analytics data, from readonly to managing account and content."],["The `id` parameter is mandatory and specifies the unique identifier of the group item to be removed."],["The `onBehalfOfContentOwner` parameter is an optional parameter, exclusively for YouTube content partners, to authorize requests on behalf of a specific content owner."],["A successful request returns an HTTP `204` status code, and a `notFound` error occurs if the specified group item cannot be found."]]],["This documentation details the process of removing an item from a YouTube Analytics group via a `DELETE` HTTP request to `https://youtubeanalytics.googleapis.com/v2/groupItems`. Authorization is required, using specific scopes like `yt-analytics.readonly`, `yt-analytics-monetary.readonly`, `youtube`, or `youtubepartner`. The request requires the `id` parameter specifying the group item's ID. An optional `onBehalfOfContentOwner` parameter allows content owners to manage multiple channels. Successful deletion returns a `204` status; a `404` error occurs if the item isn't found.\n"]]