Description
Returns a query that matches the provided ID, or a 404 if no matching query is found.
GET
/api/v1/query/{queryId}
Required OAuth Scopes:
No OAuth scopes are required to use this endpoint.
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
queryId | path | string | true | The unique identifier of the query |
Code Samples
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
http GET https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId} \
Accept:application/json \
Authorization:"Bearer {access-token}"
wget --method=GET "https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}" \
--output-document - \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/query/{queryId}', headers = headers)
print(r.json())
Returns
200 - OK
Returns a JSON object with a body
property, which contains a QueryDto
object for the requested query.
Example Responses
{
"body": {
"created": "string",
"definition": {
"columns": [
{
"columnType": "string",
"name": "string"
}
],
"decimalPlaces": "integer",
"filters": [
{
"betweenValue": "string",
"columnType": "string",
"exclude": "boolean",
"filter": "string",
"filterValues": [
"string"
],
"name": "string",
"value": "string"
}
],
"grandTotalEnabled": "string",
"id": "string",
"multipleHeaders": "boolean",
"pivotViewType": "string",
"rows": [
{
"name": "string",
"type": "string"
}
],
"sortColumns": [
"string"
],
"subtotalEnabled": "string",
"values": [
{
"active": "boolean",
"aggregation": "string",
"columnType": "string",
"name": "string"
}
]
},
"dependencies": [
{
"databaseId": "string",
"system": "string",
"tableId": "string"
}
],
"description": "string",
"historyRevision": "integer",
"id": "string",
"isShared": "boolean",
"lastRun": "string",
"lastRunBy": "string",
"name": "string",
"parameters": [
{
"alias": "string",
"choices": [
{}
],
"id": "string",
"label": "string",
"mode": "string",
"name": "string",
"overridable": "boolean",
"reference": {},
"selectListId": "string",
"type": "string",
"value": {}
}
],
"parentId": "string",
"primaryQueryResultId": "string",
"queryText": "string",
"temporary": "boolean",
"type": "string",
"updated": "string",
"userId": "string",
"version": "integer"
},
"code": "integer"
}