Download a query result#
Description#
Uses the Token Management API to create a token with the query result ID, which it then uses to download a CSV file of the query results.
GET /api/v1/queryresult/{queryResultId}/download
Required OAuth Scopes
No OAuth scopes are required to use this endpoint.
Parameters#
Parameter |
In |
Type |
Required |
Description |
|---|---|---|---|---|
queryResultId |
path |
string |
true |
The unique identifier of the query result |
Code Samples#
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}/download \
-H 'Accept: */*' \
-H 'Authorization: Bearer {access-token}'
http GET https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}/download \
Accept:*/* \
Authorization:"Bearer {access-token}"
wget --method=GET "https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/{queryResultId}/download" \
--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/queryresult/{queryResultId}/download', headers = headers)
print(r.json())
Returns#
200 - The results of query run#
Returns a string of bytes representing the requested CSV file that contains the query results.
Example Responses#
No example available