Output communication test

From ePrize Developers Wiki

(Difference between revisions)
Jump to: navigation, search
Current revision (16:49, 8 April 2011) (edit) (undo)
 
(One intermediate revision not shown.)
Line 1: Line 1:
-
[[Image:ePrize_API.gif|right]]
+
{{RESTfulAPI
-
[[API Home Page]] :: [[API Debugging]]
+
|crumbs=[[API Home Page]] :: [[API Debugging]]
-
<pre>
+
|summary=This just verifies that the basic output system is working. It is also useful for verifying different media type support. It handy to use in a browser to be sure the basics are working. Extensions can be used to request different media types.
-
Request representation: empty
+
|resource=/v1/{apikey}/test/communication.{extension}
 +
|methods=GET
 +
|resourceargs='''apikey''': Your [[API Key]]
-
Response:
+
'''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.
-
Hello world
+
|paramsrequired=None
-
</pre>
+
}}
-
This just verifies that the basic output system is working. It is also useful for verifying different media type support.
+
{{RESTfulExample
 +
|title=Communication Test (GET), with default XML content-type.
 +
|request=Request representation: empty
 +
|responsecode=200 OK
 +
|response=<?xml version="1.0" encoding="UTF-8" ?>
 +
<result ver="1.1">Hello world</result>
 +
}}
 +
 
 +
{{RESTfulExample
 +
|title=Communication Test (GET), with JSON content-type.
 +
|request=Request representation: empty, add ".json" extension to resource
 +
|responsecode=200 OK
 +
|response={
 +
"result" : "Hello world"
 +
}
 +
}}
 +
 
 +
{{RESTfulExample
 +
|title=Communication Test (GET), with Yaml content-type.
 +
|request=Request representation: empty, add ".yaml" extension to resource
 +
|responsecode=200 OK
 +
|response=--- Hello world
 +
}}

Current revision

API Home Page :: API Debugging

Summary

This just verifies that the basic output system is working. It is also useful for verifying different media type support. It handy to use in a browser to be sure the basics are working. Extensions can be used to request different media types.

Resource

/v1/{apikey}/test/communication.{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 ver="1.1">Hello world</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" : "Hello world"
}


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

Request

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

Response

HTTP Status Code: 200 OK


--- Hello world


Personal tools