|
2021년 1월부터 기존 파일 형식을 더 이상 사용할 수 없습니다. 기존 파일을 전환하거나 PDF를 다운로드할 수 있습니다. 자세히 알아보기

WData API Execute Query and get results

0

댓글

댓글 2개

  • 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

댓글을 남기려면 로그인하세요.