You are correct, this is not currently documented. However, you can find the REST call in our API Explorer , although you are not getting syntactic sugar from the JS SDK. Call REST: DELETEto /db/{bucket}, where bucketis the name of the table to be deleted. Using the JS SDK, this request is wrapped in a message object TruncateBucket, you can use it as follows:
DB.login("userWithAdminRole", "<password>").then(function() {
return DB.send(new DB.message.TruncateBucket('<table>'));
}).then(function () {
console.log('truncated!');
}).catch(function() {
console.log('catch truncated!');
});
. , (, DB.login). backend module ( node), .
REST API Explorer. :
