Re: simplifying the URLs for API calls

2017-01-17 Thread Dragos Dascalita Haut
Rodric this is a great idea to support it as part of `/v1`.


A quick comment on:


* get by id /api/v2/activations/?id=


Is this a search or a get, in which case we could maybe use:

GET /api/v2/activations/{id}


also what about providing a vanity URL to the latest activation of an 
action ?

GET /api/v2/activations/ns/pkg/action/latest

or

GET /api/v2/actions/ns/pkg/action/activations/latest



dragos

From: Rodric Rabbah 
Sent: Monday, January 16, 2017 12:15:57 PM
To: d...@openwhisk.incubator.apache.org
Subject: simplifying the URLs for API calls

With the recent changes we've made to OpenWhisk to make the mapping of keys
to namespace strictly 1-1, we can simplify the URLs for API calls (some
users have already picked up on this). I'm added a comment to an
outstanding issue about this potential improvement we can make [1] where
initially the thought was to do this as part of a v2 of the API but I think
it's entirely possible to support the cleaner URLs as part of v1 with some
nginx rewrites as well. Regardless, we should leverage the stricter mapping
and simplify the URLs because they'll be less confusing.

I'm pasting my comment below as well for your convenience.
[1] https://github.com/openwhisk/openwhisk/issues/219#issuecomment-272951007


   - *Let* ns = namespace name or “_”
   - *Let* pkg = package name or “default”
   - *Let* action = action name

basic CRUD + activate operations for actions, triggers, rules

show below for actions but intended to be the same for triggers and rules:
read get /api/v2/actions/ns/pkg/action create/update put
/api/v2/actions/ns/pkg/action delete del /api/v2/actions/ns/pkg/action activate
post /api/v2/actions/ns/pkg/action list all actions in package get
/api/v2/actions/ns/pkg list all actions in all packages in namespace get
/api/v2/actions/ns questions and considerations

   - get/put/del only the exec part of the schema e.g., "code" or "zip"?
   - want streaming for the “code” or “zip”, treat as attachments, treat as
   subresource?
   - support ?override, ?createonly, ?updateonly for put
   - list all actions in package can include bindings
   - list all actions in all packages cannot easily includes bindings
   (couchdb reasons)
   - allow for action extensions for content type and projection for result
   path as in "web" feature?

basic CRUD operations for packages get package or binding get
/api/v2/packages/ns/pkg (default not allowed) create/update package or
binding put /api/v2/actions/ns/pkg (default not allowed, cannot be
bound) delete
package or binding /api/v2/actions/ns/pkg (default not allowed) list all
packages and bindings in namespace fet /api/v2/actions/ns basic read
operations for activations get by id /api/v2/activations/?id= get by name
/api/v2/activations/?name= get all activations for action get
/api/v2/activations/ns/pkg/action list all activations for actions in
package get /api/v2/activations/ns/pkg list all activations in all packages
in namespace get /api/v2/activations/ns questions and considerations

   - get only logs, as subresource?
   - get only results, as subresource?
   - want streaming for the “logs” and the “results”, treat as attachments
   also
   - support start, end, skip, limit on all list operations, return totals
   to allow pagination
   - listing activations for packages may not include bindings


Request to be added into the dev and commit mail lists

2017-01-17 Thread Vincent S Hou

Hi everyone in openwhisk community,

My name is Shengbo Hou. Most of the time I go by Vincent Hou. The Apache
account name I applied is houshengbo.
I am working with IBM and the initial contributor to OpenWhisk project.

I actually submitted the ICLA to Apache secretary one month ago on Dec
14th, 2016, but I have not received any response yet. I sent to the
secretary several follow-up mails, but also no answer. I am not sure of my
status with apache. I did not receive any mail from
d...@openwhisk.incubator.apache.org. I hope someone over here can help to
add me into both of the mail lists.

Thank you.

Best wishes.
Vincent Hou (侯胜博)

Advisory Software Engineer, OpenStack Contributor, IaaS and OpenStack
Department, Open Technology, IBM Cloud

Notes ID: Vincent S Hou/Raleigh/IBM, E-mail: s...@us.ibm.com,
Phone: +1(919)254-7182
Address: 4205 S Miami Blvd (Cornwallis Drive), Durham, NC 27703, United
States