splunk-sdk-python icon indicating copy to clipboard operation
splunk-sdk-python copied to clipboard

Endpoint in client for changing port(s) (server/settings)

Open parhamfh opened this issue 14 years ago • 5 comments

It is possible to change the port of Splunk via the rest endpoint. if you hit the http://docs.splunk.com/Documentation/Splunk/4.3.3/RESTAPI/RESTsystem#POST_server.2Fsettings.2F.7Bname.7D endpoint. It would be really nice to be able to do this since the current only way of doing it in my framework is by executing the binary.

Example: ~> curl -k -u admin:changeme https://localhost:8089/services/server/settings/settings -d httpport=990

parhamfh avatar Jul 20 '12 15:07 parhamfh

@parhamfh thank you - we will work on adding this in.

In the meantime, you can easily do this using something along the following lines:

service = client.connect(...);
service.post("/services/server/settings/settings", httpport=990)

itay avatar Jul 24 '12 04:07 itay

Thank you, @itay !

I basically did this

PATH_SERVER_SETTINGS = 'server/settings/settings/'
self._server_settings_endpoint = Endpoint(self._service, self.PATH_SERVER_SETTINGS)

as a temporary work around and I use it by using Endpoint class' post() function.

parhamfh avatar Aug 07 '12 11:08 parhamfh

Glad to hear it worked. We'll try and add support soon.

itay avatar Aug 07 '12 17:08 itay

Is there a JIRA for this?

parhamfh avatar Oct 27 '12 04:10 parhamfh

DVPL-1184

madhadron avatar Oct 30 '12 16:10 madhadron