Export a file to spreadsheets#
Description#
Exports the file ID identified in the path to the spreadsheet identified by the provided URL. If the URL string is empty, creates and returns a new spreadsheet and its sheet IDs.
POST /api/v1/file/{fileId}/export
Required OAuth Scopes
No OAuth scopes are required to use this endpoint.
Parameters#
Parameter |
In |
Type |
Required |
Description |
|---|---|---|---|---|
fileId |
path |
string |
true |
The unique identifier of the file |
body |
body |
true |
The representation of the file to export |
Body parameter example#
{
"url": "string"
}
Code Samples#
curl -X POST https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}/export \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
http POST https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}/export \
Content-Type:application/json \
Accept:application/json \
Authorization:"Bearer {access-token}"
wget --method=POST "https://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}/export" \
--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://h.app.wdesk.com/s/wdata/prep/api/v1/file/{fileId}/export', headers = headers)
print(r.json())
Returns#
201 - Created#
Returns a JSON object containing a body property, which contains a SpreadsheetInfoDto object.
Example Responses#
{
"body": {
"sheetId": "string",
"workbookId": "string"
},
"code": "integer"
}