Description
Updates a sheet using the given sheet properties.
If the name property is set to null
or not included in the request the sheet will not be renamed.
If both the parent_id
and index
properties are set to null
or not included in the request the sheet will not be moved.
PUT
/spreadsheets/{SpreadsheetId}/sheets/{SheetId}
Required OAuth Scopes:
data_tables|w
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
SpreadsheetId | path | string | true | A unique identifier for a spreadsheet |
SheetId | path | string | true | A unique identifier for a sheet within a spreadsheet |
body | body | UpdateSheetBody | true | Properties for updating a sheet |
Body parameter example
{
"index": 0,
"name": "Data Sheet",
"parent_id": "d10a604b74564afa86b5ba96755845652"
}
Code Samples
curl -X PUT https://api.app.wdesk.com/spreadsheets/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/spreadsheets/v1/spreadsheets/{SpreadsheetId}/sheets/{SheetId} \
Content-Type:application/json \
Accept:application/json \
Authorization:"Bearer {access-token}"
wget --method=PUT "https://api.app.wdesk.com/spreadsheets/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/spreadsheets/v1/spreadsheets/{SpreadsheetId}/sheets/{SheetId}', headers = headers)
print(r.json())
Returns
200 - OK
No content returned.
Example Responses
{
"message": "Operation successful",
"request_id": "d6a6ce3f-f120-4104-9587-a5a2dc45626c"
}