Description
POST
/spreadsheets/{SpreadsheetId}/sheets
Required OAuth Scopes:
data_tables|w
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
SpreadsheetId | path | string | true | A unique identifier for a spreadsheet |
body | body | CreateSheetBody | true | Properties for creating a new sheet |
Body parameter example
{
"index": 0,
"name": "Data Sheet",
"parent_id": "d10a604b74564afa86b5ba96755845652"
}
Code Samples
curl -X POST https://api.app.wdesk.com/spreadsheets/v1/spreadsheets/{SpreadsheetId}/sheets \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
http POST https://api.app.wdesk.com/spreadsheets/v1/spreadsheets/{SpreadsheetId}/sheets \
Content-Type:application/json \
Accept:application/json \
Authorization:"Bearer {access-token}"
wget --method=POST "https://api.app.wdesk.com/spreadsheets/v1/spreadsheets/{SpreadsheetId}/sheets" \
--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.post('https://api.app.wdesk.com/spreadsheets/v1/spreadsheets/{SpreadsheetId}/sheets', headers = headers)
print(r.json())
Returns
201 - Created
Returns a JSON object with data
and revision
properties. data
contains a Sheet
object representing the newly created sheet.
Example Responses
{
"data": {
"child_ids": [
"h65a604b74564afa86b5ba96755845652"
],
"id": "k78a604b74564afa76b5ba96755123456",
"index": "integer",
"name": "Data Sheet",
"parent_id": "d10a604b74564afa86b5ba96755845652"
},
"message": "Operation successful",
"request_id": "d6a6ce3f-f120-4104-9587-a5a2dc45626c",
"revision": "integer"
}