Note: This document is a work in progress
The following describes the Web API for the Skywire Node (node
) application. You will need access to a running instance of both the manager
and node
applications in order to utilise the APIs. Node: Some node
APIs first require authorisation from the manager
.
Examples provided below assume the Node is running on the local machine (127.0.0.1). The default port for accessing the API is 6001
.
All Node and Application keys have been deliberatly altered to ensure they are invalid.
The following API services are made avaiable by the Skywire Node application (node
):
URI: /node/getSig
Method: TBA
Example:
Response:
Get information about the specific node the request is being made against.
You must successfully /login
on the Manager to aquire a session cookie before calling this API. A valid Manager session cookie must be passed along with this request.
URI: /node/getInfo
Method: Get
Request:
curl "http://127.0.0.1:6001/node/getInfo?token=ca51143c60b1ab2078cacd619f1c4f7a8feacd6e0fc40af1c5d3d3573c1d1ac5" \
-H 'Cookie: SWSId=1134c7bfcfa34d5c1015dfd473ab0cfa;'
Response:
{"discoveries":{"discovery.skycoin.net:5999-034b1cd4ebad163e457fb805b3ba43779958bba49f2c5e1e8b062482904bacdb68":true},"transports":null,"app_feedbacks":null,"version":"0.1.0","tag":"dev","os":"darwin"}
URI: /node/getMsg
Method: TBA
Example:
Response:
Retrieves a list of the Skywire applications that are currently active and running on the Node.
The response provided will be an array of running applications, specifying the application key
and attribure
which defines to the type of application.
URI: /node/getApps
Method: Get
Example:
curl "http://127.0.0.1:6001/node/getApps?token=261f61d536c89ecb0e51a31c1a438a278e298e61297dab9afa20199f264bf41c" \
-H 'Cookie: SWSId=12384f4a4e2c60c160bdc190d0b1f331'
Response:
[{"key":"01c8d1cfb7167371ce2ba8fd7c7341bca0c2a511052650164bcb368386232617ac","attributes":["sockss"],"allow_nodes":null}]
Reboots (restarts) the Node application. An example usage of this API can be found in the Manager Web UI.
URI: /node/reboot
Method: TBA
Example:
Response:
Runs (starts) the Skywire sshs
(SSH Server) application on the Node.
URI: /node/run/sshs
Method: TBA
Example:
Response:
Runs (starts) the Skywire sshc
(SSH Client) application on the Node.
URI: /node/run/sshc
Method: TBA
Example:
Response:
Runs (starts) the Skywire sockss
(Socks Server) application on the Node.
URI: /node/run/sockss
Method: TBA
Example:
Response:
Runs (starts) the Skywire socksc
(Socks Client) application on the Node.
URI: /node/run/socksc
Method: TBA
Example:
Response:
Runs (starts) the Skywire software update process. Use /node/run/checkUpdate
to check if a new software version is avaiable first.
URI: /node/run/update
Method: TBA
Example:
Response:
Runs (starts) the Skywire software update check. Used to check if a new version of Skywire is available. Use /node/run/update
to perform the update.
URI: /node/run/checkUpdate
Method: TBA
Example:
Response:
URI: /node/run/setNodeConfig
Method: TBA
Example:
Response:
URI: /node/run/updateNode
Method: TBA
Example:
Response:
URI: /node/run/runShell
Method: TBA
Example:
Response:
URI: /node/run/runCmd
Method: TBA
Example:
Response:
URI: /node/run/getShellOutput
Method: TBA
Example:
Response:
URI: /node/run/searchServices
Method: TBA
Example:
Response:
URI: /node/run/searchServicesResults
Method: TBA
Example:
Response:
URI: /node/run/getAutoStartConfig
Method: TBA
Example:
Response:
TBA
URI: /node/run/setAutoStartConfig
Method: TBA
Example:
Response:
URI: /node/run/closeApp
Method: TBA
Example:
Response:
URI: /node/run/term
Method: Get
Example:
Response: