[katello-devel] API V2 format changes

Ohad Levy ohadlevy at redhat.com
Mon Mar 11 15:34:46 UTC 2013



----- Original Message -----
| On 03/08/2013 06:55 AM, Dmitri Dolguikh wrote:
| > On 07/03/13 04:46 PM, Martin Bacovsky wrote:
| >> We (Tomas and Martin) are working on API redesign and cleanup. The
| >> motivation for this is that the practices are not consistent in
| >> current API which makes UX not pleasant and is causing
| >> difficulties
| >> while creating CLI. In the future it could be possible to
| >> autogenerate
| >> python bindings for Katello  and/or parts of the CLI.
| >>
| >> Current state
| >>     * nesting of elements is not consistent
| >>     * when use of as_json the representation of entities is
| >> distributed over the code
| >>     * some results render as text instead of JSON
| >>
| >> Our goals:
| >>     * make the transition as simple as possible
| >>     * use RABL for JSON output definition
| >>     * make responses consistent
| >>     * unify error handling
| >>     * make it easy to change the output behaviour from one place
| >>
| >> There are some decision that needs to be done. We are looking for
| >> opinions on following things:
| >>
| >>     Support messages in 2XX responses? e.g. 'message: "Environment
| >>     was
| >> successfully deleted"'
| >
| > I think messages are redundant: the client knows the resource it's
| > accessing, the operation, and can figure out the result based on
| > the
| > status code.
| 
| For standard responses, I would agree. FOr errors.. somce context
| might
| be nice

I think it make sense to introduce error codes as well, maybe this could help with some localization issues, and could also be referenced in documentation?

| 
| -- bk
| 
| _______________________________________________
| katello-devel mailing list
| katello-devel at redhat.com
| https://www.redhat.com/mailman/listinfo/katello-devel
| 




More information about the katello-devel mailing list