table_template
Create Table Template
table_template
Create Table Template
Creates table template from an input and saves it into schema registry (table_template table in user database).
Parameters
- table_template_name: the name of the table template
- body: the body of the request, consisting of the table template body
Returns
A TableTemplate Pydantic object.
POST
/
api
/
v1
/
table_template
/
{table_template_name}
curl --request POST \
--url https://your-engine-url/api/v1/table_template/{table_template_name} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"table_template": {
"columns": [
{
"default": "<string>",
"is_nullable": true,
"type": "<string>",
"name": "<string>"
}
],
"constraints": {
"unique": [
{
"name": "",
"columns": []
}
],
"primary_key": {
"name": "",
"columns": []
},
"foreign_keys": [
{
"name": "<string>",
"reference_schema": "public",
"reference_column": "<string>",
"reference_table": "<string>",
"column": "<string>"
}
]
}
},
"version": "<string>",
"compatibility": "<string>"
}'
{
"table_template": {
"name": "<string>",
"table_template": {
"columns": [
{
"default": "<string>",
"is_nullable": true,
"type": "<string>",
"name": "<string>"
}
],
"constraints": {
"unique": [
{
"name": "",
"columns": []
}
],
"primary_key": {
"name": "",
"columns": []
},
"foreign_keys": [
{
"name": "<string>",
"reference_schema": "public",
"reference_column": "<string>",
"reference_table": "<string>",
"column": "<string>"
}
]
}
},
"version": "<string>",
"compatibility": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
}
Authorizations
Enter: 'Bearer <JWT>', where JWT is the access token. Example: Bearer access_token_comes_here
Path Parameters
Body
application/json
Response
200
application/json
Successful Response
curl --request POST \
--url https://your-engine-url/api/v1/table_template/{table_template_name} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"table_template": {
"columns": [
{
"default": "<string>",
"is_nullable": true,
"type": "<string>",
"name": "<string>"
}
],
"constraints": {
"unique": [
{
"name": "",
"columns": []
}
],
"primary_key": {
"name": "",
"columns": []
},
"foreign_keys": [
{
"name": "<string>",
"reference_schema": "public",
"reference_column": "<string>",
"reference_table": "<string>",
"column": "<string>"
}
]
}
},
"version": "<string>",
"compatibility": "<string>"
}'
{
"table_template": {
"name": "<string>",
"table_template": {
"columns": [
{
"default": "<string>",
"is_nullable": true,
"type": "<string>",
"name": "<string>"
}
],
"constraints": {
"unique": [
{
"name": "",
"columns": []
}
],
"primary_key": {
"name": "",
"columns": []
},
"foreign_keys": [
{
"name": "<string>",
"reference_schema": "public",
"reference_column": "<string>",
"reference_table": "<string>",
"column": "<string>"
}
]
}
},
"version": "<string>",
"compatibility": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
}