New in version 2020.2.0.

salt-sapi is a program distributed together with salt-sproxy, to ease the usage of the Salt API by providing two additional clients: sproxy and sproxy_async.

The usage is the exact same as the native salt-api entry point, just enhanced with the mentioned clients for the /run URI.

See Using the Salt REST API or for more details and usage examples.


At the time being, salt-sapi is simply available as a Python program entry point, without providing the system service files. That said, in order for you to use the salt-sapi clients, you wlll need to provide a service file or edit the one you might have for salt-api already by configuring the path to salt-sapi (run $ which salt-sapi to find the installation path), e.g., ExecStart=/usr/local/bin/salt-sapi.

Example - start salt-sapi in debug mode:

$ salt-sapi -l debug

See the complete list of options by executing salt-sapi --help:

$ salt-sapi --help
Usage: salt-sapi [options]
salt-sapi is an enhanced Salt API system that provides additional sproxy and
sproxy_async clients, to simplify the usage of salt-sproxy through the Salt

  --version             show program's version number and exit
  -V, --versions-report
                        Show program's dependencies version number and exit.
  -h, --help            show this help message and exit
  -c CONFIG_DIR, --config-dir=CONFIG_DIR
                        Pass in an alternative configuration directory.
                        Default: '/etc/salt'.
  -d, --daemon          Run the salt-sapi as a daemon.
  --pid-file=PIDFILE    Specify the location of the pidfile. Default:

  Logging Options:
    Logging options which override any settings defined on the
    configuration files.

    -l LOG_LEVEL, --log-level=LOG_LEVEL
                        Console logging log level. One of 'all', 'garbage',
                        'trace', 'debug', 'profile', 'info', 'warning',
                        'error', 'critical', 'quiet'. Default: 'warning'.
                        Log file path. Default: '/var/log/salt/api'.
                        Logfile logging log level. One of 'all', 'garbage',
                        'trace', 'debug', 'profile', 'info', 'warning',
                        'error', 'critical', 'quiet'. Default: 'warning'.

You can find additional help about salt-sapi issuing "man salt-sapi" or on and