provider drives POST /drives
@utdk/google/drive /drives
drives.create
Creates a shared drive.
$.xgafv query
V1 error format.
enum: 1, 2
access_token query
OAuth access token.
string
alt query
Data format for response.
enum: json, media, proto
callback query
JSONP
string
fields query
Selector specifying which fields to include in a partial response.
string
key query
API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
string
oauth_token query
OAuth 2.0 token for the current user.
string
prettyPrint query
Returns response with indentations and line breaks.
boolean
quotaUser query
Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
string
upload_protocol query
Upload protocol for media (e.g. "raw", "multipart").
string
uploadType query
Legacy upload protocol for media (e.g. "media", "multipart").
string
requestId query required
Required. 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.
string

Try it

Authentication
Configure credentials for Google Drive API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

drivesCreate
POST/drives
Creates a shared drive.

V1 error format.

OAuth access token.

Data format for response.

JSONP

Selector specifying which fields to include in a partial response.

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

OAuth 2.0 token for the current user.

Returns response with indentations and line breaks.

Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

Upload protocol for media (e.g. "raw", "multipart").

Legacy upload protocol for media (e.g. "media", "multipart").

required

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

Input

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.

Output only. A short-lived link to this shared drive's background image.

Output only. Capabilities the current user has on this shared drive.

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

The time at which the shared drive was created (RFC 3339 date-time).

Whether the shared drive is hidden from default view.

Output only. The ID of this shared drive which is also the ID of the top level folder of this shared drive.

Output only. Identifies what kind of resource this is. Value: the fixed string `"drive#drive"`.

The name of this shared drive.

Output only. The organizational unit of this shared drive. This field is only populated on `drives.list` responses when the `useDomainAdminAccess` parameter is set to `true`.

A set of restrictions that apply to this shared drive or items inside this shared drive. Note that restrictions can't be set when creating a shared drive. To add a restriction, first create a shared drive and then use `drives.update` to add restrictions.

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

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import google_drive from '@utdk/google/drive';

await google_drive.drivesCreate({
  "kind": "drive#drive"
})