Semiocast API Documentation
Test methods

About

Check that your certificate is (still) valid and that you are able to communicate correctly with Semiocast API.

URL

https://api.semiocast.com/1/test/command.format

Methods

CommandDescription
nullEstablish a connection and return nothing
echoAccept parameters and return them in an XML/JSON format. It allows to verify that Semiocast API is able to parse correctly your arguments.

Formats

Output in JSON or XML.

Rate limit

The test methods are not subject to any rate limit.

Status codes

Returned HTTP Status code must be checked to verify if request has been fulfilled correctly or if something wrong happened (and how to react):

HTTP StatusDescription
200No error, see Answers to interpret result
407Bad format

Examples

Example 1

To test your certificate, you can use the following line:

curl -E semiocast-api.pem:PASSWORD "https://api.semiocast.com/1/test/null.json"

This command return nothing upon success.

Example 2

This call:

curl -E semiocast-api.pem:PASSWORD "https://api.semiocast.com/1/test/echo.xml?foo=bar&data=Test%20echo"

Results in:

<echo> <method>test</method> <params> <foo>bar</foo> <data>Test echo</data> </params> </echo>

Example 3

curl -E semiocast-api.pem:PASSWORD "https://api.semiocast.com/1/test/echo.json?foo=bar&data=Test%20echo"
{"method":"test","params":{"foo":"bar","data":"Test echo"}}