POST
/
data
/
projects
/
{projectId}
/
table
/
{tableName}
/
columns
Add Column
curl --request POST \
  --url https://partner.peaka.studio/api/v1/data/projects/{projectId}/table/{tableName}/columns \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '[
  {
    "dataType": "bigint",
    "displayName": "num19",
    "defaultValue": null,
    "name": "num19"
  },
  {
    "dataType": "bigint",
    "displayName": "num18",
    "defaultValue": 3,
    "isUnique": true,
    "name": "num18"
  }
]'
[
  {
    "name": "num19",
    "dataType": "bigint",
    "displayName": "num19",
    "defaultValue": null,
    "isNotNull": false,
    "isUnique": false
  },
  {
    "name": "num18",
    "dataType": "bigint",
    "displayName": "num18",
    "defaultValue": "3",
    "isNotNull": false,
    "isUnique": true
  }
]

Authorizations

Authorization
string
header
required

Use the Authorization header with the value 'Bearer <apiKey>' to authenticate. Partner API Keys have full access; Project API Keys are limited to their project scope. Learn more: https://docs.peaka.com/api-reference/authentication

Path Parameters

projectId
string
required
tableName
string
required

Body

application/json

Column Request

This class represents a ColumnRequest. It contains the name, data type, display name, default value, not null and unique status of the column request.

name
string

The name of the column.

dataType
string

The data type of the column.

displayName
string

The display name of the column.

defaultValue
string

The default value of the column.

isNotNull
boolean

The not null flag for the column.

isUnique
boolean

The unique flag for the column.

Response

200 - */*

Column added successfully

id
string

The id of the column.

name
string

The name of the column.

dataType
string

The data type of the column.

displayName
string

The display name of the column.

defaultValue
string

The default value of the column.

isNotNull
boolean

The not null flag for the column.

isUnique
boolean

The unique flag for the column.