openwhisk-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rodric Rabbah <>
Subject simplifying the URLs for API calls
Date Mon, 16 Jan 2017 20:15:57 GMT
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.

   - *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
   - 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
   - support start, end, skip, limit on all list operations, return totals
   to allow pagination
   - listing activations for packages may not include bindings

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message