18 Jun 2013 03:57
RESTful API style guide
Michael Richardson <mcr+ietf <at> sandelman.ca>
2013-06-18 01:57:52 GMT
2013-06-18 01:57:52 GMT
As part of the Agenda Tool work, a number of JSON API calls have been
created. I have started writing some document for them, at least to have
a list of what is there. There are a number of inconsistencies in the API,
some of which I know how I want to fix, and some which I do not...
I'm writing it in markdown, although I found that neither the perl nor python
markdown converter seems to deal properly with code samples indented by 4
spaces. Any suggestions on a better tool chain?
Once I have written up what there is, I will be very interested in what parts
are just broken. To whet your appetite, the Agenda Tool loads many group
descriptions like:
[17/Jun/2013 18:04:50] "GET /group/splices.json HTTP/1.1" 200 531
[17/Jun/2013 18:04:50] "GET /group/raiarea.json HTTP/1.1" 200 378
[17/Jun/2013 18:04:50] "GET /group/6lowpan.json HTTP/1.1" 200 554
[17/Jun/2013 18:04:50] "GET /group/autoconf.json HTTP/1.1" 200 620
[17/Jun/2013 18:04:50] "GET /group/tsvarea.json HTTP/1.1" 200 346
[17/Jun/2013 18:04:50] "GET /group/hip.json HTTP/1.1" 200 559
[17/Jun/2013 18:04:50] "GET /group/mip4.json HTTP/1.1" 200 530
This is just *TOO SLOW*. Too many small requests. (I assume the browser has
a 1.1-persistent session open, but I haven't checked actually).
I'd like to replace it with:
GET /groups.json
returning an array of groups. Does this make sense, architecturally?
Any suggestions on things to include, not include, in the API template?
(Continue reading)
RSS Feed