Method: labels.permissions.create
Updates a Label's permissions. If a permission for the indicated principal doesn't exist, a new Label Permission is created, otherwise the existing permission is updated. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.
HTTP request
POST https://drivelabels.googleapis.com/v2beta/{parent=labels/*}/permissions
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters |
parent |
string
Required. The parent Label resource name on the Label Permission is created. Format: labels/{label}
|
Query parameters
Parameters |
useAdminAccess |
boolean
Set to true in order to use the user's admin credentials. The server will verify the user is an admin for the Label before allowing access.
|
Request body
The request body contains an instance of LabelPermission
.
Response body
If successful, the response body contains a newly created instance of LabelPermission
.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/drive.labels
https://www.googleapis.com/auth/drive.admin.labels
For more information, see the Authorization guide.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-04 UTC.
[null,null,["Last updated 2024-09-04 UTC."],[[["This API endpoint updates a Label's permissions, creating new ones if they don't exist and updating existing ones otherwise."],["Permissions apply to the entire Label resource, are not version-controlled, and don't need publishing."],["The request should be a `POST` to the provided URL, including the parent Label resource name as a path parameter."],["You can use query parameters to utilize admin credentials if the user has admin privileges for the Label."],["Authorization requires specific OAuth scopes related to Drive labels and potentially admin access."]]],["This document details updating a Label's permissions via a POST request to `https://drivelabels.googleapis.com/v2beta/{parent=labels/*}/permissions`. The `parent` path parameter specifies the Label, and `useAdminAccess` is a query parameter for admin credentials. The request body contains a `LabelPermission` instance; if successful, the response also contains a `LabelPermission` instance. Requires either `https://www.googleapis.com/auth/drive.labels` or `https://www.googleapis.com/auth/drive.admin.labels` OAuth scopes.\n"]]