Reputation: 31
I have referred to this documentation but have not come across any API call to create Watson programmatically using the Java SDK. Is it possible to do so, or is the only way via importing the JSON file? Thank you!
Upvotes: 2
Views: 302
Reputation: 261
Check out the workspaces
endpoint documented here: https://cloud.ibm.com/apidocs/assistant#create-workspace
You can use it to create a workspace (which is a "Skill" in the updated Watson Assistant vocabulary), and from there you can use the other API endpoints to manipulate things further (creating/modifying intents, entities, dialog, etc.).
And, of course, you can use the Java SDK to make such API calls to create and manage workspaces as needed.
If you have existing JSON that you want to use when you create the Watson Assistant workspace/skill, you could pass that in the POST data using the above API call. Otherwise you can create a bare-bones workspace sending the minimal information in the sample call on that page:
{
"name": "Your new Watson Assistant",
"description": "Your description",
"language": "en",
"intents": [],
"entities": [],
"dialog_nodes": []
}
Upvotes: 1