Developing Dashboards, Views, and Apps for Splunk Web

 


Properties

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

Properties

/services/properties

Provides access to the configuration values


GET

Returns an Atom feed of top level configuration files


Response Status

200 - OK

Response Body

// sample response to /services/properties
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:s="http://dev.splunk.com/ns/rest">
    <title>properties</title>
    <id>https://localhost:8089/services/properties</id>
    <updated>2008-01-29T11:40:58-0800</updated>
    <generator version="31758"/>
    <author>
        <name>Splunk</name>
    </author>
    <entry>
        <title>alert_actions</title>
        <id>https://localhost:8089/services/properties/alert_actions</id>
        <updated>2008-01-29T11:40:58-0800</updated>
        <link href="https://localhost:8089/services/properties/alert_actions" rel="alternate"/>
    </entry>
    <entry>
        <title>api</title>
        <id>https://localhost:8089/services/properties/api</id>
        <updated>2008-01-29T11:40:58-0800</updated>
        <link href="https://localhost:8089/services/properties/api" rel="alternate"/>
    </entry>
</feed>

/services/properties/file_name

Provides access to the configuration values for a specific file


GET

Returns an Atom feed of stanzas contained in file_name


Response Status

200 - OK

Response Body

// sample response to /services/properties/alert_actions
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:s="http://dev.splunk.com/ns/rest">
    <title>alert_actions</title>
    <id>https://localhost:8089/services/properties/alert_actions</id>
    <updated>2008-01-29T11:43:21-0800</updated>
    <generator version="31758"/>
    <author>
        <name>Splunk</name>
    </author>
    <entry>
        <title>default</title>
        <id>https://localhost:8089/services/properties/alert_actions/default</id>
        <updated>2008-01-29T11:43:21-0800</updated>
        <link href="https://localhost:8089/services/properties/alert_actions/default" rel="alternate"/>
    </entry>
    <entry>
        <title>email</title>
        <id>https://localhost:8089/services/properties/alert_actions/email</id>
        <updated>2008-01-29T11:43:21-0800</updated>
        <link href="https://localhost:8089/services/properties/alert_actions/email" rel="alternate"/>
    </entry>
    <entry>
        <title>rss</title>
        <id>https://localhost:8089/services/properties/alert_actions/rss</id>
        <updated>2008-01-29T11:43:21-0800</updated>
        <link href="https://localhost:8089/services/properties/alert_actions/rss" rel="alternate"/>
    </entry>
</feed>

POST

Creates a new stanza within file_name


Form Arguments

__stanza - The name of the stanza to create

Response Status

201 - Stanza was successfully created; will be followed by header Location: /services/properties/[stanza_name]

303 - Stanza already exists; will be followed by header Location: /services/properties/[stanza_name]

400 - Form arguments were invalid

Response Body

[no response body, unless error occurs]


/services/properties/file_name/stanza_name

Provides access to the configuration values for a stanza within a specific file


GET

Returns an Atom feed of key/value pairs contained in the stanza


Response Status

200 - OK

404 - Stanza was not found in file_name

Response Body

// sample response to /services/properties/alert_actions/email
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:s="http://dev.splunk.com/ns/rest">
    <title>email</title>
    <id>https://localhost:8089/services/properties/alert_actions/email</id>
    <updated>2008-01-29T11:55:24-0800</updated>
    <generator version="31758"/>
    <author>
        <name>Splunk</name>
    </author>
    <entry>
        <title>format</title>
        <id>https://localhost:8089/services/properties/alert_actions/email/format</id>
        <updated>2008-01-29T11:55:24-0800</updated>
        <link href="https://localhost:8089/services/properties/alert_actions/email/format" rel="alternate"/>
        <content type="text">csv</content>
    </entry>
    <entry>
        <title>from</title>
        <id>https://localhost:8089/services/properties/alert_actions/email/from</id>
        <updated>2008-01-29T11:55:24-0800</updated>
        <link href="https://localhost:8089/services/properties/alert_actions/email/from" rel="alternate"/>
        <content type="text">splunk</content>
    </entry>
    <entry>
        <title>inline</title>
        <id>https://localhost:8089/services/properties/alert_actions/email/inline</id>
        <updated>2008-01-29T11:55:24-0800</updated>
        <link href="https://localhost:8089/services/properties/alert_actions/email/inline" rel="alternate"/>
        <content type="text">false</content>
    </entry>
</feed>

POST

Adds or updates key/value pairs in the current stanza. One or more key/value pairs may be passed at one time to this endpoint.


Form Arguments

<key_name> - The argument name is the key to update; the value is the value to be set

Response Status

200 - Key value was successfully added/updated

400 - Form request was badly formed

404 - The stanza was not found

409 - One or more of the input values failed validation

Response Body

[upon successful write (HTTP 200), the response will be identical to the GET response; non-200 response will be standard message format]



PUT

Adds or overwrites the entire stanza block. If the stanza doesn't already exist, it will be created. The PUT method is useful for adding inline comments.


Request

<raw_payload> - The raw text of the stanza, excluding the stanza header declaration

Response Status

200 - Stanza was updated

201 - Stanza was created; will be followed by header Location: /services/properties/[stanza_name]. This is redundant, but follows spec.

404 - The file_name was not found

Response Body

[upon successful write (HTTP 20x), the response will be identical to the GET response; non-200 response will be standard message format]


/services/properties/file_name/stanza_name/key_name

Provides access to individual key/value within a stanza


GET

Returns the value of the key in plain text.


Response Status

200 - OK

404 - Key/stanza/file was not found

Response Body

// sample response to /services/properties/alert_actions/email/format
csv
 


POST

Updates an existing key value


Form Arguments

value - The argument name is the key to update; the value is the value to be set

Response Status

200 - Key value was successfully added/updated

400 - Form request was badly formed

404 - The stanza was not found

409 - The input value failed validation

Response Body

[upon successful write (HTTP 200), the response will be identical to the GET response; non-200 response will be standard message format]



PUT

Adds a new key to the stanza, or updates an existing key


Request

<raw_payload> - The raw value of the key

Response Status

200 - Key was updated

201 - Key was created

404 - The file_name or stanza_name was not found

409 - The value failed validation

Response Body

[upon successful write (HTTP 20x), the response will be identical to the GET response; non-200 response will be standard message format]

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!