Output communication test (structured data)

From ePrize Developers Wiki

Jump to: navigation, search

API Home Page :: API Debugging

Summary

This just verifies that the basic output system is working. It will also be useful for verifying different media type support as we introduce media types other then XML. The only fully supported media type across all of the APIs at this time is XML.

Resource

/v1/{apikey}/test/structured.{extension}

Valid Methods

GET

Resource Arguments

Note: resource arguments are always required.

apikey: Your API Key

extension: optional parameter. Default is assumed to be XML. Other options are JSON and Yaml. Note: non-testing resources do not all accept other media type extensions.

Parameters Required

None



Example: Communication Test (GET), with default XML content-type.

Request

Request representation: empty

Response

HTTP Status Code: 200 OK


<?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 <ken.fox@eprize.com></email>
  <favorite>http://www.eprize.com/</favorite>
  <favorite>http://code.eprize.com/wiki/</favorite>
  <id>1</id>
  <quoted_utf8>He said, "This is a fine ♥."</quoted_utf8>
</result>


Example: Communication Test (GET), with JSON content-type.

Request

Request representation: empty, add ".json" extension to resource

Response

HTTP Status Code: 200 OK


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


Example: Communication Test (GET), with Yaml content-type.

Request

Request representation: empty, add ".yaml" extension to resource

Response

HTTP Status Code: 200 OK


--- 
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