Drive Labels API (drivelabels:v2)

2023-03-03

23 new methods

Additions

    Methods
  • drivelabels.labels.updatePermissions

      Parameter Order: parent

      Parameters:

        useAdminAccess

          Location: query

          Description: 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.

          Type: boolean

        parent

          Description: Required. The parent Label resource name.

          Location: path

          Required: Yes

          Pattern: ^labels/[^/]+$

          Type: string

      Description: 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 Method: PATCH

      Flat Path: v2/labels/{labelsId}/permissions

      Path: v2/{+parent}/permissions

  • drivelabels.labels.delta

      Path: v2/{+name}:delta

      Parameter Order: name

      Parameters:

        name

          Description: Required. The resource name of the Label to update.

          Location: path

          Pattern: ^labels/[^/]+$

          Required: Yes

          Type: string

      Flat Path: v2/labels/{labelsId}:delta

      Description: 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.

      HTTP Method: POST

  • drivelabels.labels.publish

      Parameters:

        name

          Type: string

          Description: Required. Label resource name.

          Pattern: ^labels/[^/]+$

          Required: Yes

          Location: path

      Flat Path: v2/labels/{labelsId}:publish

      Parameter Order: name

      Path: v2/{+name}:publish

      HTTP Method: POST

      Description: 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.

  • drivelabels.labels.disable

      HTTP Method: POST

      Flat Path: v2/labels/{labelsId}:disable

      Path: v2/{+name}:disable

      Parameters:

        name

          Location: path

          Required: Yes

          Type: string

          Pattern: ^labels/[^/]+$

          Description: Required. Label resource name.

      Parameter Order: name

      Description: 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`.

  • drivelabels.labels.delete

      Parameters:

        useAdminAccess

          Location: query

          Type: boolean

          Description: 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

          Type: string

          Description: 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.

          Location: query

        name

          Location: path

          Description: Required. Label resource name.

          Pattern: ^labels/[^/]+$

          Required: Yes

          Type: string

      Description: Permanently deletes a Label and related metadata on Drive Items. Once deleted, the Label and related Drive item metadata will be deleted. Only draft Labels, and disabled Labels may be deleted.

      Parameter Order: name

      Flat Path: v2/labels/{labelsId}

      Path: v2/{+name}

      HTTP Method: DELETE

  • drivelabels.labels.enable

      HTTP Method: POST

      Description: 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.

      Parameters:

        name

          Description: Required. Label resource name.

          Type: string

          Required: Yes

          Location: path

          Pattern: ^labels/[^/]+$

      Flat Path: v2/labels/{labelsId}:enable

      Parameter Order: name

      Path: v2/{+name}:enable

  • drivelabels.labels.create

      Parameters:

        languageCode

          Description: 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.

          Location: query

          Type: string

        useAdminAccess

          Description: Set to `true` in order to use the user's admin privileges. The server will verify the user is an admin before allowing access.

          Location: query

          Type: boolean

      HTTP Method: POST

      Description: Creates a new Label.

      Path: v2/labels

      Flat Path: v2/labels

  • drivelabels.labels.updateLabelCopyMode

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

      Parameters:

        name

          Pattern: ^labels/[^/]+$

          Required: Yes

          Description: Required. The resource name of the Label to update.

          Location: path

          Type: string

      Path: v2/{+name}:updateLabelCopyMode

      HTTP Method: POST

      Parameter Order: name

      Flat Path: v2/labels/{labelsId}:updateLabelCopyMode

  • drivelabels.labels.locks.list

      Parameters:

        parent

          Description: Required. Label on which Locks are applied. Format: labels/{label}

          Required: Yes

          Pattern: ^labels/[^/]+$

          Location: path

          Type: string

        pageToken

          Description: The token of the page to return.

          Type: string

          Location: query

        pageSize

          Type: integer

          Location: query

          Format: int32

          Description: Maximum number of Locks to return per page. Default: 100. Max: 200.

      Path: v2/{+parent}/locks

      Parameter Order: parent

      Description: Lists the LabelLocks on a Label.

      Flat Path: v2/labels/{labelsId}/locks

      HTTP Method: GET

  • drivelabels.labels.revisions.permissions.list

      Parameter Order: parent

      HTTP Method: GET

      Description: Lists a Label's permissions.

      Parameters:

        parent

          Required: Yes

          Pattern: ^labels/[^/]+/revisions/[^/]+$

          Type: string

          Description: Required. The parent Label resource name on which Label Permission are listed. Format: labels/{label}

          Location: path

        pageSize

          Format: int32

          Description: Maximum number of permissions to return per page. Default: 50. Max: 200.

          Location: query

          Type: integer

        useAdminAccess

          Description: 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.

          Type: boolean

          Location: query

        pageToken

          Location: query

          Description: The token of the page to return.

          Type: string

      Path: v2/{+parent}/permissions

      Flat Path: v2/labels/{labelsId}/revisions/{revisionsId}/permissions

  • drivelabels.labels.revisions.permissions.batchDelete

      Parameter Order: parent

      HTTP Method: POST

      Flat Path: v2/labels/{labelsId}/revisions/{revisionsId}/permissions:batchDelete

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

      Path: v2/{+parent}/permissions:batchDelete

      Parameters:

        parent

          Description: 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.

          Required: Yes

          Pattern: ^labels/[^/]+/revisions/[^/]+$

          Type: string

          Location: path

  • drivelabels.labels.revisions.permissions.batchUpdate

      Path: v2/{+parent}/permissions:batchUpdate

      Flat Path: v2/labels/{labelsId}/revisions/{revisionsId}/permissions:batchUpdate

      Parameters:

        parent

          Description: 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.

          Required: Yes

          Type: string

          Location: path

          Pattern: ^labels/[^/]+/revisions/[^/]+$

      Description: 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.

      Parameter Order: parent

      HTTP Method: POST

  • drivelabels.labels.revisions.permissions.delete

      Parameter Order: name

      HTTP Method: DELETE

      Path: v2/{+name}

      Flat Path: v2/labels/{labelsId}/revisions/{revisionsId}/permissions/{permissionsId}

      Parameters:

        name

          Required: Yes

          Description: Required. Label Permission resource name.

          Type: string

          Location: path

          Pattern: ^labels/[^/]+/revisions/[^/]+/permissions/[^/]+$

        useAdminAccess

          Location: query

          Description: 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.

          Type: boolean

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

  • drivelabels.labels.revisions.permissions.create

      Flat Path: v2/labels/{labelsId}/revisions/{revisionsId}/permissions

      HTTP Method: POST

      Parameters:

        useAdminAccess

          Location: query

          Description: 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.

          Type: boolean

        parent

          Description: Required. The parent Label resource name on the Label Permission is created. Format: labels/{label}

          Location: path

          Type: string

          Pattern: ^labels/[^/]+/revisions/[^/]+$

          Required: Yes

      Description: 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.

      Path: v2/{+parent}/permissions

      Parameter Order: parent

  • drivelabels.labels.revisions.locks.list

      Parameters:

        pageSize

          Description: Maximum number of Locks to return per page. Default: 100. Max: 200.

          Location: query

          Format: int32

          Type: integer

        parent

          Pattern: ^labels/[^/]+/revisions/[^/]+$

          Required: Yes

          Type: string

          Description: Required. Label on which Locks are applied. Format: labels/{label}

          Location: path

        pageToken

          Description: The token of the page to return.

          Type: string

          Location: query

      HTTP Method: GET

      Flat Path: v2/labels/{labelsId}/revisions/{revisionsId}/locks

      Description: Lists the LabelLocks on a Label.

      Path: v2/{+parent}/locks

      Parameter Order: parent

  • drivelabels.labels.revisions.updatePermissions

      Description: 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.

      Flat Path: v2/labels/{labelsId}/revisions/{revisionsId}/permissions

      Parameters:

        useAdminAccess

          Description: 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.

          Type: boolean

          Location: query

        parent

          Description: Required. The parent Label resource name.

          Location: path

          Type: string

          Pattern: ^labels/[^/]+/revisions/[^/]+$

          Required: Yes

      HTTP Method: PATCH

      Path: v2/{+parent}/permissions

      Parameter Order: parent

  • drivelabels.labels.permissions.list

      Path: v2/{+parent}/permissions

      HTTP Method: GET

      Description: Lists a Label's permissions.

      Parameter Order: parent

      Flat Path: v2/labels/{labelsId}/permissions

      Parameters:

        pageToken

          Location: query

          Description: The token of the page to return.

          Type: string

        pageSize

          Format: int32

          Type: integer

          Location: query

          Description: Maximum number of permissions to return per page. Default: 50. Max: 200.

        parent

          Description: Required. The parent Label resource name on which Label Permission are listed. Format: labels/{label}

          Type: string

          Required: Yes

          Pattern: ^labels/[^/]+$

          Location: path

        useAdminAccess

          Description: 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.

          Type: boolean

          Location: query

  • drivelabels.labels.permissions.delete

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

      HTTP Method: DELETE

      Parameter Order: name

      Flat Path: v2/labels/{labelsId}/permissions/{permissionsId}

      Path: v2/{+name}

      Parameters:

        name

          Pattern: ^labels/[^/]+/permissions/[^/]+$

          Location: path

          Description: Required. Label Permission resource name.

          Type: string

          Required: Yes

        useAdminAccess

          Description: 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.

          Location: query

          Type: boolean

  • drivelabels.labels.permissions.create

      Parameters:

        parent

          Type: string

          Description: Required. The parent Label resource name on the Label Permission is created. Format: labels/{label}

          Location: path

          Required: Yes

          Pattern: ^labels/[^/]+$

        useAdminAccess

          Description: 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.

          Location: query

          Type: boolean

      HTTP Method: POST

      Description: 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.

      Parameter Order: parent

      Flat Path: v2/labels/{labelsId}/permissions

      Path: v2/{+parent}/permissions

  • drivelabels.labels.permissions.batchUpdate

      Path: v2/{+parent}/permissions:batchUpdate

      HTTP Method: POST

      Parameters:

        parent

          Location: path

          Description: 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.

          Required: Yes

          Type: string

          Pattern: ^labels/[^/]+$

      Parameter Order: parent

      Description: 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.

      Flat Path: v2/labels/{labelsId}/permissions:batchUpdate

  • drivelabels.labels.permissions.batchDelete

      Parameters:

        parent

          Required: Yes

          Type: string

          Pattern: ^labels/[^/]+$

          Location: path

          Description: 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.

      Path: v2/{+parent}/permissions:batchDelete

      HTTP Method: POST

      Parameter Order: parent

      Flat Path: v2/labels/{labelsId}/permissions:batchDelete

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

  • drivelabels.limits.getLabel

      Flat Path: v2/limits/label

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

      Path: v2/limits/label

      Parameters:

        name

          Type: string

          Description: Required. Label revision resource name Must be: "limits/label"

          Location: query

      HTTP Method: GET

  • drivelabels.users.getCapabilities

      Flat Path: v2/users/{usersId}/capabilities

      HTTP Method: GET

      Parameter Order: name

      Parameters:

        name

          Required: Yes

          Pattern: ^users/[^/]+/capabilities$

          Location: path

          Description: Required. The resource name of the user. Only "users/me/capabilities" is supported.

          Type: string

      Description: Gets the user capabilities.

      Path: v2/{+name}