Reputation: 347
I'm using watson-developer-cloud with nodejs and trying to delete more than intent
with the following:
let IntentName = req.body.intentName;
var params = {
workspace_id: workspaceId,
intent: // delete more than on intent here
};
conversation.deleteIntent(params, function(err, response) {
if (err) {
console.error(err);
} else {
console.log(JSON.stringify(response, null, 2));
}
});
how can i delete more than one?
Upvotes: 0
Views: 159
Reputation: 9359
One option you can do is download the whole workspace and work on the JSON object directly. Then when completed, send the whole updated block back to your workspace in one go.
This means less calls, lowering your chances of a rate limit kicking in.
Upvotes: 2
Reputation: 17156
The SDK is based on the API for Watson Assistant. The API supports deletion of one intent per call. So you would need to loop over all the intents you want to delete and remove them one by one.
Upvotes: 1