3

I am aware you can go to the Watson Conversation interface, right click on a workspace, and download the JSON of a workspace, which contains the intents, as it says here: Is there any way to export intents for watson conversation?

However, I need to write a program/script to do this automatically. An API method for this would be great, but I did not find any method exposed in the API documentation. My question is different than this, because I could try a workaround and not use the API, like doing a GET to the download link, but I could not deal with the SSO authentication.

How can I download the workspace JSON programmatically?

Community
  • 1
  • 1
Renan
  • 33
  • 5
  • Possible duplicate of [Bluemix Watson Conversation API to manage intents, entities](http://stackoverflow.com/questions/40635955/bluemix-watson-conversation-api-to-manage-intents-entities) – James Taylor Jan 17 '17 at 13:12
  • Thanks, James. Just edited my question to explain how it's different than the suggested duplicate. – Renan Jan 17 '17 at 13:25
  • The download link in the UI is not intended to be used programmatically. I guess you could try something like Selenium but the correct way to programmatically export workspaces will be to use the public API once it's been updated. Unfortunately I cannot give you an ETA but updating the API is a high priority. – James Taylor Jan 17 '17 at 15:54
  • I agree that the download link is not the best solution. It would just be a workaround while we don't have the proper API method. I am looking forward to seeing the API updates and glad to hear it's a high priority. Thanks a lot, James. – Renan Jan 17 '17 at 17:44
  • Watson Conversation recently released APIs on Intents: see here: https://www.ibm.com/watson/developercloud/conversation/api/v1/#intents – Brian Loveys Mar 07 '17 at 12:29
  • Thanks, Brian! I marked this question as answered. – Renan Mar 08 '17 at 13:22

1 Answers1

3

The /workspaces endpoint was recently announced and might meet your need. Take a look here: https://www.ibm.com/watson/developercloud/conversation/api/v1/#get_workspace Look at EntityExportResponse.

Jim Collins
  • 146
  • 1
  • Yes, as it says here, we can now get the intents of a workspace. Thank you! ```"(...) If the export parameter is true, the return data also includes all workspace content (such as intents, entities, and dialog nodes) in JSON format. "``` – Renan Mar 08 '17 at 13:08