Search + K

Command Palette

Search for a command to run...

Sign In

sheets.spreadsheets.getByDataFilter

POST /v4/spreadsheets/{spreadsheetId}:getByDataFilter
Copy endpoint
https://sheets.googleapis.com/

Returns the spreadsheet at the given ID. The caller must specify the spreadsheet ID. This method differs from GetSpreadsheet in that it allows selecting which subsets of spreadsheet data to return by specifying a dataFilters parameter. Multiple DataFilters can be specified. Specifying one or more data filters returns the portions of the spreadsheet that intersect ranges matched by any of the filters. By default, data within grids is not returned. You can include grid data one of 2 ways: * Specify a field mask listing your desired fields using the fields URL parameter in HTTP * Set the includeGridData parameter to true. If a field mask is set, the includeGridData parameter is ignored For large spreadsheets, as a best practice, retrieve only the specific spreadsheet fields that you want.

Parameters

path Path Parameters

Name Type
spreadsheetId required

The spreadsheet to request.

string

query Query Parameters

Name Type
key

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
access_token

OAuth access token.

string
oauth_token

OAuth 2.0 token for the current user.

string
alt

Data format for response.

"json" | "media" | "proto"
quotaUser

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
fields

Selector specifying which fields to include in a partial response.

string
callback

JSONP

string
uploadType

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

string
upload_protocol

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

string
prettyPrint

Returns response with indentations and line breaks.

boolean
$.xgafv

V1 error format.

"1" | "2"

Request Body

application/json
interface GetSpreadsheetByDataFilterRequest {
dataFilters?: DataFilter

Filter that describes what data should be selected or returned from a request.

interface DataFilter {
a1Range?: string;
developerMetadataLookup?: DeveloperMetadataLookup;
gridRange?: GridRange;
}
[]
;
excludeTablesInBandedRanges?: boolean;
includeGridData?: boolean;
}

Responses

200 */*

Successful response

interface Spreadsheet {
dataSourceSchedules?: readonly DataSourceRefreshSchedule

Schedule for refreshing the data source. Data sources in the spreadsheet are refreshed within a time interval. You can specify the start time by clicking the Scheduled Refresh button in the Sheets editor, but the interval is fixed at 4 hours. For example, if you specify a start time of 8 AM , the refresh will take place between 8 AM and 12 PM every day.

interface DataSourceRefreshSchedule {
dailySchedule?: DataSourceRefreshDailySchedule;
enabled?: boolean;
monthlySchedule?: DataSourceRefreshMonthlySchedule;
nextRun?: Interval;
refreshScope?: "DATA_SOURCE_REFRESH_SCOPE_UNSPECIFIED" | "ALL_DATA_SOURCES";
weeklySchedule?: DataSourceRefreshWeeklySchedule;
}
[]
;
dataSources?: DataSource

Information about an external data source in the spreadsheet.

interface DataSource {
calculatedColumns?: DataSourceColumn[];
dataSourceId?: string;
sheetId?: number;
spec?: DataSourceSpec;
}
[]
;
developerMetadata?: DeveloperMetadata

Developer metadata associated with a location or object in a spreadsheet. Developer metadata may be used to associate arbitrary data with various parts of a spreadsheet and will remain associated at those locations as they move around and the spreadsheet is edited. For example, if developer metadata is associated with row 5 and another row is then subsequently inserted above row 5, that original metadata will still be associated with the row it was first associated with (what is now row 6). If the associated object is deleted its metadata is deleted too.

interface DeveloperMetadata {
location?: DeveloperMetadataLocation;
metadataId?: number;
metadataKey?: string;
metadataValue?: string;
visibility?: "DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED" | "DOCUMENT" | "PROJECT";
}
[]
;
namedRanges?: NamedRange

A named range.

interface NamedRange {
name?: string;
namedRangeId?: string;
range?: GridRange;
}
[]
;
properties?: SpreadsheetProperties

Properties of a spreadsheet.

interface SpreadsheetProperties {
autoRecalc?: "RECALCULATION_INTERVAL_UNSPECIFIED" | "ON_CHANGE" | "MINUTE" | "HOUR";
defaultFormat?: CellFormat;
importFunctionsExternalUrlAccessAllowed?: boolean;
iterativeCalculationSettings?: IterativeCalculationSettings;
locale?: string;
spreadsheetTheme?: SpreadsheetTheme;
timeZone?: string;
title?: string;
}
;
sheets?: Sheet

A sheet in a spreadsheet.

interface Sheet {
bandedRanges?: BandedRange[];
basicFilter?: BasicFilter;
charts?: EmbeddedChart[];
columnGroups?: DimensionGroup[];
conditionalFormats?: ConditionalFormatRule[];
data?: GridData[];
developerMetadata?: DeveloperMetadata[];
filterViews?: FilterView[];
merges?: GridRange[];
properties?: SheetProperties;
protectedRanges?: ProtectedRange[];
rowGroups?: DimensionGroup[];
slicers?: Slicer[];
tables?: Table[];
}
[]
;
spreadsheetId?: string;
spreadsheetUrl?: string;
}