Google 驱动器 API: 为附件应用标签

Google Drive API: Apply label to the attachments

关于上传附件时应用标签的问题。

我能够通过 API 将附件上传到 google 驱动器。上传附件时是否可以应用标签。请指教

允许为 Google 工作区的驱动器文件元数据添加标签的功能目前处于测试阶段。

Beta: Use automated classification with DLP for Drive

由于它是测试版功能,此功能尚未添加到 Google 驱动器 API,也没有发布任何信息表明它将在未来添加到 google 驱动器 api.

我强烈建议您添加功能请求,以便 Google 知道您也希望能够在他们的 API 中使用此新功能 feature request

2021年12月7日起announcement(大胆选择我的):

Earlier this year we announced a beta for three features which can help categorize content and enhance content protection at scale. Drive labels are now generally available, and automated classification with Workspace data loss prevention and labels-driven sharing restrictions will become generally available in the coming weeks. Check back on the Workspace blog for updates.

此外,根据 help article:

,对于标签的 API 用法,它似乎是可用的

Is it possible to apply labels through an API?

There is a labels API (beta) that you can use to create, edit, apply, and remove labels programmatically. Email drive-labels-feedback@google.com to request access to the labels API beta.