I tipi di file classici non potranno più essere utilizzati a partire da gennaio 2021. È possibile effettuare la transizione dei file classici o scaricare un PDF. Ulteriori informazioni

WData API Execute Query and get results

0

Commenti

2 commenti

  • Jeff Hickey

    Hi Nick Ryberg

    When you successfully Execute A Query, the response body is the query result entity QueryResultDto. An example success response can be found here. Below I've added the top portion of the example response that includes the ID in bold.

    {
      "body": {
        "bytesScanned": "integer",
        "columns": [
          {
            "name": "string",
            "type": "string"
          }
        ],
        "created": "string",
        "duration": "integer",
        "error": "string",
        "id": "string",
        ....

    This ID can then be used to poll the status with the Retrieve A Single Query Result and the Download A Query Result endpoints.

    0
  • Nick Ryberg

    Thanks Jeff Hickey - that worked - I was able to query status and then download the results - it would help to have a callout in the documentation that `id` maps to `queryResultId`. 

    queryResultId = result['body']['id']

    url = 'https://h.app.wdesk.com/s/wdata/prep/api/v1/queryresult/' + queryResultId

    r = requests.get(url, headers=headers)

    print(r.json())
    0

Accedi per aggiungere un commento.