Beta feature

From ePrize Developers Wiki

(Difference between revisions)
Jump to: navigation, search
(New page: {{Logo}} ePrize Web Services is under constant development. The versioned URLs and robustness of RESTful services allow us to roll out changes without disrupting any clients. Many changes...)
Current revision (15:44, 28 August 2009) (edit) (undo)
(New page: {{Logo}} ePrize Web Services is under constant development. The versioned URLs and robustness of RESTful services allow us to roll out changes without disrupting any clients. Many changes...)
 

Current revision

ePrize Web Services is under constant development. The versioned URLs and robustness of RESTful services allow us to roll out changes without disrupting any clients. Many changes will first appear here as a beta feature.

JSON and YAML support

XML is the default response format. JSON and YAML can be requested either adding a type extension on the request URL or by setting the HTTP Accept header.

JSON and YAML are both serialization formats, so the existing ePrize Web Services documentation closely resembles these formats. The following examples are probably all you need, but let us know if more documentation is required.

$ curl http://{host}/v1/{apikey}/test/structured.xml
<?xml version="1.0" encoding="UTF-8" ?>
<result>
  <name>Ken</name>
  <dictionary>
    <one>1</one>
    <three>3</three>
    <two>2</two>
  </dictionary>
  <email>Ken Fox &lt;ken.fox@eprize.com&gt;</email>
  <favorite>http://www.eprize.com/</favorite>
  <favorite>http://code.eprize.com/wiki/</favorite>
  <id>1</id>
  <quoted_utf8>He said, &quot;This is a fine ♥.&quot;</quoted_utf8>
</result>


$ curl http://{host}/v1/{apikey}/test/structured.json
{
  "result" : {
    "email" : "Ken Fox <ken.fox@eprize.com>",
    "quoted_utf8" : "He said, \"This is a fine \u2665.\"",
    "dictionary" : {
      "three" : 3,
      "one" : 1,
      "two" : 2
    },
    "name" : "Ken",
    "id" : 1,
    "favorite" : [
      "http://www.eprize.com/",
      "http://code.eprize.com/wiki/"
    ]
  }
}


$ curl http://{host}/v1/{apikey}/test/structured.yaml
--- 
dictionary: 
  one: 1
  three: 3
  two: 2
email: Ken Fox <ken.fox@eprize.com>
favorite: 
  - http://www.eprize.com/
  - http://code.eprize.com/wiki/
id: 1
name: Ken
quoted_utf8: He said, "This is a fine ♥."

Personal tools