Configures a NetSapiens apt repository version on one server, then runs apt update so its packages can be installed.Requires Super User scope.The server writes the apt source list and installs the repository's signing key. Adding a version that is already configured is not an error: the apt update still runs. Find the versions you can add with GET /apt/repos/{hostname}.The response streams apt update output as plain text. A failed apt run still answers 200: read the last line. Any web server restart a package would do during the run waits until the response has finished.
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/json
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.
Executing command: sudo apt update
Hit:1 https://aptng.example.com/aptng/netsapiens/v46.1 noble InRelease
Reading package lists...
Building dependency tree...
All packages are up to date.
Command executed successfully with exit code: 0