Input communication test
From ePrize Developers Wiki
(Difference between revisions)
(2 intermediate revisions not shown.) | |||
Line 1: | Line 1: | ||
- | + | {{RESTfulAPI | |
- | [[API Home Page]] :: [[API Debugging]] | + | |crumbs=[[API Home Page]] :: [[API Debugging]] |
- | + | |summary=Basic echo service. POST a value to the resource and it will be returned. This is useful for validating POST body encoding/decoding. | |
- | + | |resource=/v1/{apikey}/test/communication.{extension} | |
- | value={ | + | |methods=POST |
+ | |resourceargs='''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. | |
- | + | |paramsrequired=None | |
- | + | }} | |
- | + | {{RESTfulExample | |
+ | |title=Communication Test (POST), with default XML content-type. | ||
+ | |request=value={value} | ||
+ | |responsecode=200 OK | ||
+ | |response=<?xml version="1.0" encoding="UTF-8" ?> | ||
+ | <result ver="1.1">TESTVALUE</result> | ||
+ | }} | ||
+ | |||
+ | {{RESTfulExample | ||
+ | |title=Communication Test (POST), with JSON content-type. | ||
+ | |request=value={value}, add ".json" extension to resource | ||
+ | |responsecode=200 OK | ||
+ | |response={ | ||
+ | "result" : "{value}" | ||
+ | } | ||
+ | }} | ||
+ | |||
+ | {{RESTfulExample | ||
+ | |title=Communication Test (POST), with Yaml content-type. | ||
+ | |request=value={value}, add ".yaml" extension to resource | ||
+ | |responsecode=200 OK | ||
+ | |response=--- {value} | ||
+ | }} |
Current revision
API Home Page :: API Debugging
Summary
Basic echo service. POST a value to the resource and it will be returned. This is useful for validating POST body encoding/decoding.
Resource
/v1/{apikey}/test/communication.{extension}
Valid Methods
POST
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 (POST), with default XML content-type.
Request
value={value}
Response
HTTP Status Code: 200 OK
<?xml version="1.0" encoding="UTF-8" ?> <result ver="1.1">TESTVALUE</result>
Example: Communication Test (POST), with JSON content-type.
Request
value={value}, add ".json" extension to resource
Response
HTTP Status Code: 200 OK
{ "result" : "{value}" }
Example: Communication Test (POST), with Yaml content-type.
Request
value={value}, add ".yaml" extension to resource
Response
HTTP Status Code: 200 OK
--- {value}