Installs or upgrades one or more NetSapiens packages on one server, to the newest version or to the version you name.Requires Super User scope.packages must be a non-empty list, every name in it must start with netsapiens-, and version must be a Debian package version. Anything else is refused with 400 before apt runs. A version applies to every package in the request and allows a downgrade. Pick versions from all_options in GET /apt/installed/{hostname}.The response streams apt output as plain text. A failed install still answers 200: read the last line. If another apt operation is running on the server, this one waits for it, up to 20 minutes, then answers 409. When a package restarts the web server or the apt manager itself, that restart waits until the response has finished, so the stream is not cut off.
Request
Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Path Params
Query Params
Header Params
Body Params application/jsonRequired
Examples
Responses
🟢200OK
text/plain
apt output as plain text, streamed while the command runs. The connection stays open until apt finishes, which can take several minutes. The text starts with an Executing command: line and ends with Command executed successfully with exit code: 0 or Command failed with exit code: <n>. Both lines carry ANSI color codes. A failed apt run still answers 200, so read the last line, not the status code. If another apt operation holds the apt lock, the request waits up to 20 minutes for it, then answers 409 instead of streaming.