ByteChef LogoByteChef
OpenapiTables

Create a data table

Create a data table in the requested environment. The same name may exist in several environments; it is one logical table with one physical table per environment.

POST
/workspaces/{workspaceId}/data-tables

Path Parameters

workspaceId*integer

The id of a workspace.

Formatint64

Header Parameters

X-Environment?string

The environment whose physical table is addressed. PRODUCTION when omitted.

Value in

  • "DEVELOPMENT"
  • "STAGING"
  • "PRODUCTION"

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/workspaces/0/data-tables" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "columns": [      {        "name": "string",        "type": "STRING"      }    ]  }'
{  "id": 0,  "workspaceId": 0,  "name": "string",  "description": "string",  "columns": [    {      "name": "string",      "type": "STRING",      "link": {        "targetDataTableId": 0,        "onDelete": "BLOCK",        "displayColumnName": "string"      }    }  ],  "tags": [    "string"  ],  "lastModifiedDate": "2019-08-24T14:15:22Z"}

How is this guide?