MCPcopy Create free account
hub / github.com/saltstack/salt / get

Method get

salt/netapi/rest_tornado/saltnado.py:830–866  ·  view source on GitHub ↗

An endpoint to determine salt-api capabilities .. http:get:: / :reqheader Accept: |req_accept| :status 200: |200| :status 401: |401| :status 406: |406| **Example request:** .. code-block:: bash curl -i

(self)

Source from the content-addressed store, hash-verified

828 """
829
830 def get(self): # pylint: disable=arguments-differ
831 """
832 An endpoint to determine salt-api capabilities
833
834 .. http:get:: /
835
836 :reqheader Accept: |req_accept|
837
838 :status 200: |200|
839 :status 401: |401|
840 :status 406: |406|
841
842 **Example request:**
843
844 .. code-block:: bash
845
846 curl -i localhost:8000
847
848 .. code-block:: text
849
850 GET / HTTP/1.1
851 Host: localhost:8000
852 Accept: application/json
853
854 **Example response:**
855
856 .. code-block:: text
857
858 HTTP/1.1 200 OK
859 Content-Type: application/json
860 Content-Legnth: 83
861
862 {"clients": ["local", "local_async", "runner", "runner_async"], "return": "Welcome"}
863 """
864 ret = {"clients": list(self.saltclients.keys()), "return": "Welcome"}
865 self.write(self.serialize(ret))
866 self.finish()
867
868 @tornado.gen.coroutine
869 def post(self): # pylint: disable=arguments-differ

Callers 15

sum_permissionsFunction · 0.45
_authorize_sshMethod · 0.45
runMethod · 0.45
__virtual__Function · 0.45
read_bodyFunction · 0.45
get_jsonFunction · 0.45
saltenvironFunction · 0.45
get_optsFunction · 0.45
startFunction · 0.45
process_minion_updateMethod · 0.45
_verify_clientMethod · 0.45

Calls 4

listFunction · 0.50
keysMethod · 0.45
writeMethod · 0.45
serializeMethod · 0.45

Tested by

no test coverage detected