Sending requests
The VSSL api is packaged in an Ubuntu snap container that can be installed on many Linux platforms. Once you install the vsslagent snap to your Linux system then that machine will listen for HTTP requests on the local interface, port 8000. You can make calls to this service to interact with the VSSL units available on the same network as your Linux host.
About HTTP
HTTP are requests sent via TCP/IP. It is essentially ASCII encoded string data on TCP. The string data is formatted after the HTTP standard.
Main Line: The HTTP verb (all caps), a space, followed by the endpoint (url encoded), a space, followed by the HTTP version, imediately followed by a new line character
\r\n
.Headers: There are standard headers added to the request, each separated by a new line
\r\n
. These aren't necessary for the VSSL agent.Body: After the headers is the body. Usually this is HTML data or JSON. This isn't needed for the VSSL agent
Example HTTP Request: "GET http://www.example.com/ HTTP/1.1\r\n\r\n"
This request has no headers and no body. You don't need either for the VSSL agent.
For systems that only send TCP/IP commands, you just enter this string as ASCII data.
Sending HTTP Requests to VSSL Agent
Use the following details when sending your requests to the VSSL agent.
VSSL Agent Port
The VSSL API listens for requests on port 8000
VSSL API Endpoint
All endpoints use the base URL: http://<your-device-ip>:8000/api
Request methods
Where possible, the VSSL API strives to use appropriate HTTP verbs for each action.
GET, SET, PATCH, POST, DELETE
Parameters
Parameters are sent as a query string in the request URL. A query strings is data sent in a url following a '?'.
Example: http://example.com/test?state=utah&city=hurricane
The query string in this url is
state=utah&city=hurricane
.In this example, we passed in the values of 2 parameters called state and city. Notice multiple values are separated with a '&'.
Sending HTTP as an IP Command (TCP/IP)
Many 3rd party automation systems have a restricted API for interfacing with VSSL. These systems often can only send IP based commands.
For these systems you just send the command as ASCII data to the IP address of the VSSL Agent using port 8000.
Example IP Command:
Only send the data inside the quotes (" "). The quotes signify ASCII encoded string data.
Last updated
Was this helpful?