[Pulp-list] Action Parameters

Jason L Connor jconnor at redhat.com
Mon Jun 21 21:37:50 UTC 2010


Hi All,

I've been playing around with making our API conform to the restful
practices in the 'rest-practices' branch. While hacking away, I've
noticed that we don't really have any particular convention for the
format of parameters (read: body) passed into action POST calls.

There are a number of conventions we can adopt:

1. no convention: let each controller figure out the parameters it
expects and the order it expects them in.

2. only one parameter: the body contains only a single parameter, which
can be a list or dictionary of multiple parameters.

3. key word arguments: the body always contains a dictionary, of
<parameter name>: <parameter value> pairs

4. others?

----

The reason I bring this up is: The restful practices has produced some
very nice looking patterns that allow for some abstraction in the web
services layer. However, not having a convention for the way parameters
are passed into the action uris limits our ability of abstraction and
places a burden on both client and server developers by having to know
how to format parameters on a action by action basis.

I don't have really strong feelings about this. But it seems like a nice
practice for consistency.

Thoughts?

-- 
Jason L Connor
Senior Software Engineer
Systems Management and Cloud Enablement
Red Hat, Inc.
+1.919.890.8331
Freenode: linear
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20100621/304af4a7/attachment.sig>


More information about the Pulp-list mailing list