Table of Contents
...
By default, the SOS controller’s REST API runs at the controller’s IP on TCP port 8080. An HTTP client can be used to leverage the API. The popular utility curl is used throughout this document as an example HTTP client. For more information on curl, please refer to curl’s documentation. The following is a general example on how to use curl:
...
Code Block | ||
---|---|---|
| ||
curl http://192.168.1.1:8080/wm/sos/status/json -X GET | python -m json.tool |
which returns:
Initiate Transfer
The first thing to do prior
Code Block | ||
---|---|---|
| ||
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 68 0 47 100 21 9712 4339 --:--:-- --:--:-- --:--:-- 11750
{
"code": "0",
"message": "Ready to accept a transfer"
} |
if the controller is ready. The return will appear as follows if the user should wait before proceeding:
Code Block | ||
---|---|---|
| ||
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 68 0 47 100 21 9712 4339 --:--:-- --:--:-- --:--:-- 11750
{
"code": "6",
"message": "Not ready to accept a transfer"
} |
Initiate Transfer
Once the agents have been added, the transfer has been whitelisted, and the controller indicates the SOS network is ready to handle the transfer, the user can initiate the transfer using any means on the client machine. The assumption is that the underlying transport protocol used is TCP and that the client IP address, server IP address, and server TCP port are those indicated in the whitelisted entry.
Check Statistics
To get information about the transfer being performed, such as the agents chosen, the routes being used, etc. The statistics API can be used as follows:
Code Block | ||
---|---|---|
| ||
curl http://192.168.1.1:8080/wm/sos/status/json -X GET | python -m json.tool |
which returns, as an example:
Code Block | ||
---|---|---|
| ||
|