[Pulp-list] RESTful Practices

Pradeep Kilambi pkilambi at redhat.com
Thu Jun 17 14:48:43 UTC 2010


On 06/16/2010 08:56 PM, Jason L Connor wrote:
> Hi All,
>
> I've put together a document on the wiki describing the practices I
> think we should adopt for juicer's rest api.
>
> https://fedorahosted.org/pulp/wiki/RestfulPractices
>
> A couple of caveats:
>        * the document's tone is authoritative, but it is just a draft and
>          open for comments and criticisms.
>        * the document does not reflect the condition of the current api.
>          please don't be fooled by the examples.
>
> Please take a look at this document at your earliest convenience. All
> feedback can be sent to this mailing list.
>
> Cheers!
>    

Good info here. Thanks for pulling this together. Few more that we might 
want to add:
* Defining custom exceptions to be propagated down to the clients from 
specific handlers with Appropriate Error codes and messages. For 
consumer handler for example can include the following data client can 
parse and show the user like so:

Error Code: 405
Exception: ConsumerException
Message: Invalid user credentials trying to create a consumer

* localizing the exception before sending down to the clients based on 
Accept-language header sent from the client would be a good practice. 
This way client doesnt have to worry about translating them separately.

~ Prad

>
> _______________________________________________
> Pulp-list mailing list
> Pulp-list at redhat.com
> https://www.redhat.com/mailman/listinfo/pulp-list
>    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20100617/41ad3f31/attachment.htm>


More information about the Pulp-list mailing list