2012-11-16 18:18:22 +00:00
|
|
|
.. _netapi-introduction:
|
|
|
|
|
2012-11-16 17:41:06 +00:00
|
|
|
==============================
|
|
|
|
Introduction to netapi modules
|
|
|
|
==============================
|
|
|
|
|
2014-06-19 02:16:20 +00:00
|
|
|
netapi modules provide API-centric access to Salt. Usually externally-facing
|
|
|
|
services such as REST or WebSockets, XMPP, XMLRPC, etc.
|
2013-03-20 15:36:59 +00:00
|
|
|
|
2014-06-19 02:16:20 +00:00
|
|
|
In general netapi modules bind to a port and start a service. They are
|
|
|
|
purposefully open-ended. A single module can be configured to run as well as
|
|
|
|
multiple modules simultaneously.
|
2012-11-16 17:41:06 +00:00
|
|
|
|
2014-06-19 02:16:20 +00:00
|
|
|
netapi modules are enabled by adding configuration to your Salt Master config
|
|
|
|
file and then starting the :command:`salt-api` daemon. Check the docs for each
|
|
|
|
module to see external requirements and configuration settings.
|
2013-03-20 15:36:59 +00:00
|
|
|
|
2014-06-19 02:16:20 +00:00
|
|
|
Communication with Salt and Salt satellite projects is done using Salt's own
|
|
|
|
:ref:`Python API <python-api>`. A list of available client interfaces is below.
|
|
|
|
|
|
|
|
.. admonition:: salt-api
|
|
|
|
|
|
|
|
Prior to Salt's Helium release, netapi modules lived in the separate sister
|
|
|
|
projected ``salt-api``. That project has been merged into the main Salt
|
|
|
|
project.
|
2012-11-16 17:41:06 +00:00
|
|
|
|
|
|
|
Client interfaces
|
|
|
|
=================
|
|
|
|
|
2014-06-19 02:16:20 +00:00
|
|
|
Salt's client interfaces expose executing functions by crafting a dictionary of
|
|
|
|
values that are mapped to function arguments. This allows calling functions
|
|
|
|
simply by creating a data structure. (And this is exactly how much of Salt's
|
|
|
|
own internals work!)
|
|
|
|
|
2014-06-19 02:54:47 +00:00
|
|
|
.. autoclass:: salt.netapi.APIClient
|
2014-01-28 18:21:00 +00:00
|
|
|
:members: local, local_async, local_batch, runner, wheel
|