You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by be...@apache.org on 2017/07/14 16:43:04 UTC

[incubator-openwhisk] branch master updated: Doc Action URL CLI Flag (#2488)

This is an automated email from the ASF dual-hosted git repository.

berstler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
     new 61d3035  Doc Action URL CLI Flag (#2488)
61d3035 is described below

commit 61d3035475e75c8488decbe57555114a62265baa
Author: James Dubee <jw...@us.ibm.com>
AuthorDate: Fri Jul 14 12:43:02 2017 -0400

    Doc Action URL CLI Flag (#2488)
    
    * Doc Action URL CLI Flag
    * Link to REST Doc
---
 docs/actions.md    | 14 ++++++++++++++
 docs/webactions.md | 11 +++++++++++
 2 files changed, 25 insertions(+)

diff --git a/docs/actions.md b/docs/actions.md
index a1538f1..cc8f1b7 100644
--- a/docs/actions.md
+++ b/docs/actions.md
@@ -271,6 +271,20 @@ Rather than pass all the parameters to an action every time, you can bind certai
   }
   ```
 
+### Getting an action URL
+
+An action can be invoked through the REST interface via an HTTPS request. To get an action URL, execute the following command:
+
+```
+$ wsk action get actionName --url
+ok: got action actionName
+https://${APIHOST}/api/v1/namespaces/${NAMESPACE}/actions/actionName
+```
+
+**Note:** Authentication must be provided when invoking an action via an HTTPS request. For more information regarding
+action invocations using the REST interface, see
+[Using REST APIs with OpenWhisk](rest_api.md#actions).
+
 ### Creating asynchronous actions
 
 JavaScript functions that run asynchronously may need to return the activation result after the `main` function has returned. You can accomplish this by returning a Promise in your action.
diff --git a/docs/webactions.md b/docs/webactions.md
index 67493b1..28b5449 100644
--- a/docs/webactions.md
+++ b/docs/webactions.md
@@ -19,7 +19,18 @@ function main({name}) {
 You may create a _web action_ `hello` in the package `demo` for the namespace `guest` using the CLI's `--web` flag with a value of `true` or `yes`:
 ```bash
 $ wsk package create demo
+ok: created package demo
+```
+
+```
 $ wsk action create /guest/demo/hello hello.js --web true
+ok: created action /guest/demo/hello
+```
+
+```
+$ wsk action get /guest/demo/hello --url
+ok: got action hello
+https://${APIHOST}/api/v1/web/guest/demo/hello
 ```
 
 Using the `--web` flag with a value of `true` or `yes` allows an action to be accessible via REST interface without the

-- 
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].