Input URL communication test
From ePrize Developers Wiki
(Difference between revisions)
(2 intermediate revisions not shown.) | |||
Line 1: | Line 1: | ||
- | [[API Home Page]] :: [[API Debugging]] | + | {{RESTfulAPI |
- | + | |crumbs=[[API Home Page]] :: [[API Debugging]] | |
- | + | |summary=Basic echo service. PUT an empty message to the resource and the URL {value} will be returned. This is useful for validating URL encoding/decoding and if PUT can be used. | |
+ | |resource=/v1/{apikey}/test/communication/{value}.{extension} | ||
+ | |methods=PUT | ||
+ | |resourceargs='''apikey''': Your [[API Key]] | ||
- | + | '''value''': value to echo. This will be echoed into the response body. | |
- | + | ||
- | + | ||
- | + | '''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 (PUT), with default XML content-type. | ||
+ | |request=Request representation: empty, {value} is passed via resource. | ||
+ | |responsecode=200 OK | ||
+ | |response=<?xml version="1.0" encoding="UTF-8" ?> | ||
+ | <result ver="1.1">{value}</result> | ||
+ | }} | ||
+ | |||
+ | {{RESTfulExample | ||
+ | |title=Communication Test (PUT), with JSON content-type. | ||
+ | |request=Request representation: empty, {value} is passed via resource, add ".json" extension. | ||
+ | |responsecode=200 OK | ||
+ | |response={ | ||
+ | "result" : "{value}" | ||
+ | } | ||
+ | }} | ||
+ | |||
+ | |||
+ | {{RESTfulExample | ||
+ | |title=Communication Test (PUT), with YAML content-type. | ||
+ | |request=Request representation: empty, {value} is passed via resource, add ".yaml" extension. | ||
+ | |responsecode=200 OK | ||
+ | |response=--- {value} | ||
+ | }} |
Current revision
API Home Page :: API Debugging
Summary
Basic echo service. PUT an empty message to the resource and the URL {value} will be returned. This is useful for validating URL encoding/decoding and if PUT can be used.
Resource
/v1/{apikey}/test/communication/{value}.{extension}
Valid Methods
PUT
Resource Arguments
Note: resource arguments are always required.
apikey: Your API Key
value: value to echo. This will be echoed into the response body.
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 (PUT), with default XML content-type.
Request
Request representation: empty, {value} is passed via resource.
Response
HTTP Status Code: 200 OK
<?xml version="1.0" encoding="UTF-8" ?> <result ver="1.1">{value}</result>
Example: Communication Test (PUT), with JSON content-type.
Request
Request representation: empty, {value} is passed via resource, add ".json" extension.
Response
HTTP Status Code: 200 OK
{ "result" : "{value}" }
Example: Communication Test (PUT), with YAML content-type.
Request
Request representation: empty, {value} is passed via resource, add ".yaml" extension.
Response
HTTP Status Code: 200 OK
--- {value}