On 04/30/2013 06:39 PM, Stephan Beal wrote:
Hi, Ron!

if you can propose a JSON API for fossil's ticket system which takes into account its internal flexibility, i'd be up for implementing the JSON API for tickets. At some point i took a crack at it and failed miserably because the ticket API is, deep down inside, flexible enough that it makes it really difficult to settle on a single JSON data model for.

Hi, Stephan -

Yeah, there are actually two problems together:

1. Trying to execute a cross-domain request from my app (I suppose I
   have to tell the web-server, not fossil, that I want to allow that) and
2. Finding a decent way to script a ticket.

In the past, I have resorted to running a CGI script on the server, which gets the parameters and then does command-line-fu to get the ticket into fossil. This is ugly, nasty and prone to lots of problems.

Ideally, a JSON interface would look something like:
... /json/tktnew

where the data payload would be something like:

{
    "title" :  "Your app stinks",
    "type" :  "Code_Defect",
    "severity" : "Critical",
    "private_contact" : "get_r...@gmail.com",
    "comment" : " blah, blah ..."
}

Basically just using the same names as the HTML form does. Other fields could be added as appropriate for the specific ticket database structure. Missing fields could simply be replaced with "".

Response would be something like:

{
    "errorcode" : "0",
    "uuid" : "1324234...",
}

I'm alternately fascinated and repelled by trying to get a Javascript "cross-platform" application working ...

_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to