Download a single file#

Description#

Downloads a table dataset or query result as a file, given its token from the Create a new token endpoint. If no matching entity is found, returns a 404.

GET /api/v1/token/{tokenId}

Required OAuth Scopes

No OAuth scopes are required to use this endpoint.

Parameters#

Parameter

In

Type

Required

Description

tokenId

path

string

true

The unique identifier of the token

filename

query

string

false

A filename for the download; if included, the default filename is overridden

Code Samples#

curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/token/{tokenId} \
    -H 'Accept: */*' \
    -H 'Authorization: Bearer {access-token}'
http GET https://h.app.wdesk.com/s/wdata/prep/api/v1/token/{tokenId} \
    Accept:*/* \
    Authorization:"Bearer {access-token}"
wget --method=GET "https://h.app.wdesk.com/s/wdata/prep/api/v1/token/{tokenId}" \
    --output-document -  \ 
    --header 'Accept: */*' \ 
    --header 'Authorization: Bearer {access-token}'
import requests

headers = {
  'Accept': '*/*',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/token/{tokenId}', headers = headers)

print(r.json())

Returns#

200 - The file if it exists#

Returns a string of bytes that represents the requested file.

Example Responses#

No example available