spreadsheets

POST /v4/spreadsheets

Changed on

Creates a spreadsheet, returning the newly created spreadsheet.

Request

  • Base URL
    https://sheets.googleapis.com
  • Auth
    • OAuth 2 and OAuth 2
      Implicithttps://accounts.google.com/o/oauth2/auth
      Scopeshttps://www.googleapis.com/auth/drive
      Authorization codehttps://accounts.google.com/o/oauth2/auth
      Token URLhttps://accounts.google.com/o/oauth2/token
      Scopeshttps://www.googleapis.com/auth/drive
    • or OAuth 2 and OAuth 2
      Implicithttps://accounts.google.com/o/oauth2/auth
      Scopeshttps://www.googleapis.com/auth/drive.file
      Authorization codehttps://accounts.google.com/o/oauth2/auth
      Token URLhttps://accounts.google.com/o/oauth2/token
      Scopeshttps://www.googleapis.com/auth/drive.file
    • or OAuth 2 and OAuth 2
      Implicithttps://accounts.google.com/o/oauth2/auth
      Scopeshttps://www.googleapis.com/auth/spreadsheets
      Authorization codehttps://accounts.google.com/o/oauth2/auth
      Token URLhttps://accounts.google.com/o/oauth2/token
      Scopeshttps://www.googleapis.com/auth/spreadsheets

Query parameters

$.xgafv, '1' | '2'

V1 error format.

access_token, string

OAuth access token.

alt, 'json' | 'media' | 'proto'

Data format for response.

callback, string

JSONP

fields, string

Selector specifying which fields to include in a partial response.

key, string

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_token, string

OAuth 2.0 token for the current user.

prettyPrint, boolean

Returns response with indentations and line breaks.

quotaUser, string

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.

uploadType, string

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

upload_protocol, string

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

Request body

Spreadsheet required

Resource that represents a spreadsheet.

comments, CommentThread[]

The comment threads associated with the spreadsheet.

commentsViewMode, 'COMMENTS_VIEW_MODE_UNSPECIFIED' | 'COMMENTS_VIEW_MODE_DEFAULT_FOR_CURRENT_ACCESS' | 'COMMENTS_VIEW_MODE_OMITTED' | 'COMMENTS_VIEW_MODE_INCLUDED'

Output only. The comments view mode applied to the spreadsheet.

dataSourceSchedules, DataSourceRefreshSchedule[]

Output only. A list of data source refresh schedules.

dataSources, DataSource[]

A list of external data sources connected with the spreadsheet.

developerMetadata, DeveloperMetadata[]

The developer metadata associated with a spreadsheet.

namedRanges, NamedRange[]

The named ranges defined in a spreadsheet.

properties, SpreadsheetProperties

Properties of a spreadsheet.

sheets, Sheet[]

The sheets that are part of a spreadsheet.

spreadsheetId, string

The ID of the spreadsheet. This field is read-only.

spreadsheetUrl, string

The url of the spreadsheet. This field is read-only.

Response

Successful response

Spreadsheet required

Resource that represents a spreadsheet.

comments, CommentThread[]

The comment threads associated with the spreadsheet.

commentsViewMode, 'COMMENTS_VIEW_MODE_UNSPECIFIED' | 'COMMENTS_VIEW_MODE_DEFAULT_FOR_CURRENT_ACCESS' | 'COMMENTS_VIEW_MODE_OMITTED' | 'COMMENTS_VIEW_MODE_INCLUDED'

Output only. The comments view mode applied to the spreadsheet.

dataSourceSchedules, DataSourceRefreshSchedule[]

Output only. A list of data source refresh schedules.

dataSources, DataSource[]

A list of external data sources connected with the spreadsheet.

developerMetadata, DeveloperMetadata[]

The developer metadata associated with a spreadsheet.

namedRanges, NamedRange[]

The named ranges defined in a spreadsheet.

properties, SpreadsheetProperties

Properties of a spreadsheet.

sheets, Sheet[]

The sheets that are part of a spreadsheet.

spreadsheetId, string

The ID of the spreadsheet. This field is read-only.

spreadsheetUrl, string

The url of the spreadsheet. This field is read-only.

Changes

    • info

      the security scope https://www.googleapis.com/auth/drive was added to the endpoint's security scheme Oauth2

    • info

      the security scope https://www.googleapis.com/auth/drive was added to the endpoint's security scheme Oauth2c

    • info

      the security scope https://www.googleapis.com/auth/spreadsheets was removed from the endpoint's security scheme Oauth2

    1 more change in this revision