Drives: update

Stay organized with collections Save and categorize content based on your preferences.

Updates the metadata for a shared drive. Try it now.

Request

HTTP request

PUT https://www.googleapis.com/drive/v2/drives/driveId

Parameters

Parameter name Value Description
Path parameters
driveId string The ID of the shared drive.
Optional query parameters
useDomainAdminAccess boolean Issue the request as a domain administrator; if set to true, then the requester will be granted access if they are an administrator of the domain to which the shared drive belongs. (Default: false)

Authorization

This request requires authorization with the following scope:

Scope
https://www.googleapis.com/auth/drive

Some scopes are restricted and require a security assessment for your app to use them. For more information, see the authentication and authorization page.

Request body

In the request body, supply a Drives resource with the following properties:

Property name Value Description Notes
Optional Properties
backgroundImageFile object An image file and cropping parameters from which a background image for this shared drive is set. This is a write only field; it can only be set on drive.drives.update requests that don't set themeId. When specified, all fields of the backgroundImageFile must be set. writable
colorRgb string The color of this shared drive as an RGB hex string. It can only be set on a drive.drives.update request that does not set themeId. writable
name string The name of this shared drive. writable
restrictions object A set of restrictions that apply to this shared drive or items inside this shared drive. writable
themeId string The ID of the theme from which the background image and color will be set. The set of possible driveThemes can be retrieved from a drive.about.get response. When not specified on a drive.drives.insert request, a random theme is chosen from which the background image and color are set. This is a write-only field; it can only be set on requests that don't set colorRgb or backgroundImageFile. writable

Response

If successful, this method returns a Drives resource in the response body.

Try it!

Use the APIs Explorer below to call this method on live data and see the response.