Creates a new shared drive. Try it now.
Request
HTTP request
POST https://www.googleapis.com/drive/v2/drives
Parameters
Parameter name | Value | Description |
---|---|---|
Required query parameters | ||
requestId |
string |
An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a shared drive. A repeated request by the same user and with the same request ID will avoid creating duplicates by attempting to create the same shared drive. If the shared drive already exists a 409 error will be returned. |
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 |
---|---|---|---|
Required Properties | |||
name |
string |
The name of this shared drive. | writable |
Optional Properties | |||
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.