Example of a REST server

15 views
Skip to first unread message

Adrian Cole

unread,
Aug 24, 2013, 6:50:28 PM8/24/13
to denomina...@googlegroups.com, denomin...@googlegroups.com
Hi, folks.

I know that we've spoken a lot about a rest api, lately.  For example, we had a nice session at the api-craft event last month, and a myriad of chats on irc and twitter.

I figured I'd throw together a straw-man of a read-only api to start a more concrete discussion.  Have a look at the api of the example I just threw out.


While the implementation is a bit more science project than our prod server at Netflix, the api is almost the same.

If anyone is interested in helping with a production grade OSS api server project, ping back!  As always, this sort of stuff is very good CloudPrize fodder.

Cheers,
-A

Adrian Cole

unread,
Aug 25, 2013, 12:40:42 AM8/25/13
to denomina...@googlegroups.com, denomin...@googlegroups.com
This is now a full-write example.  Ex.

  "name": "test.myzone.com.",
  "type": "TXT",
  "ttl": 1800,
  "records": [{
    "txtdata": "made in norway"
  }, {
    "txtdata": "made in sweden"
  }]
}'

Colm MacCárthaigh

unread,
Aug 25, 2013, 1:19:41 AM8/25/13
to Adrian Cole, denomina...@googlegroups.com, denomin...@googlegroups.com
Interesting. Does the "txtdata" type take an array too? e.g. 

"txtdata" : [ "made in ireland", "made in denmark" ]

TXT records are seriously weird - internally they are arrays, even though recordsets are also arrays of records. 

--
Colm

Adrian Cole

unread,
Aug 25, 2013, 2:19:02 AM8/25/13
to Colm MacCárthaigh, denomina...@googlegroups.com, denomin...@googlegroups.com
No, each would have whatever the json encoding is for quotes strings.  You could always try it by firing up the example against your account and doing a list :)
Reply all
Reply to author
Forward
0 new messages