forked from Byron/google-apis-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sheets-api.json
7838 lines (7838 loc) · 417 KB
/
sheets-api.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"auth": {
"oauth2": {
"scopes": {
"https://www.googleapis.com/auth/drive": {
"description": "See, edit, create, and delete all of your Google Drive files"
},
"https://www.googleapis.com/auth/drive.file": {
"description": "See, edit, create, and delete only the specific Google Drive files you use with this app"
},
"https://www.googleapis.com/auth/drive.readonly": {
"description": "See and download all your Google Drive files"
},
"https://www.googleapis.com/auth/spreadsheets": {
"description": "See, edit, create, and delete all your Google Sheets spreadsheets"
},
"https://www.googleapis.com/auth/spreadsheets.readonly": {
"description": "See all your Google Sheets spreadsheets"
}
}
}
},
"basePath": "",
"baseUrl": "https://sheets.googleapis.com/",
"batchPath": "batch",
"canonicalName": "Sheets",
"description": "Reads and writes Google Sheets.",
"discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/sheets/",
"fullyEncodeReservedExpansion": true,
"icons": {
"x16": "http://www.google.com/images/icons/product/search-16.gif",
"x32": "http://www.google.com/images/icons/product/search-32.gif"
},
"id": "sheets:v4",
"kind": "discovery#restDescription",
"mtlsRootUrl": "https://sheets.mtls.googleapis.com/",
"name": "sheets",
"ownerDomain": "google.com",
"ownerName": "Google",
"parameters": {
"$.xgafv": {
"description": "V1 error format.",
"enum": [
"1",
"2"
],
"enumDescriptions": [
"v1 error format",
"v2 error format"
],
"location": "query",
"type": "string"
},
"access_token": {
"description": "OAuth access token.",
"location": "query",
"type": "string"
},
"alt": {
"default": "json",
"description": "Data format for response.",
"enum": [
"json",
"media",
"proto"
],
"enumDescriptions": [
"Responses with Content-Type of application/json",
"Media download with context-dependent Content-Type",
"Responses with Content-Type of application/x-protobuf"
],
"location": "query",
"type": "string"
},
"callback": {
"description": "JSONP",
"location": "query",
"type": "string"
},
"fields": {
"description": "Selector specifying which fields to include in a partial response.",
"location": "query",
"type": "string"
},
"key": {
"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.",
"location": "query",
"type": "string"
},
"oauth_token": {
"description": "OAuth 2.0 token for the current user.",
"location": "query",
"type": "string"
},
"prettyPrint": {
"default": "true",
"description": "Returns response with indentations and line breaks.",
"location": "query",
"type": "boolean"
},
"quotaUser": {
"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.",
"location": "query",
"type": "string"
},
"uploadType": {
"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
"location": "query",
"type": "string"
},
"upload_protocol": {
"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
"location": "query",
"type": "string"
}
},
"protocol": "rest",
"resources": {
"spreadsheets": {
"methods": {
"batchUpdate": {
"description": "Applies one or more updates to the spreadsheet. Each request is validated before being applied. If any request is not valid then the entire request will fail and nothing will be applied. Some requests have replies to give you some information about how they are applied. The replies will mirror the requests. For example, if you applied 4 updates and the 3rd one had a reply, then the response will have 2 empty replies, the actual reply, and another empty reply, in that order. Due to the collaborative nature of spreadsheets, it is not guaranteed that the spreadsheet will reflect exactly your changes after this completes, however it is guaranteed that the updates in the request will be applied together atomically. Your changes may be altered with respect to collaborator changes. If there are no collaborators, the spreadsheet should reflect your changes.",
"flatPath": "v4/spreadsheets/{spreadsheetId}:batchUpdate",
"httpMethod": "POST",
"id": "sheets.spreadsheets.batchUpdate",
"parameterOrder": [
"spreadsheetId"
],
"parameters": {
"spreadsheetId": {
"description": "The spreadsheet to apply the updates to.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "v4/spreadsheets/{spreadsheetId}:batchUpdate",
"request": {
"$ref": "BatchUpdateSpreadsheetRequest"
},
"response": {
"$ref": "BatchUpdateSpreadsheetResponse"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/spreadsheets"
]
},
"create": {
"description": "Creates a spreadsheet, returning the newly created spreadsheet.",
"flatPath": "v4/spreadsheets",
"httpMethod": "POST",
"id": "sheets.spreadsheets.create",
"parameterOrder": [],
"parameters": {},
"path": "v4/spreadsheets",
"request": {
"$ref": "Spreadsheet"
},
"response": {
"$ref": "Spreadsheet"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/spreadsheets"
]
},
"get": {
"description": "Returns the spreadsheet at the given ID. The caller must specify the spreadsheet ID. By default, data within grids is not returned. You can include grid data in one of 2 ways: * Specify a [field mask](https://developers.google.com/sheets/api/guides/field-masks) listing your desired fields using the `fields` URL parameter in HTTP * Set the includeGridData URL 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. To retrieve only subsets of spreadsheet data, use the ranges URL parameter. Ranges are specified using [A1 notation](https://developers.google.com/sheets/api/guides/concepts#cell). You can define a single cell (for example, `A1`) or multiple cells (for example, `A1:D5`). You can also get cells from other sheets within the same spreadsheet (for example, `Sheet2!A1:C4`) or retrieve multiple ranges at once (for example, `?ranges=A1:D5&ranges=Sheet2!A1:C4`). Limiting the range returns only the portions of the spreadsheet that intersect the requested ranges.",
"flatPath": "v4/spreadsheets/{spreadsheetId}",
"httpMethod": "GET",
"id": "sheets.spreadsheets.get",
"parameterOrder": [
"spreadsheetId"
],
"parameters": {
"includeGridData": {
"description": "True if grid data should be returned. This parameter is ignored if a field mask was set in the request.",
"location": "query",
"type": "boolean"
},
"ranges": {
"description": "The ranges to retrieve from the spreadsheet.",
"location": "query",
"repeated": true,
"type": "string"
},
"spreadsheetId": {
"description": "The spreadsheet to request.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "v4/spreadsheets/{spreadsheetId}",
"response": {
"$ref": "Spreadsheet"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.readonly",
"https://www.googleapis.com/auth/spreadsheets",
"https://www.googleapis.com/auth/spreadsheets.readonly"
]
},
"getByDataFilter": {
"description": "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](https://developers.google.com/sheets/api/guides/field-masks) 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.",
"flatPath": "v4/spreadsheets/{spreadsheetId}:getByDataFilter",
"httpMethod": "POST",
"id": "sheets.spreadsheets.getByDataFilter",
"parameterOrder": [
"spreadsheetId"
],
"parameters": {
"spreadsheetId": {
"description": "The spreadsheet to request.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "v4/spreadsheets/{spreadsheetId}:getByDataFilter",
"request": {
"$ref": "GetSpreadsheetByDataFilterRequest"
},
"response": {
"$ref": "Spreadsheet"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/spreadsheets"
]
}
},
"resources": {
"developerMetadata": {
"methods": {
"get": {
"description": "Returns the developer metadata with the specified ID. The caller must specify the spreadsheet ID and the developer metadata's unique metadataId.",
"flatPath": "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}",
"httpMethod": "GET",
"id": "sheets.spreadsheets.developerMetadata.get",
"parameterOrder": [
"spreadsheetId",
"metadataId"
],
"parameters": {
"metadataId": {
"description": "The ID of the developer metadata to retrieve.",
"format": "int32",
"location": "path",
"required": true,
"type": "integer"
},
"spreadsheetId": {
"description": "The ID of the spreadsheet to retrieve metadata from.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}",
"response": {
"$ref": "DeveloperMetadata"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/spreadsheets"
]
},
"search": {
"description": "Returns all developer metadata matching the specified DataFilter. If the provided DataFilter represents a DeveloperMetadataLookup object, this will return all DeveloperMetadata entries selected by it. If the DataFilter represents a location in a spreadsheet, this will return all developer metadata associated with locations intersecting that region.",
"flatPath": "v4/spreadsheets/{spreadsheetId}/developerMetadata:search",
"httpMethod": "POST",
"id": "sheets.spreadsheets.developerMetadata.search",
"parameterOrder": [
"spreadsheetId"
],
"parameters": {
"spreadsheetId": {
"description": "The ID of the spreadsheet to retrieve metadata from.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "v4/spreadsheets/{spreadsheetId}/developerMetadata:search",
"request": {
"$ref": "SearchDeveloperMetadataRequest"
},
"response": {
"$ref": "SearchDeveloperMetadataResponse"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/spreadsheets"
]
}
}
},
"sheets": {
"methods": {
"copyTo": {
"description": "Copies a single sheet from a spreadsheet to another spreadsheet. Returns the properties of the newly created sheet.",
"flatPath": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo",
"httpMethod": "POST",
"id": "sheets.spreadsheets.sheets.copyTo",
"parameterOrder": [
"spreadsheetId",
"sheetId"
],
"parameters": {
"sheetId": {
"description": "The ID of the sheet to copy.",
"format": "int32",
"location": "path",
"required": true,
"type": "integer"
},
"spreadsheetId": {
"description": "The ID of the spreadsheet containing the sheet to copy.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo",
"request": {
"$ref": "CopySheetToAnotherSpreadsheetRequest"
},
"response": {
"$ref": "SheetProperties"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/spreadsheets"
]
}
}
},
"values": {
"methods": {
"append": {
"description": "Appends values to a spreadsheet. The input range is used to search for existing data and find a \"table\" within that range. Values will be appended to the next row of the table, starting with the first column of the table. See the [guide](https://developers.google.com/sheets/api/guides/values#appending_values) and [sample code](https://developers.google.com/sheets/api/samples/writing#append_values) for specific details of how tables are detected and data is appended. The caller must specify the spreadsheet ID, range, and a valueInputOption. The `valueInputOption` only controls how the input data will be added to the sheet (column-wise or row-wise), it does not influence what cell the data starts being written to.",
"flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:append",
"httpMethod": "POST",
"id": "sheets.spreadsheets.values.append",
"parameterOrder": [
"spreadsheetId",
"range"
],
"parameters": {
"includeValuesInResponse": {
"description": "Determines if the update response should include the values of the cells that were appended. By default, responses do not include the updated values.",
"location": "query",
"type": "boolean"
},
"insertDataOption": {
"description": "How the input data should be inserted.",
"enum": [
"OVERWRITE",
"INSERT_ROWS"
],
"enumDescriptions": [
"The new data overwrites existing data in the areas it is written. (Note: adding data to the end of the sheet will still insert new rows or columns so the data can be written.)",
"Rows are inserted for the new data."
],
"location": "query",
"type": "string"
},
"range": {
"description": "The [A1 notation](https://developers.google.com/sheets/api/guides/concepts#cell) of a range to search for a logical table of data. Values are appended after the last row of the table.",
"location": "path",
"required": true,
"type": "string"
},
"responseDateTimeRenderOption": {
"description": "Determines how dates, times, and durations in the response should be rendered. This is ignored if response_value_render_option is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER.",
"enum": [
"SERIAL_NUMBER",
"FORMATTED_STRING"
],
"enumDescriptions": [
"Instructs date, time, datetime, and duration fields to be output as doubles in \"serial number\" format, as popularized by Lotus 1-2-3. The whole number portion of the value (left of the decimal) counts the days since December 30th 1899. The fractional portion (right of the decimal) counts the time as a fraction of the day. For example, January 1st 1900 at noon would be 2.5, 2 because it's 2 days after December 30th 1899, and .5 because noon is half a day. February 1st 1900 at 3pm would be 33.625. This correctly treats the year 1900 as not a leap year.",
"Instructs date, time, datetime, and duration fields to be output as strings in their given number format (which depends on the spreadsheet locale)."
],
"location": "query",
"type": "string"
},
"responseValueRenderOption": {
"description": "Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE.",
"enum": [
"FORMATTED_VALUE",
"UNFORMATTED_VALUE",
"FORMULA"
],
"enumDescriptions": [
"Values will be calculated & formatted in the reply according to the cell's formatting. Formatting is based on the spreadsheet's locale, not the requesting user's locale. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return `\"$1.23\"`.",
"Values will be calculated, but not formatted in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return the number `1.23`.",
"Values will not be calculated. The reply will include the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then A2 would return `\"=A1\"`."
],
"location": "query",
"type": "string"
},
"spreadsheetId": {
"description": "The ID of the spreadsheet to update.",
"location": "path",
"required": true,
"type": "string"
},
"valueInputOption": {
"description": "How the input data should be interpreted.",
"enum": [
"INPUT_VALUE_OPTION_UNSPECIFIED",
"RAW",
"USER_ENTERED"
],
"enumDescriptions": [
"Default input value. This value must not be used.",
"The values the user has entered will not be parsed and will be stored as-is.",
"The values will be parsed as if the user typed them into the UI. Numbers will stay as numbers, but strings may be converted to numbers, dates, etc. following the same rules that are applied when entering text into a cell via the Google Sheets UI."
],
"location": "query",
"type": "string"
}
},
"path": "v4/spreadsheets/{spreadsheetId}/values/{range}:append",
"request": {
"$ref": "ValueRange"
},
"response": {
"$ref": "AppendValuesResponse"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/spreadsheets"
]
},
"batchClear": {
"description": "Clears one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more ranges. Only values are cleared -- all other properties of the cell (such as formatting and data validation) are kept.",
"flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchClear",
"httpMethod": "POST",
"id": "sheets.spreadsheets.values.batchClear",
"parameterOrder": [
"spreadsheetId"
],
"parameters": {
"spreadsheetId": {
"description": "The ID of the spreadsheet to update.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "v4/spreadsheets/{spreadsheetId}/values:batchClear",
"request": {
"$ref": "BatchClearValuesRequest"
},
"response": {
"$ref": "BatchClearValuesResponse"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/spreadsheets"
]
},
"batchClearByDataFilter": {
"description": "Clears one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more DataFilters. Ranges matching any of the specified data filters will be cleared. Only values are cleared -- all other properties of the cell (such as formatting, data validation, etc..) are kept.",
"flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter",
"httpMethod": "POST",
"id": "sheets.spreadsheets.values.batchClearByDataFilter",
"parameterOrder": [
"spreadsheetId"
],
"parameters": {
"spreadsheetId": {
"description": "The ID of the spreadsheet to update.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter",
"request": {
"$ref": "BatchClearValuesByDataFilterRequest"
},
"response": {
"$ref": "BatchClearValuesByDataFilterResponse"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/spreadsheets"
]
},
"batchGet": {
"description": "Returns one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more ranges.",
"flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGet",
"httpMethod": "GET",
"id": "sheets.spreadsheets.values.batchGet",
"parameterOrder": [
"spreadsheetId"
],
"parameters": {
"dateTimeRenderOption": {
"description": "How dates, times, and durations should be represented in the output. This is ignored if value_render_option is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER.",
"enum": [
"SERIAL_NUMBER",
"FORMATTED_STRING"
],
"enumDescriptions": [
"Instructs date, time, datetime, and duration fields to be output as doubles in \"serial number\" format, as popularized by Lotus 1-2-3. The whole number portion of the value (left of the decimal) counts the days since December 30th 1899. The fractional portion (right of the decimal) counts the time as a fraction of the day. For example, January 1st 1900 at noon would be 2.5, 2 because it's 2 days after December 30th 1899, and .5 because noon is half a day. February 1st 1900 at 3pm would be 33.625. This correctly treats the year 1900 as not a leap year.",
"Instructs date, time, datetime, and duration fields to be output as strings in their given number format (which depends on the spreadsheet locale)."
],
"location": "query",
"type": "string"
},
"majorDimension": {
"description": "The major dimension that results should use. For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, then requesting `ranges=[\"A1:B2\"],majorDimension=ROWS` returns `[[1,2],[3,4]]`, whereas requesting `ranges=[\"A1:B2\"],majorDimension=COLUMNS` returns `[[1,3],[2,4]]`.",
"enum": [
"DIMENSION_UNSPECIFIED",
"ROWS",
"COLUMNS"
],
"enumDescriptions": [
"The default value, do not use.",
"Operates on the rows of a sheet.",
"Operates on the columns of a sheet."
],
"location": "query",
"type": "string"
},
"ranges": {
"description": "The [A1 notation or R1C1 notation](https://developers.google.com/sheets/api/guides/concepts#cell) of the range to retrieve values from.",
"location": "query",
"repeated": true,
"type": "string"
},
"spreadsheetId": {
"description": "The ID of the spreadsheet to retrieve data from.",
"location": "path",
"required": true,
"type": "string"
},
"valueRenderOption": {
"description": "How values should be represented in the output. The default render option is ValueRenderOption.FORMATTED_VALUE.",
"enum": [
"FORMATTED_VALUE",
"UNFORMATTED_VALUE",
"FORMULA"
],
"enumDescriptions": [
"Values will be calculated & formatted in the reply according to the cell's formatting. Formatting is based on the spreadsheet's locale, not the requesting user's locale. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return `\"$1.23\"`.",
"Values will be calculated, but not formatted in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return the number `1.23`.",
"Values will not be calculated. The reply will include the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then A2 would return `\"=A1\"`."
],
"location": "query",
"type": "string"
}
},
"path": "v4/spreadsheets/{spreadsheetId}/values:batchGet",
"response": {
"$ref": "BatchGetValuesResponse"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.readonly",
"https://www.googleapis.com/auth/spreadsheets",
"https://www.googleapis.com/auth/spreadsheets.readonly"
]
},
"batchGetByDataFilter": {
"description": "Returns one or more ranges of values that match the specified data filters. The caller must specify the spreadsheet ID and one or more DataFilters. Ranges that match any of the data filters in the request will be returned.",
"flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter",
"httpMethod": "POST",
"id": "sheets.spreadsheets.values.batchGetByDataFilter",
"parameterOrder": [
"spreadsheetId"
],
"parameters": {
"spreadsheetId": {
"description": "The ID of the spreadsheet to retrieve data from.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter",
"request": {
"$ref": "BatchGetValuesByDataFilterRequest"
},
"response": {
"$ref": "BatchGetValuesByDataFilterResponse"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/spreadsheets"
]
},
"batchUpdate": {
"description": "Sets values in one or more ranges of a spreadsheet. The caller must specify the spreadsheet ID, a valueInputOption, and one or more ValueRanges.",
"flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate",
"httpMethod": "POST",
"id": "sheets.spreadsheets.values.batchUpdate",
"parameterOrder": [
"spreadsheetId"
],
"parameters": {
"spreadsheetId": {
"description": "The ID of the spreadsheet to update.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate",
"request": {
"$ref": "BatchUpdateValuesRequest"
},
"response": {
"$ref": "BatchUpdateValuesResponse"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/spreadsheets"
]
},
"batchUpdateByDataFilter": {
"description": "Sets values in one or more ranges of a spreadsheet. The caller must specify the spreadsheet ID, a valueInputOption, and one or more DataFilterValueRanges.",
"flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter",
"httpMethod": "POST",
"id": "sheets.spreadsheets.values.batchUpdateByDataFilter",
"parameterOrder": [
"spreadsheetId"
],
"parameters": {
"spreadsheetId": {
"description": "The ID of the spreadsheet to update.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter",
"request": {
"$ref": "BatchUpdateValuesByDataFilterRequest"
},
"response": {
"$ref": "BatchUpdateValuesByDataFilterResponse"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/spreadsheets"
]
},
"clear": {
"description": "Clears values from a spreadsheet. The caller must specify the spreadsheet ID and range. Only values are cleared -- all other properties of the cell (such as formatting, data validation, etc..) are kept.",
"flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear",
"httpMethod": "POST",
"id": "sheets.spreadsheets.values.clear",
"parameterOrder": [
"spreadsheetId",
"range"
],
"parameters": {
"range": {
"description": "The [A1 notation or R1C1 notation](https://developers.google.com/sheets/api/guides/concepts#cell) of the values to clear.",
"location": "path",
"required": true,
"type": "string"
},
"spreadsheetId": {
"description": "The ID of the spreadsheet to update.",
"location": "path",
"required": true,
"type": "string"
}
},
"path": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear",
"request": {
"$ref": "ClearValuesRequest"
},
"response": {
"$ref": "ClearValuesResponse"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/spreadsheets"
]
},
"get": {
"description": "Returns a range of values from a spreadsheet. The caller must specify the spreadsheet ID and a range.",
"flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}",
"httpMethod": "GET",
"id": "sheets.spreadsheets.values.get",
"parameterOrder": [
"spreadsheetId",
"range"
],
"parameters": {
"dateTimeRenderOption": {
"description": "How dates, times, and durations should be represented in the output. This is ignored if value_render_option is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER.",
"enum": [
"SERIAL_NUMBER",
"FORMATTED_STRING"
],
"enumDescriptions": [
"Instructs date, time, datetime, and duration fields to be output as doubles in \"serial number\" format, as popularized by Lotus 1-2-3. The whole number portion of the value (left of the decimal) counts the days since December 30th 1899. The fractional portion (right of the decimal) counts the time as a fraction of the day. For example, January 1st 1900 at noon would be 2.5, 2 because it's 2 days after December 30th 1899, and .5 because noon is half a day. February 1st 1900 at 3pm would be 33.625. This correctly treats the year 1900 as not a leap year.",
"Instructs date, time, datetime, and duration fields to be output as strings in their given number format (which depends on the spreadsheet locale)."
],
"location": "query",
"type": "string"
},
"majorDimension": {
"description": "The major dimension that results should use. For example, if the spreadsheet data in Sheet1 is: `A1=1,B1=2,A2=3,B2=4`, then requesting `range=Sheet1!A1:B2?majorDimension=ROWS` returns `[[1,2],[3,4]]`, whereas requesting `range=Sheet1!A1:B2?majorDimension=COLUMNS` returns `[[1,3],[2,4]]`.",
"enum": [
"DIMENSION_UNSPECIFIED",
"ROWS",
"COLUMNS"
],
"enumDescriptions": [
"The default value, do not use.",
"Operates on the rows of a sheet.",
"Operates on the columns of a sheet."
],
"location": "query",
"type": "string"
},
"range": {
"description": "The [A1 notation or R1C1 notation](https://developers.google.com/sheets/api/guides/concepts#cell) of the range to retrieve values from.",
"location": "path",
"required": true,
"type": "string"
},
"spreadsheetId": {
"description": "The ID of the spreadsheet to retrieve data from.",
"location": "path",
"required": true,
"type": "string"
},
"valueRenderOption": {
"description": "How values should be represented in the output. The default render option is FORMATTED_VALUE.",
"enum": [
"FORMATTED_VALUE",
"UNFORMATTED_VALUE",
"FORMULA"
],
"enumDescriptions": [
"Values will be calculated & formatted in the reply according to the cell's formatting. Formatting is based on the spreadsheet's locale, not the requesting user's locale. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return `\"$1.23\"`.",
"Values will be calculated, but not formatted in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return the number `1.23`.",
"Values will not be calculated. The reply will include the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then A2 would return `\"=A1\"`."
],
"location": "query",
"type": "string"
}
},
"path": "v4/spreadsheets/{spreadsheetId}/values/{range}",
"response": {
"$ref": "ValueRange"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.readonly",
"https://www.googleapis.com/auth/spreadsheets",
"https://www.googleapis.com/auth/spreadsheets.readonly"
]
},
"update": {
"description": "Sets values in a range of a spreadsheet. The caller must specify the spreadsheet ID, range, and a valueInputOption.",
"flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}",
"httpMethod": "PUT",
"id": "sheets.spreadsheets.values.update",
"parameterOrder": [
"spreadsheetId",
"range"
],
"parameters": {
"includeValuesInResponse": {
"description": "Determines if the update response should include the values of the cells that were updated. By default, responses do not include the updated values. If the range to write was larger than the range actually written, the response includes all values in the requested range (excluding trailing empty rows and columns).",
"location": "query",
"type": "boolean"
},
"range": {
"description": "The [A1 notation](https://developers.google.com/sheets/api/guides/concepts#cell) of the values to update.",
"location": "path",
"required": true,
"type": "string"
},
"responseDateTimeRenderOption": {
"description": "Determines how dates, times, and durations in the response should be rendered. This is ignored if response_value_render_option is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER.",
"enum": [
"SERIAL_NUMBER",
"FORMATTED_STRING"
],
"enumDescriptions": [
"Instructs date, time, datetime, and duration fields to be output as doubles in \"serial number\" format, as popularized by Lotus 1-2-3. The whole number portion of the value (left of the decimal) counts the days since December 30th 1899. The fractional portion (right of the decimal) counts the time as a fraction of the day. For example, January 1st 1900 at noon would be 2.5, 2 because it's 2 days after December 30th 1899, and .5 because noon is half a day. February 1st 1900 at 3pm would be 33.625. This correctly treats the year 1900 as not a leap year.",
"Instructs date, time, datetime, and duration fields to be output as strings in their given number format (which depends on the spreadsheet locale)."
],
"location": "query",
"type": "string"
},
"responseValueRenderOption": {
"description": "Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE.",
"enum": [
"FORMATTED_VALUE",
"UNFORMATTED_VALUE",
"FORMULA"
],
"enumDescriptions": [
"Values will be calculated & formatted in the reply according to the cell's formatting. Formatting is based on the spreadsheet's locale, not the requesting user's locale. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return `\"$1.23\"`.",
"Values will be calculated, but not formatted in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return the number `1.23`.",
"Values will not be calculated. The reply will include the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then A2 would return `\"=A1\"`."
],
"location": "query",
"type": "string"
},
"spreadsheetId": {
"description": "The ID of the spreadsheet to update.",
"location": "path",
"required": true,
"type": "string"
},
"valueInputOption": {
"description": "How the input data should be interpreted.",
"enum": [
"INPUT_VALUE_OPTION_UNSPECIFIED",
"RAW",
"USER_ENTERED"
],
"enumDescriptions": [
"Default input value. This value must not be used.",
"The values the user has entered will not be parsed and will be stored as-is.",
"The values will be parsed as if the user typed them into the UI. Numbers will stay as numbers, but strings may be converted to numbers, dates, etc. following the same rules that are applied when entering text into a cell via the Google Sheets UI."
],
"location": "query",
"type": "string"
}
},
"path": "v4/spreadsheets/{spreadsheetId}/values/{range}",
"request": {
"$ref": "ValueRange"
},
"response": {
"$ref": "UpdateValuesResponse"
},
"scopes": [
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/spreadsheets"
]
}
}
}
}
}
},
"revision": "20230119",
"rootUrl": "https://sheets.googleapis.com/",
"schemas": {
"AddBandingRequest": {
"description": "Adds a new banded range to the spreadsheet.",
"id": "AddBandingRequest",
"properties": {
"bandedRange": {
"$ref": "BandedRange",
"description": "The banded range to add. The bandedRangeId field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a range that already exists.)"
}
},
"type": "object"
},
"AddBandingResponse": {
"description": "The result of adding a banded range.",
"id": "AddBandingResponse",
"properties": {
"bandedRange": {
"$ref": "BandedRange",
"description": "The banded range that was added."
}
},
"type": "object"
},
"AddChartRequest": {
"description": "Adds a chart to a sheet in the spreadsheet.",
"id": "AddChartRequest",
"properties": {
"chart": {
"$ref": "EmbeddedChart",
"description": "The chart that should be added to the spreadsheet, including the position where it should be placed. The chartId field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of an embedded object that already exists.)"
}
},
"type": "object"
},
"AddChartResponse": {
"description": "The result of adding a chart to a spreadsheet.",
"id": "AddChartResponse",
"properties": {
"chart": {
"$ref": "EmbeddedChart",
"description": "The newly added chart."
}
},
"type": "object"
},
"AddConditionalFormatRuleRequest": {
"description": "Adds a new conditional format rule at the given index. All subsequent rules' indexes are incremented.",
"id": "AddConditionalFormatRuleRequest",
"properties": {
"index": {
"description": "The zero-based index where the rule should be inserted.",
"format": "int32",
"type": "integer"
},
"rule": {
"$ref": "ConditionalFormatRule",
"description": "The rule to add."
}
},
"type": "object"
},
"AddDataSourceRequest": {
"description": "Adds a data source. After the data source is added successfully, an associated DATA_SOURCE sheet is created and an execution is triggered to refresh the sheet to read data from the data source. The request requires an additional `bigquery.readonly` OAuth scope.",
"id": "AddDataSourceRequest",
"properties": {
"dataSource": {
"$ref": "DataSource",
"description": "The data source to add."
}
},
"type": "object"
},
"AddDataSourceResponse": {
"description": "The result of adding a data source.",
"id": "AddDataSourceResponse",
"properties": {
"dataExecutionStatus": {
"$ref": "DataExecutionStatus",
"description": "The data execution status."
},
"dataSource": {
"$ref": "DataSource",
"description": "The data source that was created."
}
},
"type": "object"
},
"AddDimensionGroupRequest": {
"description": "Creates a group over the specified range. If the requested range is a superset of the range of an existing group G, then the depth of G is incremented and this new group G' has the depth of that group. For example, a group [C:D, depth 1] + [B:E] results in groups [B:E, depth 1] and [C:D, depth 2]. If the requested range is a subset of the range of an existing group G, then the depth of the new group G' becomes one greater than the depth of G. For example, a group [B:E, depth 1] + [C:D] results in groups [B:E, depth 1] and [C:D, depth 2]. If the requested range starts before and ends within, or starts within and ends after, the range of an existing group G, then the range of the existing group G becomes the union of the ranges, and the new group G' has depth one greater than the depth of G and range as the intersection of the ranges. For example, a group [B:D, depth 1] + [C:E] results in groups [B:E, depth 1] and [C:D, depth 2].",
"id": "AddDimensionGroupRequest",
"properties": {
"range": {
"$ref": "DimensionRange",
"description": "The range over which to create a group."
}
},
"type": "object"
},
"AddDimensionGroupResponse": {
"description": "The result of adding a group.",
"id": "AddDimensionGroupResponse",
"properties": {
"dimensionGroups": {
"description": "All groups of a dimension after adding a group to that dimension.",
"items": {
"$ref": "DimensionGroup"
},
"type": "array"
}
},
"type": "object"
},
"AddFilterViewRequest": {
"description": "Adds a filter view.",
"id": "AddFilterViewRequest",
"properties": {
"filter": {
"$ref": "FilterView",
"description": "The filter to add. The filterViewId field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a filter that already exists.)"
}
},
"type": "object"
},
"AddFilterViewResponse": {
"description": "The result of adding a filter view.",
"id": "AddFilterViewResponse",