Rename a table or change its description
PATCH
/collection/{id}/table/{tableKey}
The key never changes.
Path Parameters
idstring
required·
Resource id
tableKeystring
required·
Table key; main is the default table.
Request Body
descriptionstring
namestring
Response Body
can_manageboolean
can_useboolean
collection_idstring
created_atstring
descriptionstring
field_countinteger
hidden_field_keysstring[]
is_defaultboolean
keystring
namestring
row_scope_fieldstring,null
row_visibilitystring
Possible values:
allown
schemaobject
fieldsobject[]
8 properties
descriptionstring
idstring
indexedboolean
keystring
namestring
options
requiredboolean
typestring
primary_fieldstring
row_scopeobject,null
unique_keyarray,null
versioninteger
schema_versioninteger
statsobject,null
updated_atstring
updated_by_namestring,null
curl -X PATCH 'https://api.elaichi.ai/collection/<id>/table/<tableKey>' \
-H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"name":"your_name","description":"your_description"}'const body = {
"name": "your_name",
"description": "your_description"
};
const response = await fetch('https://api.elaichi.ai/collection/<id>/table/<tableKey>', {
method: 'PATCH',
headers: {
'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);import os
import requests
url = "https://api.elaichi.ai/collection/<id>/table/<tableKey>"
headers = {
"Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
"Content-Type": "application/json",
}
payload = {
"name": "your_name",
"description": "your_description"
}
response = requests.patch(url, headers=headers, json=payload)
print(response.json())