Do we have any api to Truncate db Table?

Hello Team,
Client has a use case where they need to truncate db table records on instant basis.

Do we have any API to Truncate db Table ?

bit urgent, please help.

curl --location '<botid>' \
--header 'authority:' \
--header 'accept: */*' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <apikey>' \
--data '{
    "ttl": 0,
    "table": "<table_name>"

Thanks alot for your response,

so the truncate happens on immediate basis or after a specific time ?

Got a success message with purging started but records are still there. so after any specific time truncate happens ?

Hi @Dipanjan_Datta , why do you require an API to truncate a table. It is easier to do it from the UI right ?

Hello @Harshin_Balaji , they have a use case where after certain condition is fulfilled, they need to either delete all the records from the table or a particular column records.
and the deletion depends on the user end.

Hi @Subhrajit_Gupta
the api didnt work, yesterday the api was triggered, just checked the records are not deleted.