Closed lfzCarlosC closed 8 years ago
$ vagrant@vagrant-ubuntu-trusty-64:~/openwhisk/ansible$ curl -X GET http://localhost:5984/root_vagrant-ubuntu-trusty-64_whisks/whisk.system/samples/echo {"error":"not_found","reason":"missing"}
It is better to write to the document about validating action has been persisted in DB for persistent DB case.
You have to urlencode your document id. The url should be http://localhost:5984/root_vagrant-ubuntu-trusty-64_whisks/whisk.system%2Fsamples%2Fecho
. The /
is part of the id, not the URL.
In your first case it'ld be http://localhost:5984/root_vagrant-ubuntu-trusty-64_whisks/guest%2F0401366437f84d90b4a3bc614ed3fc23
problem solved. Thanks
After installing Vagrant using persistent couch DB, I executed the simple "Hello" action and wanted to check if data in Couch DB is synchronized. But when I get _all_docs,I cannot get the content of a given document.
$ vagrant ssh ...... $ curl -X GET http://localhost:5984/root_vagrant-ubuntu-trusty-64_whisks
{"total_rows":29,"offset":0,"rows":[ {"id":"_design/whisks","key":"_design/whisks","value":{"rev":"1-519a71338899309c424c45f26501ac61"}}, {"id":"whisk.system/github","key":"whisk.system/github","value":{"rev":"1-2e30eac0d49926e718a54d7eb9a31bb4"}}, {"id":"whisk.system/github/webhook","key":"whisk.system/github/webhook","value":{"rev":"1-02d6e5fd64a4ab51fadd4e53780db061"}}, {"id":"whisk.system/samples","key":"whisk.system/samples","value":{"rev":"1-eed55dae1d35d391f882f312db55d33e"}}, {"id":"whisk.system/samples/echo","key":"whisk.system/samples/echo","value":{"rev":"1-c34a76d4bb084ca67f0f957d2d8a6c39"}}, {"id":"whisk.system/samples/greeting","key":"whisk.system/samples/greeting","value":{"rev":"1-c19ed1e76d1ff4e15cb9d380dc568c25"}}, {"id":"whisk.system/samples/helloWorld","key":"whisk.system/samples/helloWorld","value":{"rev":"1-9d10e3815ffaeef5e973a97565233a97"}}, {"id":"whisk.system/samples/wordCount","key":"whisk.system/samples/wordCount","value":{"rev":"1-e48177fb39f5a18b3d55806d58de4d7b"}}, {"id":"whisk.system/slack","key":"whisk.system/slack","value":{"rev":"1-ce932ebd695e455174ac356a20c2e43c"}}, {"id":"whisk.system/slack/post","key":"whisk.system/slack/post","value":{"rev":"1-830dd90909733c444ec4e475bb09f496"}}, {"id":"whisk.system/system","key":"whisk.system/system","value":{"rev":"1-6cab2beb3a5cdb6a0800035012fc8266"}}, {"id":"whisk.system/system/pipe","key":"whisk.system/system/pipe","value":{"rev":"1-d18abea6798c30bdfd7d0244529caa3e"}}, {"id":"whisk.system/util","key":"whisk.system/util","value":{"rev":"1-33fe23b205cc35436ba5f210c1bbde26"}}, {"id":"whisk.system/util/cat","key":"whisk.system/util/cat","value":{"rev":"1-e0773ace4a9b36d6df345bbfce1d510a"}}, {"id":"whisk.system/util/date","key":"whisk.system/util/date","value":{"rev":"1-ecf471a14407831d31918d359498d278"}}, {"id":"whisk.system/util/head","key":"whisk.system/util/head","value":{"rev":"1-6ab153a313a2e2b37941d21ed509ff71"}}, {"id":"whisk.system/util/sort","key":"whisk.system/util/sort","value":{"rev":"1-b218b895bda82e77f1cc943f9dd719f9"}}, {"id":"whisk.system/util/split","key":"whisk.system/util/split","value":{"rev":"1-084c6e8fba8d8283e80ed70b40fab4c3"}}, {"id":"whisk.system/watson","key":"whisk.system/watson","value":{"rev":"1-aaa2f2631a9076b661cd65f4b7140db3"}}, {"id":"whisk.system/watson/languageId","key":"whisk.system/watson/languageId","value":{"rev":"1-86b8465179e00791a3d1853e5ebff335"}}, {"id":"whisk.system/watson/speechToText","key":"whisk.system/watson/speechToText","value":{"rev":"1-2e3d693eaa90139b657ff4314f1c0173"}}, {"id":"whisk.system/watson/textToSpeech","key":"whisk.system/watson/textToSpeech","value":{"rev":"1-c60f94f07e0cda28f7ae595e7bf1c19a"}}, {"id":"whisk.system/watson/translate","key":"whisk.system/watson/translate","value":{"rev":"1-29d12386a723f1c24a16baa0cdc7f83b"}}, {"id":"whisk.system/weather","key":"whisk.system/weather","value":{"rev":"1-475e6975568d63b281adde7340db2e72"}}, {"id":"whisk.system/weather/forecast","key":"whisk.system/weather/forecast","value":{"rev":"1-e00d7de0304103c2db41207ced2a0500"}} ]}
$ vagrant@vagrant-ubuntu-trusty-64:~/openwhisk/ansible$ wsk action invoke /whisk.system/samples/echo -p message hello --blocking --result
{ "message": "hello" }
{"total_rows":30,"offset":0,"rows":[ {"id":"_design/whisks","key":"_design/whisks","value":{"rev":"1-519a71338899309c424c45f26501ac61"}}, {"id":"guest/0401366437f84d90b4a3bc614ed3fc23","key":"guest/0401366437f84d90b4a3bc614ed3fc23","value":{"rev":"1-09d4c703cb02877c27f2d9fd71a2182d"}}, {"id":"whisk.system/github","key":"whisk.system/github","value":{"rev":"1-2e30eac0d49926e718a54d7eb9a31bb4"}}, {"id":"whisk.system/github/webhook","key":"whisk.system/github/webhook","value":{"rev":"1-02d6e5fd64a4ab51fadd4e53780db061"}}, {"id":"whisk.system/samples","key":"whisk.system/samples","value":{"rev":"1-eed55dae1d35d391f882f312db55d33e"}}, {"id":"whisk.system/samples/echo","key":"whisk.system/samples/echo","value":{"rev":"1-c34a76d4bb084ca67f0f957d2d8a6c39"}}, {"id":"whisk.system/samples/greeting","key":"whisk.system/samples/greeting","value":{"rev":"1-c19ed1e76d1ff4e15cb9d380dc568c25"}}, {"id":"whisk.system/samples/helloWorld","key":"whisk.system/samples/helloWorld","value":{"rev":"1-9d10e3815ffaeef5e973a97565233a97"}}, {"id":"whisk.system/samples/wordCount","key":"whisk.system/samples/wordCount","value":{"rev":"1-e48177fb39f5a18b3d55806d58de4d7b"}}, {"id":"whisk.system/slack","key":"whisk.system/slack","value":{"rev":"1-ce932ebd695e455174ac356a20c2e43c"}}, {"id":"whisk.system/slack/post","key":"whisk.system/slack/post","value":{"rev":"1-830dd90909733c444ec4e475bb09f496"}}, {"id":"whisk.system/system","key":"whisk.system/system","value":{"rev":"1-6cab2beb3a5cdb6a0800035012fc8266"}}, {"id":"whisk.system/system/pipe","key":"whisk.system/system/pipe","value":{"rev":"1-d18abea6798c30bdfd7d0244529caa3e"}}, {"id":"whisk.system/util","key":"whisk.system/util","value":{"rev":"1-33fe23b205cc35436ba5f210c1bbde26"}}, {"id":"whisk.system/util/cat","key":"whisk.system/util/cat","value":{"rev":"1-e0773ace4a9b36d6df345bbfce1d510a"}}, {"id":"whisk.system/util/date","key":"whisk.system/util/date","value":{"rev":"1-ecf471a14407831d31918d359498d278"}}, {"id":"whisk.system/util/head","key":"whisk.system/util/head","value":{"rev":"1-6ab153a313a2e2b37941d21ed509ff71"}}, {"id":"whisk.system/util/sort","key":"whisk.system/util/sort","value":{"rev":"1-b218b895bda82e77f1cc943f9dd719f9"}}, {"id":"whisk.system/util/split","key":"whisk.system/util/split","value":{"rev":"1-084c6e8fba8d8283e80ed70b40fab4c3"}}, {"id":"whisk.system/watson","key":"whisk.system/watson","value":{"rev":"1-aaa2f2631a9076b661cd65f4b7140db3"}}, {"id":"whisk.system/watson/languageId","key":"whisk.system/watson/languageId","value":{"rev":"1-86b8465179e00791a3d1853e5ebff335"}}, {"id":"whisk.system/watson/speechToText","key":"whisk.system/watson/speechToText","value":{"rev":"1-2e3d693eaa90139b657ff4314f1c0173"}}, {"id":"whisk.system/watson/textToSpeech","key":"whisk.system/watson/textToSpeech","value":{"rev":"1-c60f94f07e0cda28f7ae595e7bf1c19a"}}, {"id":"whisk.system/watson/translate","key":"whisk.system/watson/translate","value":{"rev":"1-29d12386a723f1c24a16baa0cdc7f83b"}}, {"id":"whisk.system/weather","key":"whisk.system/weather","value":{"rev":"1-475e6975568d63b281adde7340db2e72"}}, {"id":"whisk.system/weather/forecast","key":"whisk.system/weather/forecast","value":{"rev":"1-e00d7de0304103c2db41207ced2a0500"}} ]}
$ vagrant@vagrant-ubuntu-trusty-64:~/openwhisk/ansible$ curl -X GET http://localhost:5984/root_vagrant-ubuntu-trusty-64_whisks/guest/0401366437f84d90b4a3bc614ed3fc23 {"error":"not_found","reason":"missing"}