APIHub
Back to Explore

Drive Labels API

The Drive Labels API provides operations for creating, listing, retrieving, updating, publishing, enabling, disabling, and deleting Drive label definitions and their revisions, as well as managing label constraints, copy mode, locks, permissions, and user capabilities.

Analytics
none
HTTPS
CORS: Unknown
Description enriched
Visit official documentation

Latency

144ms p95

Uptime

100.0% 30d

Playground

Verified

live

Endpoints

REST · JSON
POST

/v2beta/{name}:delta

Updates a single Label by applying a set of update requests resulting in a new draft revision. The batch update is all-or-nothing: If any of the update requests are invalid, no changes are applied. The resulting draft revision must be published before the changes may be used with Drive Items.

  • name (path, required) — Required. The resource name of the Label to update.
GET

/v2beta/labels

List labels.

  • customer (query) — The customer to scope this list request to. For example: "customers/abcd1234". If unset, will return all labels within the current customer.
  • languageCode (query) — The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language are used.
  • minimumRole (query) — Specifies the level of access the user must have on the returned Labels. The minimum role a user must have on a label. Defaults to `READER`.
  • pageSize (query, limit) — Maximum number of labels to return per page. Default: 50. Max: 200.
  • pageToken (query) — The token of the page to return.
  • publishedOnly (query) — Whether to include only published labels in the results. * When `true`, only the current published label revisions are returned. Disabled labels are included. Returned label resource names reference the published revision (`labels/{id}/{revision_id}`). * When `false`, the current label revisions are returned, which might not be published. Returned label resource names don't reference a specific revision (`labels/{id}`).
  • useAdminAccess (query) — Set to `true` in order to use the user's admin credentials. This will return all Labels within the customer.
  • view (query) — When specified, only certain fields belonging to the indicated view are returned.
POST

/v2beta/labels

Creates a new Label.

  • languageCode (query) — The BCP-47 language code to use for evaluating localized Field labels in response. When not specified, values in the default configured language will be used.
  • useAdminAccess (query) — Set to `true` in order to use the user's admin privileges. The server will verify the user is an admin before allowing access.
GET

/v2beta/limits/label

Get the constraints on the structure of a Label; such as, the maximum number of Fields allowed and maximum length of the label title.

  • name (query) — Required. Label revision resource name Must be: "limits/label"
DELETE

/v2beta/{name}

Deletes a Label's permission. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.

  • name (path, required) — Required. Label Permission resource name.
  • useAdminAccess (query) — 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.
  • writeControl.requiredRevisionId (query) — The revision_id of the label that the write request will be applied to. If this is not the latest revision of the label, the request will not be processed and will return a 400 Bad Request error.
GET

/v2beta/{name}

Gets the user capabilities.

  • name (path, required) — Required. The resource name of the user. Only "users/me/capabilities" is supported.
  • customer (query) — The customer to scope this request to. For example: "customers/abcd1234". If unset, will return settings within the current customer.
  • useAdminAccess (query) — Set to `true` in order to use the user's admin credentials. The server verifies that the user is an admin for the label before allowing access.
  • view (query) — When specified, only certain fields belonging to the indicated view are returned.
POST

/v2beta/{name}:disable

Disable a published Label. Disabling a Label will result in a new disabled published revision based on the current published revision. If there is a draft revision, a new disabled draft revision will be created based on the latest draft revision. Older draft revisions will be deleted. Once disabled, a label may be deleted with `DeleteLabel`.

  • name (path, required) — Required. Label resource name.
POST

/v2beta/{name}:enable

Enable a disabled Label and restore it to its published state. This will result in a new published revision based on the current disabled published revision. If there is an existing disabled draft revision, a new revision will be created based on that draft and will be enabled.

  • name (path, required) — Required. Label resource name.
POST

/v2beta/{name}:publish

Publish all draft changes to the Label. Once published, the Label may not return to its draft state. See `google.apps.drive.labels.v2.Lifecycle` for more information. Publishing a Label will result in a new published revision. All previous draft revisions will be deleted. Previous published revisions will be kept but are subject to automated deletion as needed. Once published, some changes are no longer permitted. Generally, any change that would invalidate or cause new restrictions on existing metadata related to the Label will be rejected. For example, the following changes to a Label will be rejected after the Label is published: * The label cannot be directly deleted. It must be disabled first, then deleted. * Field.FieldType cannot be changed. * Changes to Field validation options cannot reject something that was previously accepted. * Reducing the max entries.

  • name (path, required) — Required. Label resource name.
POST

/v2beta/{name}:updateLabelCopyMode

Updates a Label's `CopyMode`. Changes to this policy are not revisioned, do not require publishing, and take effect immediately.

  • name (path, required) — Required. The resource name of the Label to update.
GET

/v2beta/{parent}/locks

Lists the LabelLocks on a Label.

  • parent (path, required) — Required. Label on which Locks are applied. Format: labels/{label}
  • pageSize (query, limit) — Maximum number of Locks to return per page. Default: 100. Max: 200.
  • pageToken (query) — The token of the page to return.
GET

/v2beta/{parent}/permissions

Lists a Label's permissions.

  • parent (path, required) — Required. The parent Label resource name on which Label Permission are listed. Format: labels/{label}
  • pageSize (query, limit) — Maximum number of permissions to return per page. Default: 50. Max: 200.
  • pageToken (query) — The token of the page to return.
  • useAdminAccess (query) — 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.
PATCH

/v2beta/{parent}/permissions

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.

  • parent (path, required) — Required. The parent Label resource name.
  • useAdminAccess (query) — 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.
POST

/v2beta/{parent}/permissions

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.

  • parent (path, required) — Required. The parent Label resource name on the Label Permission is created. Format: labels/{label}
  • useAdminAccess (query) — 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.
POST

/v2beta/{parent}/permissions:batchDelete

Deletes Label permissions. Permissions affect the Label resource as a whole, are not revisioned, and do not require publishing.

  • parent (path, required) — Required. The parent Label resource name shared by all permissions being deleted. Format: labels/{label} If this is set, the parent field in the UpdateLabelPermissionRequest messages must either be empty or match this field.
POST

/v2beta/{parent}/permissions:batchUpdate

Updates Label 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.

  • parent (path, required) — Required. The parent Label resource name shared by all permissions being updated. Format: labels/{label} If this is set, the parent field in the UpdateLabelPermissionRequest messages must either be empty or match this field.

16 endpoints auto-detected

curl -X POST \
  "https://drivelabels.googleapis.com/v2beta/{name}:delta"

drivelabels.googleapis.com · HTTPS only