Google Team Drives API

Operations related to Teamdrives

OpenAPI Specification

google-team-drives-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Google Books About Team Drives API
  description: API for retrieving Bookshelf and Volume resources from Google Books
  version: 1.0.0
  contact:
    name: Google Books API
    url: https://developers.google.com/books
servers:
- url: https://www.googleapis.com/books/v1
  description: Google Books API v1
tags:
- name: Team Drives
  description: Operations related to Teamdrives
paths:
  /teamdrives:
    get:
      tags:
      - Team Drives
      summary: Google Get Teamdrives
      description: 'Deprecated: Use `drives.list` instead.'
      operationId: googleDriveTeamdrivesList
      security:
      - Oauth2:
        - https://www.googleapis.com/auth/drive
        Oauth2c:
        - https://www.googleapis.com/auth/drive
      - Oauth2:
        - https://www.googleapis.com/auth/drive.readonly
        Oauth2c:
        - https://www.googleapis.com/auth/drive.readonly
      parameters:
      - description: Maximum number of Team Drives to return.
        in: query
        name: pageSize
        schema:
          maximum: 100
          minimum: 1
          type: integer
      - description: Page token for Team Drives.
        in: query
        name: pageToken
        schema:
          type: string
      - description: Query string for searching Team Drives.
        in: query
        name: q
        schema:
          type: string
      - description: Issue the request as a domain administrator; if set to true, then all Team Drives of the domain in which the requester is an administrator are returned.
        in: query
        name: useDomainAdminAccess
        schema:
          type: boolean
      - in: header
        name: Authorization
        schema:
          type: string
      - description: V1 error format.
        in: query
        name: $.xgafv
        schema:
          enum:
          - '1'
          - '2'
          type: string
      - description: OAuth access token.
        in: query
        name: access_token
        schema:
          type: string
      - description: Data format for response.
        in: query
        name: alt
        schema:
          enum:
          - json
          - media
          - proto
          type: string
      - description: JSONP
        in: query
        name: callback
        schema:
          type: string
      - description: Selector specifying which fields to include in a partial response.
        in: query
        name: fields
        schema:
          type: string
      - description: 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.
        in: query
        name: key
        schema:
          type: string
      - description: OAuth 2.0 token for the current user.
        in: query
        name: oauth_token
        schema:
          type: string
      - description: Returns response with indentations and line breaks.
        in: query
        name: prettyPrint
        schema:
          type: boolean
      - description: 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.
        in: query
        name: quotaUser
        schema:
          type: string
      - description: Upload protocol for media (e.g. "raw", "multipart").
        in: query
        name: upload_protocol
        schema:
          type: string
      - description: Legacy upload protocol for media (e.g. "media", "multipart").
        in: query
        name: uploadType
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamDriveList'
      x-api-evangelist-certified: '2025-07-18'
      x-api-naftiko-published: '2025-07-18'
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: SuccessExample
    post:
      tags:
      - Team Drives
      summary: Google Post Teamdrives
      description: 'Deprecated: Use `drives.create` instead.'
      operationId: googleDriveTeamdrivesCreate
      security:
      - Oauth2:
        - https://www.googleapis.com/auth/drive
        Oauth2c:
        - https://www.googleapis.com/auth/drive
      parameters:
      - description: Required. An ID, such as a random UUID, which uniquely identifies this user's request for idempotent creation of a Team Drive. A repeated request by the same user and with the same request ID will avoid creating duplicates by attempting to create the same Team Drive. If the Team Drive already exists a 409 error will be returned.
        in: query
        name: requestId
        required: true
        schema:
          type: string
      - in: header
        name: Authorization
        schema:
          type: string
      - description: V1 error format.
        in: query
        name: $.xgafv
        schema:
          enum:
          - '1'
          - '2'
          type: string
      - description: OAuth access token.
        in: query
        name: access_token
        schema:
          type: string
      - description: Data format for response.
        in: query
        name: alt
        schema:
          enum:
          - json
          - media
          - proto
          type: string
      - description: JSONP
        in: query
        name: callback
        schema:
          type: string
      - description: Selector specifying which fields to include in a partial response.
        in: query
        name: fields
        schema:
          type: string
      - description: 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.
        in: query
        name: key
        schema:
          type: string
      - description: OAuth 2.0 token for the current user.
        in: query
        name: oauth_token
        schema:
          type: string
      - description: Returns response with indentations and line breaks.
        in: query
        name: prettyPrint
        schema:
          type: boolean
      - description: 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.
        in: query
        name: quotaUser
        schema:
          type: string
      - description: Upload protocol for media (e.g. "raw", "multipart").
        in: query
        name: upload_protocol
        schema:
          type: string
      - description: Legacy upload protocol for media (e.g. "media", "multipart").
        in: query
        name: uploadType
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TeamDrive'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamDrive'
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: SuccessExample
  /teamdrives/{teamDriveId}:
    get:
      tags:
      - Team Drives
      summary: Google Get Teamdrives Teamdriveid
      description: 'Deprecated: Use `drives.get` instead.'
      operationId: googleDriveTeamdrivesGet
      security:
      - Oauth2:
        - https://www.googleapis.com/auth/drive
        Oauth2c:
        - https://www.googleapis.com/auth/drive
      - Oauth2:
        - https://www.googleapis.com/auth/drive.readonly
        Oauth2c:
        - https://www.googleapis.com/auth/drive.readonly
      parameters:
      - description: The ID of the Team Drive
        in: path
        name: teamDriveId
        required: true
        schema:
          type: string
      - description: 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 Team Drive belongs.
        in: query
        name: useDomainAdminAccess
        schema:
          type: boolean
      - in: header
        name: Authorization
        schema:
          type: string
      - description: V1 error format.
        in: query
        name: $.xgafv
        schema:
          enum:
          - '1'
          - '2'
          type: string
      - description: OAuth access token.
        in: query
        name: access_token
        schema:
          type: string
      - description: Data format for response.
        in: query
        name: alt
        schema:
          enum:
          - json
          - media
          - proto
          type: string
      - description: JSONP
        in: query
        name: callback
        schema:
          type: string
      - description: Selector specifying which fields to include in a partial response.
        in: query
        name: fields
        schema:
          type: string
      - description: 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.
        in: query
        name: key
        schema:
          type: string
      - description: OAuth 2.0 token for the current user.
        in: query
        name: oauth_token
        schema:
          type: string
      - description: Returns response with indentations and line breaks.
        in: query
        name: prettyPrint
        schema:
          type: boolean
      - description: 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.
        in: query
        name: quotaUser
        schema:
          type: string
      - description: Upload protocol for media (e.g. "raw", "multipart").
        in: query
        name: upload_protocol
        schema:
          type: string
      - description: Legacy upload protocol for media (e.g. "media", "multipart").
        in: query
        name: uploadType
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamDrive'
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: SuccessExample
    patch:
      tags:
      - Team Drives
      summary: Google Patch Teamdrives Teamdriveid
      description: 'Deprecated: Use `drives.update` instead.'
      operationId: googleDriveTeamdrivesUpdate
      security:
      - Oauth2:
        - https://www.googleapis.com/auth/drive
        Oauth2c:
        - https://www.googleapis.com/auth/drive
      parameters:
      - description: The ID of the Team Drive
        in: path
        name: teamDriveId
        required: true
        schema:
          type: string
      - description: 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 Team Drive belongs.
        in: query
        name: useDomainAdminAccess
        schema:
          type: boolean
      - in: header
        name: Authorization
        schema:
          type: string
      - description: V1 error format.
        in: query
        name: $.xgafv
        schema:
          enum:
          - '1'
          - '2'
          type: string
      - description: OAuth access token.
        in: query
        name: access_token
        schema:
          type: string
      - description: Data format for response.
        in: query
        name: alt
        schema:
          enum:
          - json
          - media
          - proto
          type: string
      - description: JSONP
        in: query
        name: callback
        schema:
          type: string
      - description: Selector specifying which fields to include in a partial response.
        in: query
        name: fields
        schema:
          type: string
      - description: 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.
        in: query
        name: key
        schema:
          type: string
      - description: OAuth 2.0 token for the current user.
        in: query
        name: oauth_token
        schema:
          type: string
      - description: Returns response with indentations and line breaks.
        in: query
        name: prettyPrint
        schema:
          type: boolean
      - description: 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.
        in: query
        name: quotaUser
        schema:
          type: string
      - description: Upload protocol for media (e.g. "raw", "multipart").
        in: query
        name: upload_protocol
        schema:
          type: string
      - description: Legacy upload protocol for media (e.g. "media", "multipart").
        in: query
        name: uploadType
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TeamDrive'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamDrive'
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: SuccessExample
    delete:
      tags:
      - Team Drives
      summary: Google Delete Teamdrives Teamdriveid
      description: 'Deprecated: Use `drives.delete` instead.'
      operationId: googleDriveTeamdrivesDelete
      security:
      - Oauth2:
        - https://www.googleapis.com/auth/drive
        Oauth2c:
        - https://www.googleapis.com/auth/drive
      parameters:
      - description: The ID of the Team Drive
        in: path
        name: teamDriveId
        required: true
        schema:
          type: string
      - in: header
        name: Authorization
        schema:
          type: string
      - description: V1 error format.
        in: query
        name: $.xgafv
        schema:
          enum:
          - '1'
          - '2'
          type: string
      - description: OAuth access token.
        in: query
        name: access_token
        schema:
          type: string
      - description: Data format for response.
        in: query
        name: alt
        schema:
          enum:
          - json
          - media
          - proto
          type: string
      - description: JSONP
        in: query
        name: callback
        schema:
          type: string
      - description: Selector specifying which fields to include in a partial response.
        in: query
        name: fields
        schema:
          type: string
      - description: 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.
        in: query
        name: key
        schema:
          type: string
      - description: OAuth 2.0 token for the current user.
        in: query
        name: oauth_token
        schema:
          type: string
      - description: Returns response with indentations and line breaks.
        in: query
        name: prettyPrint
        schema:
          type: boolean
      - description: 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.
        in: query
        name: quotaUser
        schema:
          type: string
      - description: Upload protocol for media (e.g. "raw", "multipart").
        in: query
        name: upload_protocol
        schema:
          type: string
      - description: Legacy upload protocol for media (e.g. "media", "multipart").
        in: query
        name: uploadType
        schema:
          type: string
      responses:
        '200':
          description: Successful response
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: SuccessExample
components:
  schemas:
    TeamDriveList:
      description: A list of Team Drives.
      properties:
        kind:
          default: drive#teamDriveList
          description: 'Identifies what kind of resource this is. Value: the fixed string `"drive#teamDriveList"`.'
          type: string
        nextPageToken:
          description: The page token for the next page of Team Drives. This will be absent if the end of the Team Drives list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. The page token is typically valid for several hours. However, if new items are added or removed, your expected results might differ.
          type: string
        teamDrives:
          description: The list of Team Drives. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.
          items:
            $ref: '#/components/schemas/TeamDrive'
          type: array
      type: object
    TeamDrive:
      description: 'Deprecated: use the drive collection instead.'
      properties:
        backgroundImageFile:
          description: An image file and cropping parameters from which a background image for this Team Drive is set. This is a write only field; it can only be set on `drive.teamdrives.update` requests that don't set `themeId`. When specified, all fields of the `backgroundImageFile` must be set.
          properties:
            id:
              description: The ID of an image file in Drive to use for the background image.
              type: string
            width:
              description: The width of the cropped image in the closed range of 0 to 1. This value represents the width of the cropped image divided by the width of the entire image. The height is computed by applying a width to height aspect ratio of 80 to 9. The resulting image must be at least 1280 pixels wide and 144 pixels high.
              format: float
              type: number
            xCoordinate:
              description: The X coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the horizontal distance from the left side of the entire image to the left side of the cropping area divided by the width of the entire image.
              format: float
              type: number
            yCoordinate:
              description: The Y coordinate of the upper left corner of the cropping area in the background image. This is a value in the closed range of 0 to 1. This value represents the vertical distance from the top side of the entire image to the top side of the cropping area divided by the height of the entire image.
              format: float
              type: number
          type: object
        backgroundImageLink:
          description: A short-lived link to this Team Drive's background image.
          type: string
        capabilities:
          description: Capabilities the current user has on this Team Drive.
          properties:
            canAddChildren:
              description: Whether the current user can add children to folders in this Team Drive.
              type: boolean
            canChangeCopyRequiresWriterPermissionRestriction:
              description: Whether the current user can change the `copyRequiresWriterPermission` restriction of this Team Drive.
              type: boolean
            canChangeDomainUsersOnlyRestriction:
              description: Whether the current user can change the `domainUsersOnly` restriction of this Team Drive.
              type: boolean
            canChangeSharingFoldersRequiresOrganizerPermissionRestriction:
              description: Whether the current user can change the `sharingFoldersRequiresOrganizerPermission` restriction of this Team Drive.
              type: boolean
            canChangeTeamDriveBackground:
              description: Whether the current user can change the background of this Team Drive.
              type: boolean
            canChangeTeamMembersOnlyRestriction:
              description: Whether the current user can change the `teamMembersOnly` restriction of this Team Drive.
              type: boolean
            canComment:
              description: Whether the current user can comment on files in this Team Drive.
              type: boolean
            canCopy:
              description: Whether the current user can copy files in this Team Drive.
              type: boolean
            canDeleteChildren:
              description: Whether the current user can delete children from folders in this Team Drive.
              type: boolean
            canDeleteTeamDrive:
              description: Whether the current user can delete this Team Drive. Attempting to delete the Team Drive may still fail if there are untrashed items inside the Team Drive.
              type: boolean
            canDownload:
              description: Whether the current user can download files in this Team Drive.
              type: boolean
            canEdit:
              description: Whether the current user can edit files in this Team Drive
              type: boolean
            canListChildren:
              description: Whether the current user can list the children of folders in this Team Drive.
              type: boolean
            canManageMembers:
              description: Whether the current user can add members to this Team Drive or remove them or change their role.
              type: boolean
            canReadRevisions:
              description: Whether the current user can read the revisions resource of files in this Team Drive.
              type: boolean
            canRemoveChildren:
              deprecated: true
              description: 'Deprecated: Use `canDeleteChildren` or `canTrashChildren` instead.'
              type: boolean
            canRename:
              description: Whether the current user can rename files or folders in this Team Drive.
              type: boolean
            canRenameTeamDrive:
              description: Whether the current user can rename this Team Drive.
              type: boolean
            canResetTeamDriveRestrictions:
              description: Whether the current user can reset the Team Drive restrictions to defaults.
              type: boolean
            canShare:
              description: Whether the current user can share files or folders in this Team Drive.
              type: boolean
            canTrashChildren:
              description: Whether the current user can trash children from folders in this Team Drive.
              type: boolean
          type: object
        colorRgb:
          description: The color of this Team Drive as an RGB hex string. It can only be set on a `drive.teamdrives.update` request that does not set `themeId`.
          type: string
        createdTime:
          description: The time at which the Team Drive was created (RFC 3339 date-time).
          format: date-time
          type: string
        id:
          description: The ID of this Team Drive which is also the ID of the top level folder of this Team Drive.
          type: string
        kind:
          default: drive#teamDrive
          description: 'Identifies what kind of resource this is. Value: the fixed string `"drive#teamDrive"`.'
          type: string
        name:
          description: The name of this Team Drive.
          type: string
        orgUnitId:
          description: The organizational unit of this shared drive. This field is only populated on `drives.list` responses when the `useDomainAdminAccess` parameter is set to `true`.
          type: string
        restrictions:
          description: A set of restrictions that apply to this Team Drive or items inside this Team Drive.
          properties:
            adminManagedRestrictions:
              description: Whether administrative privileges on this Team Drive are required to modify restrictions.
              type: boolean
            copyRequiresWriterPermission:
              description: Whether the options to copy, print, or download files inside this Team Drive, should be disabled for readers and commenters. When this restriction is set to `true`, it will override the similarly named field to `true` for any file inside this Team Drive.
              type: boolean
            domainUsersOnly:
              description: Whether access to this Team Drive and items inside this Team Drive is restricted to users of the domain to which this Team Drive belongs. This restriction may be overridden by other sharing policies controlled outside of this Team Drive.
              type: boolean
            sharingFoldersRequiresOrganizerPermission:
              description: If true, only users with the organizer role can share folders. If false, users with either the organizer role or the file organizer role can share folders.
              type: boolean
            teamMembersOnly:
              description: Whether access to items inside this Team Drive is restricted to members of this Team Drive.
              type: boolean
          type: object
        themeId:
          description: The ID of the theme from which the background image and color will be set. The set of possible `teamDriveThemes` can be retrieved from a `drive.about.get` response. When not specified on a `drive.teamdrives.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`.
          type: string
      type: object
  securitySchemes:
    OAuth2:
      type: oauth2
      description: OAuth 2.0 authentication for Google Books API
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/v2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            https://www.googleapis.com/auth/books: Manage your Google Books library