Developing Dashboards, Views, and Apps for Splunk Web

 


Legacy methods

This documentation does not apply to the most recent version of Splunk. Click here for the latest version.

Legacy methods

/services/invokeapi/legacy_method_name

Provides access to legacy invokeAPI method calls.


GET

Calls the invokeAPI method, as defined in legacy_method_name.


The invokeAPI method calls originally used XML as the input parameter. In order map XML into flat querystring arguments, the following translation is used:


{{   * <key>foo</key> ==> key=foo


So, for example:


<call name="getUserInfo">
	<params>
		<key1>foo</key1>
		<key2 attr1="bar">baz</key2>
		<key3>
			<key4>boo</key4>
		</key3>
	</params>
</call>

is called by converting the XML node and attribute names into serialized strings:


/services/invokeapi/getUserInfo?key1=foo&key2=baz&key2@attr1=bar&key3.key4=boo



Query Arguments

<legacy_arg>

   The key name corresponds to the XML parameter, as defined by the XML structure. The value passed is the value assigned to the key name.


Response Status

200 - Method executed successfully

401 - Login credentials failed

500 - There was an error; see body contents for messages

Response Body

// The return content is arbitrary XML returned by each method.
// sample response to /services/invokeapi/getUserInfo?userId=1
<user>
  <id>1</id>
  <name>admin</name>
  <password>********</password>
  <realName>Administrator</realName>
  <userType>
    <role>Admin</role>
  </userType>
</user>

POST

Identical to GET, except that arguments are passed via form arguments.

This documentation applies to the following versions of Splunk: 3.2 , 3.2.1 , 3.2.2 , 3.2.3 , 3.2.4 , 3.2.5 , 3.2.6 View the Article History for its revisions.


You must be logged into splunk.com in order to post comments. Log in now.

Was this documentation topic helpful?

If you'd like to hear back from us, please provide your email address:

We'd love to hear what you think about this topic or the documentation as a whole. Feedback you enter here will be delivered to the documentation team.

Feedback submitted, thanks!