API future
Mads Kiilerich
mads at kiilerich.com
Wed Sep 24 14:40:16 EDT 2014
On 09/14/2014 09:43 PM, domruf wrote:
> Hi,
>
> as I wrote here http://article.gmane.org/gmane.comp.version-control.kallithea/43
> I'm writing a jenkins plugin.
>
> For this I need an API that gives me the open pull requests of a repository.
> But since there are two kinds of APIs in kallithea I'm not sure which one to use.
> For my prototype I simply added a web view with @LoginRequired(api_access=True)
> to pullrequests.py. This was the simplest solution for me.
>
> Before I cleanup my code and create a pull request I wanted to ask which API I
> should use.
> I think the web views are simpler to write and to be honest I don't really see
> the point of /_admin/api.
(Dominik also made
https://bitbucket.org/conservancy/kallithea/pull-request/47/add-pullrequest-json-page
)
First of all: When you say API you refer to a "web service" API?
I haven't used the APIs and haven't looked much at their implementation
... and I do also not have much experience with this kind of api access.
I do thus not have much of an opinion on the topic.
It seems like the API has some stupid speling erors that we should fix
before 1.0 . I think we should try to clean up before 1.0 , and after
1.0 we should "promise" to provide a stable API.
I agree that much of the stuff under _admin in the URL namespace would
be better to have elsewhere.
I would like to clean the browser URLs up a bit so they follow a nice
"object oriented" structure without any "name space collision". I would
also expect that pretty much all URLs had an option for returning the
essential data of the page as json/xml instead of html.
The existing POST urls are also a bit unfortunate in some places -
especially when a POST returns a rendered page at a URL but there is no
GET at the same URL. Cleaning that up would probably also provide for a
better API for modification.
I also saw a talk about morepath. It seemed very nice and fancy ... but
quite different from what we are doing now.
Dominik and others: Can you say more this and what direction you think
we should move in?
/Mads
More information about the kallithea-general
mailing list