Example
This example web service is provided for testing and learning purposes. The
available methods perform simple, non-critical operations and are freely
accessible for integration testing. Use this service to validate your API
client or integration without affecting any live data.
To get access to the methods below, you need an API token for this web service. You can create one by
clicking on the button below.
The Example methods:
POST /api/v1/{token}/example/add
The Add method accepts two integers, a and b, and returns their sum. This endpoint demonstrates a simple arithmetic operation via a POST request.Parameter | Type | Default | Description |
---|---|---|---|
a (required) | int | The first integer to be added. | |
b (required) | int | The second integer to be added. |
Example add requests:
Request with integers a and b, returning their sum a+b.
$ curl
-X POST
--data '{"a":2,"b":3}'
"https://api.eu-west.hqapi.com/api/v1/YourToken01/example/add"
The response:
{ "value": 5 }
Try it now!
We have created a page with all the arguments and one of your tokens to test this add method out yourself.GET /api/v1/{token}/example/nop
This method performs no operations and returns an empty response. It is intended primarily for testing connectivity and basic request handling.Example nop requests:
Returns an empty JSON object to indicate no operation was performed.
$ curl
"https://api.eu-west.hqapi.com/api/v1/YourToken01/example/nop"
The response:
{}