API Reference

Create a new shared table

Description

Creates a shared table instance between the workspace of the request and the workspace provided in the body.

POST /api/v1/sharedtable

🚧

Required OAuth Scopes:

No OAuth scopes are required to use this endpoint.

Parameters

ParameterInTypeRequiredDescription
bodybodySharedTableDtotrueThe representation of the shared table to create

Body parameter example

{
  "destinationWorkspaceId": "string",
  "sourceTableId": "string",
  "table": {
    "datasetUpdated": "2019-08-24T14:15:22Z",
    "description": "string",
    "isShared": false,
    "name": "string",
    "tableSchema": {
      "columns": [
        {
          "alias": "string",
          "description": "string",
          "metadata": {
            "property1": {},
            "property2": {}
          },
          "mode": "nullable",
          "name": "string",
          "type": "string"
        }
      ]
    },
    "type": "data",
    "uniqueTableConstraints": [
      {
        "description": "string",
        "id": "string",
        "name": "key_columns",
        "tableId": "string",
        "values": [
          "string"
        ]
      }
    ]
  }
}

Code Samples

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

print(r.json())

Returns

201 - Created

Returns a JSON object with a body property, which contains a SharedTableDto object for the created shared table.

Example Responses


{
  "body": {
    "created": "string",
    "destinationWorkspaceId": "string",
    "id": "string",
    "parentId": "string",
    "sourceTableId": "string",
    "table": {
      "created": "string",
      "databaseId": "string",
      "datasetUpdated": "string",
      "deleted": "boolean",
      "description": "string",
      "id": "string",
      "isShared": "boolean",
      "lastUploaded": "string",
      "name": "string",
      "parentId": "string",
      "readOnly": "boolean",
      "tableSchema": {
        "columns": [
          {
            "alias": "string",
            "description": "string",
            "metadata": {},
            "mode": "string",
            "name": "string",
            "type": "string"
          }
        ]
      },
      "type": "string",
      "uniqueTableConstraints": [
        {
          "description": "string",
          "id": "string",
          "name": "string",
          "tableId": "string",
          "values": [
            "string"
          ]
        }
      ],
      "updated": "string",
      "userId": "string",
      "version": "integer"
    },
    "updated": "string",
    "userId": "string",
    "version": "integer"
  },
  "code": "integer"
}