Rename a table or add fields
curl --request PATCH \
--url https://app.hookie.ai/admin/api/data-workspace/tables/{table_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"fields": [
{
"key": "<string>",
"label": "<string>",
"options": [
"<string>"
]
}
],
"version": 2
}
'const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
fields: [{key: '<string>', label: '<string>', options: ['<string>']}],
version: 2
})
};
fetch('https://app.hookie.ai/admin/api/data-workspace/tables/{table_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/data-workspace/tables/{table_id}"
payload = {
"name": "<string>",
"fields": [
{
"key": "<string>",
"label": "<string>",
"options": ["<string>"]
}
],
"version": 2
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){}Data workspace
Rename a table or add fields
Requires current table version. Existing keys, types, and select options must be retained. Labels can change and new fields/options can be added.
PATCH
/
admin
/
api
/
data-workspace
/
tables
/
{table_id}
Rename a table or add fields
curl --request PATCH \
--url https://app.hookie.ai/admin/api/data-workspace/tables/{table_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"fields": [
{
"key": "<string>",
"label": "<string>",
"options": [
"<string>"
]
}
],
"version": 2
}
'const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
fields: [{key: '<string>', label: '<string>', options: ['<string>']}],
version: 2
})
};
fetch('https://app.hookie.ai/admin/api/data-workspace/tables/{table_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/data-workspace/tables/{table_id}"
payload = {
"name": "<string>",
"fields": [
{
"key": "<string>",
"label": "<string>",
"options": ["<string>"]
}
],
"version": 2
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){}