Wednesday, June 24, 2015

Week 4

In the previous week, I have been testing the code and preparing the documentation.

For testing, I was interested in Pyrestest at the beginning because of its simplicity. However it doesn’t support dynamic variable assign between tests, so I decided to switch to Javascript. This also brings convenience in the next step, I will need to write a demo client using Javascript. For documentation, Swagger.io is a great tool. It provides user friendly, quick testing, support authentication & API key.

I still feel like the code needs more polishing and it is not good enough for demonstration. So I decided to hold back the demo version for a while. In the mean time I will tell more details about the project in the blog posts.

The REST handler will be separated from the rest of the tracker. Any request uri begins with ‘/rest’ will be forwarded to REST handler. At this point, request is divided into 3 groups ‘class’, ‘object’, and ‘attribute’ with 5 possible actions ‘GET’, ‘POST’, ‘PUT’, ‘DELETE’ and ‘PATCH’.
Example:

  • 'issue' is a class, ‘GET’ request to /rest/issue will return the whole collection of “issue” class.
  • 'issue12' is an object, ‘DELETE’ request to /rest/issue12 will delete the issue12 from the database
  • 'title' is an attribute of 'issue12', ‘PUT’ request to /rest/issue12/title with form “data=new title” will make the title of issue12 becomes “new title”

REST Handler also accept HTTP Header ‘X-HTTP-Method-Override’ to override GET, POST with PUT, DELETE and PATCH in case the client cannot perform those methods. For PUT and POST, the object will be using form data format

Error status will appear in both HTTP Status code and response body, so if the client cannot access the response header, it will retrieve the status from the response object.

Detail information of the standard will be published in the documentation.

Tuesday, June 16, 2015

Week 3

So far, I have my Roundup REST live and working now. During next week, I will have the Documentation published, so people can start making feedback on them.


This week:
Roundup can perform GET, POST, PUT, DELETE and return the data
Errors and Exception handling

Next week:
Perform PATCH
Documentation
Simple client that uses REST from Roundup


Thursday, June 11, 2015

Week 2

In the previous week, I had implemented GET prototype using the same method as xmlrpc handler. With this implementation, I will achieve better manipulation with information, in comparison with the last method.

The current challenge is making my module as clean and easy as possible, in order to upgrade it. Moreover, taking the full advantage of the roundup design is necessary.

So that's it for this week. My target is having a working REST by the end of this week.