クラシックファイルタイプは2021年1月をもって使用できなくなりました。クラシックファイルを移行することも、PDFをダウンロードすることもできます。詳細はこちら

Create a table API JSON Body

回答済み
0

コメント

1件のコメント

  • Jeff Hickey

    Hi Jase the Ace, please see TableDto type for more information about the body parameter of the Create a new table endpoint.

    At minimum, you must include "name", "tableScehma", and "type." "datasetUpdated", "hierarchyMetadata", and "uniqueTableConstraints" can be omitted. Below is sample Python request that uses the minimum body payload to create a new Data table called "Table Name" with the column "columnName" of type string (update values in italics).

    import requests
    import json

    url = "https://h.<location>.wdesk.com/s/wdata/prep/api/v1/table"

    payload = json.dumps({
    "name": "Table Name",
    "tableSchema": {
      "columns": [
        {
          "name": "columnName",
          "type": "string"
        }
      ]
    },
    "type": "data"
    })

    headers = {
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'Authorization': '<valid token>'
    }

    response = requests.request("POST", url, headers=headers, data=payload)
    print(response.text)
    0

サインインしてコメントを残してください。