Google

Drive Labels API

An API for managing Drive Labels

Productivity & workspace#openapi#analytics#media

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

An API for managing Drive Labels

Endpoints 17

labels

  • GETList labels/v2/labels?customer=string&languageCode=string&minimumRole=LABEL_ROLE_UNSPECIFIED&pageSize=0&pageToken=string&publishedOnly=true&useAdminAccess=true&view=LABEL_VIEW_BASICList labels. For more information, see Search for labels.
  • POSTCreates a label/v2/labels?languageCode=string&useAdminAccess=trueCreates a label. For more information, see Create and publish a label.
  • POSTUpdates a single label by applying a set of update requests resulting in a new draft revision/v2/:name:deltaUpdates a single label by applying a set of update requests resulting in a new draft revision. For more information, see Update a label. The batch update is…
  • POSTDisable a published label/v2/:name:disableDisable a published label. For more information, see Disable, enable, and delete a label. Disabling a label will result in a new disabled published revision…
  • POSTEnable a disabled label and restore it to its published state/v2/:name:enableEnable a disabled label and restore it to its published state. For more information, see Disable, enable, and delete a label. This will result in a new…
  • POSTPublish all draft changes to the label/v2/:name:publishPublish all draft changes to the label. Once published, the label may not return to its draft state. For more information, see Create and publish a label.…
  • POSTUpdates a label's `CopyMode`/v2/:name:updateLabelCopyModeUpdates a label's CopyMode. Changes to this policy aren't revisioned, don't require publishing, and take effect immediately.
  • POSTUpdates a label's `EnabledAppSettings`/v2/:name:updateLabelEnabledAppSettingsUpdates a label's EnabledAppSettings. Enabling a label in a Google Workspace app allows it to be used in that app. This change isn't revisioned, doesn't…

users

  • GETGets the user capabilities./v2/:name?customer=stringGets the user capabilities.

labels.revisions.permissions

  • DELETEDeletes a label's permission/v2/:name?useAdminAccess=trueDeletes a label's permission. Permissions affect the label resource as a whole, aren't revisioned, and don't require publishing.
  • GETLists a label's permissions./v2/:parent/permissions?pageSize=0&pageToken=string&useAdminAccess=trueLists a label's permissions.
  • POSTUpdates a label's permissions/v2/:parent/permissions?useAdminAccess=trueUpdates a label's permissions. If a permission for the indicated principal doesn't exist, a label permission is created, otherwise the existing permission is…
  • POSTDeletes label permissions/v2/:parent/permissions:batchDeleteDeletes label permissions. Permissions affect the label resource as a whole, aren't revisioned, and don't require publishing.
  • POSTUpdates label permissions/v2/:parent/permissions:batchUpdateUpdates label permissions. If a permission for the indicated principal doesn't exist, a label permission is created, otherwise the existing permission is…

labels.revisions

  • PATCHUpdates a label's permissions/v2/:parent/permissions?useAdminAccess=trueUpdates a label's permissions. If a permission for the indicated principal doesn't exist, a label permission is created, otherwise the existing permission is…

labels.revisions.locks

  • GETLists the label locks on a label./v2/:parent/locks?pageSize=0&pageToken=stringLists the label locks on a label.

limits

  • GETGet the constraints on the structure of a label; such as, the maximum number of fields allowed and maximum length of…/v2/limits/label?name=stringGet the constraints on the structure of a label; such as, the maximum number of fields allowed and maximum length of the label title.

API details

Base URL
https://drivelabels.googleapis.com
Authentication
OAuth 2.0 (authorization code flow) with 4 scopes
An API key in the key query parameter
Operations
17 operations on 13 pathsPOST 10GET 5PATCH 1DELETE 1
Main resources
labels 8labels.revisions.permissions 5labels.revisions 1labels.revisions.locks 1limits 1users 1
Response formats
application/json
Description format
Google API Discovery, API version v2

How to test the Drive Labels API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Drive Labels API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses OAuth 2.0 (authorization code flow) with 4 scopes. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “List labels” (GET /v2/labels?customer=string&languageCode=string&minimumRole=LABEL_ROLE_UNSPECIFIED&pageSize=0&pageToken=string&publishedOnly=true&useAdminAccess=true&view=LABEL_VIEW_BASIC), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Drive Labels API?

An API for managing Drive Labels It is listed under Productivity & workspace and has 17 endpoints.

Who publishes the Drive Labels API?

It is listed from Google's public API description (an OpenAPI document), not published by Google on Swastik Codes. Anyone who controls googleapis.com can claim the profile by adding a DNS TXT record.

What is the base URL of the Drive Labels API?

Requests go to https://drivelabels.googleapis.com. Endpoint paths are added to this base URL.

How do I authenticate with the Drive Labels API?

It accepts 2 methods: OAuth 2.0 (authorization code flow) with 4 scopes; an API key in the key query parameter.

How many endpoints does the Drive Labels API have?

17 operations on 13 paths (10 POST, 5 GET, 1 PATCH, 1 DELETE). The largest groups are labels, labels.revisions.permissions, labels.revisions, labels.revisions.locks.

Is forking the Drive Labels API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.