Performance and Footprint

From RidgeRun Developer Wiki



Preferred Partner Logo 3




Each service comes with swagger API documentation. This documentation can be used to easily interact with the service.

Let's take as an example the PTZ service with this API documentation.

The first thing to do is to identify the API call you want to do. Let's imagine we want to change the position so we need to use PUT /position.


If you expand the call, you will see something similar to this:

Now, if you click the Try it out button, you will see the following section:

At that point, you can edit the request body or arguments (if any). Then you need to click the Execute button.

If the web browser used to see the API documentation is running in the same device running the server, this will be it, you just talked to the service. If it is running from a different device, then you will notice an error message:

If this is the case, you will also notice that a curl command is shown:

Just replace the command IP address for the one of the server running the service and execute:

curl -X 'PUT' \
  'http://127.0.0.1:5010/position' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -d '{
  "pan": "45.0",
  "tilt": "45.0"
}'