API Reference

Parses the query to determine if it is valid

Description

Returns the provided QueryDto

POST /api/v1/query/validation

🚧

Required OAuth Scopes:

No OAuth scopes are required to use this endpoint.

Parameters

ParameterInTypeRequiredDescription
bodybodyQueryDtotrueThe representation of the created query

Body parameter example

{
  "definition": {
    "columns": [
      {
        "columnType": "integer",
        "name": "string"
      }
    ],
    "decimalPlaces": 16,
    "filters": [
      {
        "betweenValue": "string",
        "columnType": "integer",
        "exclude": false,
        "filter": "EQUAL",
        "filterValues": [
          "string"
        ],
        "name": "string",
        "value": "string"
      }
    ],
    "grandTotalEnabled": "ENABLED",
    "id": "string",
    "multipleHeaders": false,
    "pivotViewType": "CLASSIC",
    "rows": [
      {
        "name": "string",
        "type": "integer"
      }
    ],
    "sortColumns": [
      "string"
    ],
    "subtotalEnabled": "ENABLED",
    "values": [
      {
        "active": true,
        "aggregation": "sum",
        "columnType": "integer",
        "name": "string"
      }
    ]
  },
  "description": "string",
  "historyRevision": 0,
  "isShared": false,
  "name": "string",
  "parameters": [
    {
      "alias": "string",
      "id": "string",
      "label": "string",
      "mode": "scalar",
      "name": "string",
      "selectListId": "string",
      "type": "string",
      "value": {}
    }
  ],
  "primaryQueryResultId": "string",
  "queryText": "string",
  "temporary": false,
  "type": "string"
}

Code Samples

curl -X POST https://h.app.wdesk.com/s/wdata/prep/api/v1/query/validation  \ 
-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/query/validation  \ 
Content-Type:application/json \ 
Accept:application/json \ 
Authorization:"Bearer {access-token}"
wget --method=POST "https://h.app.wdesk.com/s/wdata/prep/api/v1/query/validation" \
 --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/query/validation', headers = headers)

print(r.json())

Returns

200 - OK

Returns a JSON object with a body property, which contains the QueryDto object provided.

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"
}