javagoogle-drive-apigoogle-cloud-dlp

How get/change a File Sensitivity level (label) via google drive api?


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?


Solution

  • 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.