- Single Column
{
"tblname": "mytable",
"columns": [
{
"colname": "username",
"coltype": "string"
}
]
}
- Multiple Columns
{
"tblname": "mytable",
"columns": [
{
"colname": "username",
"coltype": "string"
},
{
"colname": "phone_number",
"coltype": "string"
}
]
}
- With Custom Meta options
{
"tblname":"mytable",
"columns":[
{
"colname":"username",
"coltype":"string"
}
],
"meta_options":{
"strname":"username",
"reprname":"id",
"ordering":"username",
"indexes":[
"username",
"email"
]
}
}
Query Parameters:
table_name (required): The name of the table to retrieve. Example Request:
GET /api/table/?table_name=mytable
Example Requests:
- Add a Standard Column
{
"change": "add",
"colname": "useremail_id",
"coltype": "string"
}
- Add a Foreign Key Column
{
"change": "add",
"colname": "kyc_info",
"to_table": "7717",
"to_row_id": 1,
"coltype": "foreignkey"
}
Example Requests:
- Remove a Standard Column
{
"change": "remove",
"colname": "phone_number"
}
- Remove a Column with Relation
{
"change": "remove",
"colname": "kyc_info",
"to_table": 7717
}
Example Request:
{
"change": "alter",
"oldcolname": "first_name",
"colname": "full_name",
"coltype": "string"
}
Example Requests:
- Change Column Type (Keeping Column Name)
{
"change": "alter",
"oldcolname": "emp_id",
"colname": "emp_id",
"coltype": "number"
}
- Change Column Type and Name
{
"change": "alter",
"oldcolname": "emp_id",
"colname": "is_checked",
"coltype": "boolean"
}
Example Request:
{
"employee_name": "Jerome jack",
"product_details": "sample",
"is_completed": true,
"email_id": "jack@proton.me",
"kyc_info_id": null
}
Endpoint: PUT /table/api/row/{table_id}/
Example Request:
{
"id": 4,
"employee_name": "Jerome jackson",
"product_details": "sample",
"kyc_info_id": null
}
Endpoint: DELETE /table/api/row/{table_id}/
Query Parameters:
id (required): The ID of the row to delete.
Example Request: DELETE /table/api/row/3313421/?id=4