Drive Labels API (drivelabels:v2beta)

2022-08-03

25 new methods | New API

Additions

    Methods
  • drivelabels.limits.getLabel

      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.

      Flat Path: v2beta/limits/label

      Parameters:

        name

          Type: string

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

          Location: query

      Path: v2beta/limits/label

      HTTP Method: GET

  • drivelabels.users.getCapabilities

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

      Parameter Order: name

      Description: Gets the user capabilities.

      HTTP Method: GET

      Parameters:

        name

          Required: Yes

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

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

          Location: path

          Type: string

      Path: v2beta/{+name}

  • drivelabels.labels.list

      HTTP Method: GET

      Parameters:

        publishedOnly

          Description: Whether to include only published labels in the results. * When `true`, only the current published label revisions will be returned. Disabled labels will be included. Returned Label resource names will reference the published revision (`labels/{id}/{revision_id}`). * When `false`, the current label revisions will be returned, which may not by published. Returned Label resource names will not reference a specific revision (`labels/{id}`).

          Type: boolean

          Location: query

        minimumRole

          Type: string

          Enum Descriptions:

        • Unknown role.
        • A reader can read the Label and associated metadata applied to Drive items.
        • An applier can write associated metadata on Drive items in which they also have write access to. Implies `READER`.
        • An organizer is allowed to pin this label in shared drives they manage and add new appliers to the label.
        • Editors may make any updates including deleting the Label which will also delete associated Drive item metadata. Implies `APPLIER`.
        • Description: 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`.

          Enum:

        • LABEL_ROLE_UNSPECIFIED
        • READER
        • APPLIER
        • ORGANIZER
        • EDITOR
        • Location: query

        pageSize

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

          Type: integer

          Format: int32

          Location: query

        languageCode

          Type: string

          Location: query

          Description: The BCP-47 language code to use for evaluating localized field labels. When not specified, values in the default configured language will be used.

        view

          Description: When specified, only certain fields belonging to the indicated view will be returned.

          Location: query

          Type: string

          Enum Descriptions:

        • Implies the field mask: `name,id,revision_id,label_type,properties.*`
        • All possible fields.
        • Enum:

        • LABEL_VIEW_BASIC
        • LABEL_VIEW_FULL

        useAdminAccess

          Location: query

          Description: Set to `true` in order to use the user's admin credentials. This will return all Labels within the customer.

          Type: boolean

        pageToken

          Type: string

          Location: query

          Description: The token of the page to return.

      Flat Path: v2beta/labels

      Path: v2beta/labels

      Description: ## Label APIs --------------------------------------------------------------- List Labels.

  • drivelabels.labels.get

      Flat Path: v2beta/labels/{labelsId}

      Parameters:

        view

          Type: string

          Enum Descriptions:

        • Implies the field mask: `name,id,revision_id,label_type,properties.*`
        • All possible fields.
        • Enum:

        • LABEL_VIEW_BASIC
        • LABEL_VIEW_FULL
        • Location: query

          Description: When specified, only certain Fields belonging to the indicated view will be returned.

        name

          Type: string

          Location: path

          Description: Required. Label resource name. May be any of: * `labels/{id}` (equivalent to labels/{id}@latest) * `labels/{id}@latest` * `labels/{id}@published` * `labels/{id}@{revision_id}`

          Pattern: ^labels/[^/]+$

          Required: Yes

        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

        languageCode

          Type: string

          Description: The BCP-47 language code to use for evaluating localized Field labels. When not specified, values in the default configured language will be used.

          Location: query

      Path: v2beta/{+name}

      HTTP Method: GET

      Description: Get a Label by its resource name. Resource name may be any of: * `labels/{id}` - See to `labels/{id}@latest` * `labels/{id}@latest` - Gets the latest revision of the Label. * `labels/{id}@published` - Gets the current published revision of the Label. * `labels/{id}@{revision_id}` - Gets the Label at the specified revision ID.

      Parameter Order: name

  • drivelabels.labels.enable

      HTTP Method: POST

      Path: v2beta/{+name}:enable

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

      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.

      Parameter Order: name

      Parameters:

        name

          Location: path

          Pattern: ^labels/[^/]+$

          Required: Yes

          Type: string

          Description: Required. Label resource name.

  • drivelabels.labels.updateLabelCopyMode

      Path: v2beta/{+name}:updateLabelCopyMode

      Parameters:

        name

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

          Type: string

          Required: Yes

          Pattern: ^labels/[^/]+$

          Location: path

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

      HTTP Method: POST

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

      Parameter Order: name

  • drivelabels.labels.publish

      Parameters:

        name

          Required: Yes

          Type: string

          Pattern: ^labels/[^/]+$

          Location: path

          Description: Required. Label resource name.

      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.

      HTTP Method: POST

      Path: v2beta/{+name}:publish

      Parameter Order: name

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

  • drivelabels.labels.delta

      Parameter Order: name

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

      HTTP Method: POST

      Path: v2beta/{+name}:delta

      Parameters:

        name

          Required: Yes

          Pattern: ^labels/[^/]+$

          Location: path

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

          Type: string

      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.

  • drivelabels.labels.create

      Flat Path: v2beta/labels

      Path: v2beta/labels

      Parameters:

        languageCode

          Type: string

          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

        useAdminAccess

          Location: query

          Type: boolean

          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.

      Description: Creates a new Label.

      HTTP Method: POST

  • drivelabels.labels.delete

      Path: v2beta/{+name}

      Flat Path: v2beta/labels/{labelsId}

      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

      Parameters:

        writeControl.requiredRevisionId

          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

          Type: string

        name

          Description: Required. Label resource name.

          Pattern: ^labels/[^/]+$

          Required: Yes

          Type: string

          Location: path

        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

      HTTP Method: DELETE

  • drivelabels.labels.disable

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

      Parameter Order: name

      Path: v2beta/{+name}:disable

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

      HTTP Method: POST

      Parameters:

        name

          Location: path

          Required: Yes

          Type: string

          Description: Required. Label resource name.

          Pattern: ^labels/[^/]+$

  • drivelabels.labels.locks.list

      HTTP Method: GET

      Description: Lists the Locks on a Label.

      Path: v2beta/{+parent}/locks

      Parameters:

        parent

          Type: string

          Location: path

          Pattern: ^labels/[^/]+$

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

          Required: Yes

        pageSize

          Location: query

          Type: integer

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

          Format: int32

        pageToken

          Type: string

          Location: query

          Description: The token of the page to return.

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

      Parameter Order: parent

  • drivelabels.labels.revisions.locks.list

      HTTP Method: GET

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

      Path: v2beta/{+parent}/locks

      Parameters:

        parent

          Location: path

          Required: Yes

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

          Type: string

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

        pageToken

          Description: The token of the page to return.

          Location: query

          Type: string

        pageSize

          Format: int32

          Type: integer

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

          Location: query

      Parameter Order: parent

      Description: Lists the Locks on a Label.

  • drivelabels.labels.revisions.permissions.patch

      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.

        parent

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

          Type: string

          Description: Required. The parent Label resource name.

          Location: path

          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: v2beta/{+parent}

      HTTP Method: PATCH

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

      Parameter Order: parent

  • drivelabels.labels.revisions.permissions.batchDelete

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

      HTTP Method: POST

      Parameter Order:

    • labelsId
    • revisionsId
    • Path: v2beta/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.

      Parameters:

        labelsId

          Required: Yes

          Location: path

          Type: string

        revisionsId

          Type: string

          Required: Yes

          Location: path

  • drivelabels.labels.revisions.permissions.create

      HTTP Method: POST

      Path: v2beta/{+parent}/permissions

      Parameter Order: parent

      Parameters:

        parent

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

          Type: string

          Location: path

          Required: Yes

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

        useAdminAccess

          Type: boolean

          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.

      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: v2beta/labels/{labelsId}/revisions/{revisionsId}/permissions

  • drivelabels.labels.revisions.permissions.delete

      HTTP Method: DELETE

      Path: v2beta/{+name}

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

      Parameter Order: name

      Parameters:

        name

          Type: string

          Location: path

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

          Required: Yes

          Description: Required. Label Permission resource name.

        useAdminAccess

          Type: boolean

          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.

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

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

      Parameter Order: parent

      Parameters:

        parent

          Type: string

          Location: path

          Required: Yes

          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.

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

      HTTP Method: POST

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

      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.

  • drivelabels.labels.revisions.permissions.list

      Parameters:

        pageToken

          Type: string

          Description: The token of the page to return.

          Location: query

        pageSize

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

          Type: integer

          Location: query

          Format: int32

        parent

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

          Location: path

          Type: string

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

          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

      Description: Lists a Label's permissions.

      Parameter Order: parent

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

      Path: v2beta/{+parent}/permissions

      HTTP Method: GET

  • drivelabels.labels.permissions.batchUpdate

      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.

      HTTP Method: POST

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

      Parameters:

        parent

          Required: Yes

          Location: path

          Pattern: ^labels/[^/]+$

          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.

          Type: string

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

  • drivelabels.labels.permissions.delete

      Parameters:

        useAdminAccess

          Type: boolean

          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.

        name

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

          Required: Yes

          Description: Required. Label Permission resource name.

          Type: string

          Location: path

      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: v2beta/labels/{labelsId}/permissions/{permissionsId}

      Path: v2beta/{+name}

  • drivelabels.labels.permissions.list

      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

        pageSize

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

          Type: integer

          Location: query

          Format: int32

        pageToken

          Location: query

          Type: string

          Description: The token of the page to return.

        parent

          Location: path

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

          Type: string

          Pattern: ^labels/[^/]+$

          Required: Yes

      Path: v2beta/{+parent}/permissions

      Parameter Order: parent

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

      Description: Lists a Label's permissions.

      HTTP Method: GET

  • drivelabels.labels.permissions.create

      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

          Location: path

          Type: string

          Required: Yes

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

          Pattern: ^labels/[^/]+$

      Path: v2beta/{+parent}/permissions

      HTTP Method: POST

      Parameter Order: parent

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

      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.

  • drivelabels.labels.permissions.batchDelete

      Parameters:

        labelsId

          Location: path

          Type: string

          Required: Yes

      HTTP Method: POST

      Parameter Order: labelsId

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

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

      Path: v2beta/labels/{labelsId}/permissions:batchDelete

  • drivelabels.labels.permissions.patch

      Parameters:

        parent

          Location: path

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

          Description: Required. The parent Label resource name.

          Type: string

          Required: Yes

        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

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

      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: v2beta/{+parent}

      HTTP Method: PATCH

      Parameter Order: parent