API Reference

Update a single sheet

Description

Replaces the details of a sheet given its properties. This endpoint performs a full replacement, not a partial update. If the provided sheet name is not unique, a number will be appended to make it unique.

PUT /spreadsheets/{spreadsheetId}/sheets/{sheetId}

🚧

Required OAuth Scopes:

file:write

Parameters

ParameterInTypeRequiredDescription
spreadsheetIdpathstringtrueThe unique identifier of the spreadsheet
sheetIdpathstringtrueThe unique identifier of the sheet
bodybodySheettrueAll properties for the sheet, not just those to update

Body parameter example

{
  "index": 0,
  "name": "Q3"
}

Code Samples

curl -X PUT https://api.app.wdesk.com/platform/v1/spreadsheets/{spreadsheetId}/sheets/{sheetId}  \ 
-H 'Content-Type: application/json' \ 
-H 'Accept: application/json' \ 
-H 'Authorization: Bearer {access-token}'
http PUT https://api.app.wdesk.com/platform/v1/spreadsheets/{spreadsheetId}/sheets/{sheetId}  \ 
Content-Type:application/json \ 
Accept:application/json \ 
Authorization:"Bearer {access-token}"
wget --method=PUT "https://api.app.wdesk.com/platform/v1/spreadsheets/{spreadsheetId}/sheets/{sheetId}" \
 --output-document -  \ 
 --header 'Content-Type: application/json' \ 
 --header 'Accept: application/json' \ 
 --header 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('https://api.app.wdesk.com/platform/v1/spreadsheets/{spreadsheetId}/sheets/{sheetId}', headers = headers)

print(r.json())

Returns

200 - OK

Returns a Sheet object containing details about the updated Sheet.

Example Responses


{
  "name": "Q3",
  "id": "242a56d3cc0742c8abad0820bd318b23",
  "modified": {
    "dateTime": "2020-07-01T10:31:52Z"
  },
  "parent": null,
  "index": 0,
  "children": [],
  "dataset": null
}