Create a shared drive

POST {{baseUrl}}/drives?requestId={{requestId}}&key={{key}}&oauth_token={{oauthToken}}

Creates a shared drive.

Request Params

KeyDatatypeRequiredDescription
requestIdstring(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.
altstringData format for the response.
fieldsstringSelector specifying which fields to include in a partial response.
keystringAPI 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_tokenstringOAuth 2.0 token for the current user.
prettyPrintstringReturns response with indentations and line breaks.
quotaUserstringAn opaque string that represents a user for quota purposes. Must not exceed 40 characters.
userIpstringDeprecated. Please use quotaUser instead.

Request Body

{"backgroundImageFile"=>{"id"=>"<string>", "width"=>"<float>", "xCoordinate"=>"<float>", "yCoordinate"=>"<float>"}, "backgroundImageLink"=>"<string>", "capabilities"=>{"canAddChildren"=>"<boolean>", "canChangeCopyRequiresWriterPermissionRestriction"=>"<boolean>", "canChangeDomainUsersOnlyRestriction"=>"<boolean>", "canChangeDriveBackground"=>"<boolean>", "canChangeDriveMembersOnlyRestriction"=>"<boolean>", "canChangeSharingFoldersRequiresOrganizerPermissionRestriction"=>"<boolean>", "canComment"=>"<boolean>", "canCopy"=>"<boolean>", "canDeleteChildren"=>"<boolean>", "canDeleteDrive"=>"<boolean>", "canDownload"=>"<boolean>", "canEdit"=>"<boolean>", "canListChildren"=>"<boolean>", "canManageMembers"=>"<boolean>", "canReadRevisions"=>"<boolean>", "canRename"=>"<boolean>", "canRenameDrive"=>"<boolean>", "canResetDriveRestrictions"=>"<boolean>", "canShare"=>"<boolean>", "canTrashChildren"=>"<boolean>"}, "colorRgb"=>"<string>", "createdTime"=>"<dateTime>", "hidden"=>"<boolean>", "id"=>"<string>", "kind"=>"drive#drive", "name"=>"<string>", "orgUnitId"=>"<string>", "restrictions"=>{"adminManagedRestrictions"=>"<boolean>", "copyRequiresWriterPermission"=>"<boolean>", "domainUsersOnly"=>"<boolean>", "driveMembersOnly"=>"<boolean>", "sharingFoldersRequiresOrganizerPermission"=>"<boolean>"}, "themeId"=>"<string>"}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;backgroundImageFile&quot;:{&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;width&quot;:&quot;\u003cfloat\u003e&quot;,&quot;xCoordinate&quot;:&quot;\u003cfloat\u003e&quot;,&quot;yCoordinate&quot;:&quot;\u003cfloat\u003e&quot;},&quot;backgroundImageLink&quot;:&quot;\u003cstring\u003e&quot;,&quot;capabilities&quot;:{&quot;canAddChildren&quot;:&quot;\u003cboolean\u003e&quot;,&quot;canChangeCopyRequiresWriterPermissionRestriction&quot;:&quot;\u003cboolean\u003e&quot;,&quot;canChangeDomainUsersOnlyRestriction&quot;:&quot;\u003cboolean\u003e&quot;,&quot;canChangeDriveBackground&quot;:&quot;\u003cboolean\u003e&quot;,&quot;canChangeDriveMembersOnlyRestriction&quot;:&quot;\u003cboolean\u003e&quot;,&quot;canChangeSharingFoldersRequiresOrganizerPermissionRestriction&quot;:&quot;\u003cboolean\u003e&quot;,&quot;canComment&quot;:&quot;\u003cboolean\u003e&quot;,&quot;canCopy&quot;:&quot;\u003cboolean\u003e&quot;,&quot;canDeleteChildren&quot;:&quot;\u003cboolean\u003e&quot;,&quot;canDeleteDrive&quot;:&quot;\u003cboolean\u003e&quot;,&quot;canDownload&quot;:&quot;\u003cboolean\u003e&quot;,&quot;canEdit&quot;:&quot;\u003cboolean\u003e&quot;,&quot;canListChildren&quot;:&quot;\u003cboolean\u003e&quot;,&quot;canManageMembers&quot;:&quot;\u003cboolean\u003e&quot;,&quot;canReadRevisions&quot;:&quot;\u003cboolean\u003e&quot;,&quot;canRename&quot;:&quot;\u003cboolean\u003e&quot;,&quot;canRenameDrive&quot;:&quot;\u003cboolean\u003e&quot;,&quot;canResetDriveRestrictions&quot;:&quot;\u003cboolean\u003e&quot;,&quot;canShare&quot;:&quot;\u003cboolean\u003e&quot;,&quot;canTrashChildren&quot;:&quot;\u003cboolean\u003e&quot;},&quot;colorRgb&quot;:&quot;\u003cstring\u003e&quot;,&quot;createdTime&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;hidden&quot;:&quot;\u003cboolean\u003e&quot;,&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;kind&quot;:&quot;drive#drive&quot;,&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;orgUnitId&quot;:&quot;\u003cstring\u003e&quot;,&quot;restrictions&quot;:{&quot;adminManagedRestrictions&quot;:&quot;\u003cboolean\u003e&quot;,&quot;copyRequiresWriterPermission&quot;:&quot;\u003cboolean\u003e&quot;,&quot;domainUsersOnly&quot;:&quot;\u003cboolean\u003e&quot;,&quot;driveMembersOnly&quot;:&quot;\u003cboolean\u003e&quot;,&quot;sharingFoldersRequiresOrganizerPermission&quot;:&quot;\u003cboolean\u003e&quot;},&quot;themeId&quot;:&quot;\u003cstring\u003e&quot;}