2

How get/change a File Sensitivity level (label) via google drive api? This label could have the field options: Top Secret, Internal, Public, and Private. I need to change the sensitivity level programmatically after uploading a file to google drive.

Is there a way to get/change a File Sensitivity level (label) via Google Cloud Data Loss Prevention (DLP) API?

Anton Magov
  • 186
  • 1
  • 14

1 Answers1

2

According to this Help Center article, to edit labels programmatically, you need to request access to the labels API beta.

Email drive-labels-feedback@google.com to request access to the labels API beta.

Lorena Gomez
  • 1,946
  • 2
  • 4
  • 11
  • maybe there are other ways? – Anton Magov May 10 '22 at 05:48
  • @AntonMagov I went through the [official documentation](https://cloud.google.com/dlp/docs/reference/rest) for the Cloud Data Loss Prevention (DLP) API and there is no information mentioned about Drive labels management. Note that the Drive labels feature in itself is new in the UI and at the moment it seems that the only option to edit labels programmatically, you will need to request access to the labels API beta. – Lorena Gomez May 10 '22 at 20:15
  • Cloud DLP does not share information about Drive. You'll need to use the workspace api. – Jordanna Chord May 11 '22 at 15:35