Splunk® Enterprise

REST API Reference Manual

Download manual as PDF

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

Search endpoint descriptions

Manage search-related resources:

  • Alerts triggered by searches.
  • Python search command information.
  • Saved searches.
  • Search results.
  • Scheduled view objects.


  • Note: Username and password authentication is required for most endpoints and REST operations. Additional capability or role-based authorization may also be required, particularly for POST or DELETE operations.

alerts/fired_alerts

https://<host>:<mPort>/services/alerts/fired_alerts

Description

Get all fired alerts.

Method summary

Method Description Formats
GET Get a summary view of all fired alerts. XML, JSON

GET alerts/fired_alerts method detail

Example

Request parameters

Pagination and filtering parameters can be used with this method.

Response data keys
Name Description
triggered_alert_count the number of time this alert is triggered.

[ Top ]


alerts/fired_alerts/{name}

https://<host>:<mPort>/services/alerts/fired_alerts/{name}

Description

Delete or view {name} alert.

Method summary

Method Description Formats
DELETE Delete the record of this triggered alert. XML, JSON
GET Get a list of all unexpired triggered or fired instances of this alert. XML, JSON

DELETE alerts/fired_alerts/{name} method detail

Example

Request parameters

None

Response data keys

None


GET alerts/fired_alerts/{name} method detail

Example

Request parameters

None

Response data keys
Name Description
actions Any additional alert actions triggered by this alert.
alert_type Indicates if the alert was historical or real-time.
digest_mode
expiration_time_rendered
savedsearch_name Name of the saved search that triggered the alert.
severity Indicates the severity level of an alert.

Severity level ranges from Info, Low, Medium, High, and Critical. Default is Medium.

Severity levels are informational in purpose and have no additional functionality.

sid The search ID of the search that triggered the alert.
trigger_time The time the alert was triggered.
trigger_time_rendered
triggered_alerts
Application usage

Specify - for {name} to return all fired alerts.

[ Top ]


data/commands

https://<host>:<mPort>/services/data/commands

Description

Access Python search commands.

Method summary

Method Description Formats
GET List all python search commands. XML, JSON

GET data/commands method detail

Example

Request parameters

Pagination and filtering parameters can be used with this method.

Response data keys
Name Description
changes_colorder Indicates whether the script output should be used to change the column ordering of the fields.
disabled Indicates if the command is disabled.
enableheader Indicate whether or not your script is expecting header information or not.


Currently, the only thing in the header information is an auth token. If set to true the command expects as input a head section + '\ ' then the csv input.

Note: Should be set to true if you use splunk.Intersplunk

filename Name of script file for command.

<stanza-name>.pl for perl.

<stanza-name>.py for python.

generates_timeorder If generating = false and streaming = true, indicates if the command changes the order of events w/respect to time.
generating Indicates if the command generates new events.
maxinputs Maximum number of events that can be passed to the command for each invocation. This limit cannot exceed the value of maxresultrows in limits.conf.

0 indicates no limit. Defaults to 50000.

outputheader If true, the output of script should be a header section + blank line + csv ouput.

If false, script output should be pure csv only.

passauth If true, passes an authentication token on the start of input.
required_fields A list of fields that this command may use. Informs previous commands that they should retain/extract these fields if possible. No error is generated if a field specified is missing.

Defaults to '*'.

requires_preop Indicates whether the command sequence specified by the streaming_preop key is required for proper execution or is it an optimization only.

Default is false (stremaing_preop not required).

retainsevents Indicates whether the command retains events (the way the sort/dedup/cluster commands do) or whether the command transforms them (the way the stats command does).
streaming Indicates whether the command is streamable.
supports_getinfo Indicates whether the command supports dynamic probing for settings (first argument invoked == __GETINFO__ or __EXECUTE__).
supports_rawargs Indicates whether the command supports raw arguments being passed to it or if it uses parsed arguments (where quotes are stripped).
type Specifies the type of command. The only valid value for this attribute is python.

[ Top ]


data/commands/{name}

https://<host>:<mPort>/services/data/commands/{name}

Description

Get information about the {name} python search command.

Method summary

Method Description Formats
GET Get information about the {name} python search command. XML, JSON

GET data/commands/{name} method detail

Example

Request parameters

None

Response data keys
Name Description
changes_colorder Indicates whether the script output should be used to change the column ordering of the fields.
disabled Indicates if the command is disabled.
enableheader Indicate whether or not your script is expecting header information or not.


Currently, the only thing in the header information is an auth token. If set to true the command expects as input a head section + '\ ' then the csv input.

Note: Should be set to true if you use splunk.Intersplunk

filename Name of script file for command.

<stanza-name>.pl for perl.

<stanza-name>.py for python.

generates_timeorder If generating = false and streaming = true, indicates if the command changes the order of events w/respect to time.
generating Indicates if the command generates new events.
maxinputs Maximum number of events that can be passed to the command for each invocation. This limit cannot exceed the value of maxresultrows in limits.conf.

0 indicates no limit. Defaults to 50000.

outputheader If true, the output of script should be a header section + blank line + csv ouput.

If false, script output should be pure csv only.

passauth If true, passes an authentication token on the start of input.
required_fields A list of fields that this command may use. Informs previous commands that they should retain/extract these fields if possible. No error is generated if a field specified is missing.

Defaults to '*'.

requires_preop Indicates whether the command sequence specified by the streaming_preop key is required for proper execution or is it an optimization only.

Default is false (stremaing_preop not required).

retainsevents Indicates whether the command retains events (the way the sort/dedup/cluster commands do) or whether the command transforms them (the way the stats command does).
streaming Indicates whether the command is streamable.
supports_getinfo Indicates whether the command supports dynamic probing for settings (first argument invoked == __GETINFO__ or __EXECUTE__).
supports_rawargs Indicates whether the command supports raw arguments being passed to it or if it uses parsed arguments (where quotes are stripped).
type Specifies the type of command.

The only valid value for this attribute is python.

[ Top ]


saved/searches

https://<host>:<mPort>/services/saved/searches

Description

Get saved search configurations.

Method summary

Method Description Formats
GET Get information on all saved searches. XML, JSON
POST Creates a saved search. XML, JSON

GET saved/searches method detail

Example

Request parameters
Name Type Default Description
earliest_time String For scheduled searches display all the scheduled times starting from this time (not just the next run time)
latest_time String For scheduled searches display all the scheduled times until this time (not just the next run time)
listDefaultActionArgs Boolean Indicates whether to list default actions.

Pagination and filtering parameters can be used with this method.

Response data keys
Name Description
action.email Indicates the state of the email action.
action.email.sendresults Indicates whether search results are attached to the email.
action.email.to List of addresses for email recipients.
action.populate_lookup Indicates the state of the populate lookup action.
action.rss Indicates the state of the RSS action.
action.script Indicates the state of the script action.
action.summary_index Indicates the state of the summary index action.
alert.digest_mode Indicates if Splunk Enterprise applies the alert actions to the entire result set or on each individual result.
alert.expires Sets the period of time to show the alert in the dashboard. Defaults to 24h.

Uses [number][time-unit] to specify a time. For example: 60 = 60 seconds, 1m = 1 minute, 1h = 60 minutes = 1 hour.

alert.severity The alert severity level.

Valid values are:

1 DEBUG
2 INFO
3 WARN
4 ERROR
5 SEVERE
6 FATAL
alert.suppress Indicates whether alert suppression is enabled for this schedules search.
alert.suppress.period Specifies the suppresion period. Only valid if alert.supress is enabled.

Uses [number][time-unit] to specify a time. For example: 60 = 60 seconds, 1m = 1 minute, 1h = 60 minutes = 1 hour.

alert.track Specifies whether to track the actions triggered by this scheduled search.

auto - determine whether to track or not based on the tracking setting of each action, do not track scheduled searches that always trigger actions.

true - force alert tracking.

false - disable alert tracking for this search.

alert_comparator One of the following strings: greater than, less than, equal to, rises by, drops by, rises by perc, drops by perc
alert_condition A conditional search that is evaluated against the results of the saved search. Defaults to an empty string.

Alerts are triggered if the specified search yields a non-empty search result list.

Note: If you specify an alert_condition, do not set counttype, relation, or quantity.

alert_threshold Valid values are: Integer[%]

Specifies the value to compare (see alert_comparator) before triggering the alert actions. If expressed as a percentage, indicates value to use when alert_comparator is set to "rises by perc" or "drops by perc."

alert_type What to base the alert on, overriden by alert_condition if it is specified.

Valid values are: always, custom, number of events, number of hosts, number of sources

cron_schedule The cron schedule to execute this search.

For more information, refer to the description of this parameter in the POST endpoint.

description Description of the saved search.
disabled Indicates if this saved search is disabled.
dispatch.buckets The maximum nuber of timeline buckets.
dispatch.earliest_time A time string that specifies the earliest time for this search. Can be a relative or absolute time.

If this value is an absolute time, use the dispatch.time_format to format the value.

dispatch.latest_time A time string that specifies the latest time for the saved search. Can be a relative or absolute time.

If this value is an absolute time, use the dispatch.time_format to format the value.

dispatch.lookups Indicates if lookups are enabled for this search.
dispatch.max_count The maximum number of results before finalizing the search.
dispatch.max_time Indicates the maximum amount of time (in seconds) before finalizing the search.
dispatch.reduce_freq Specifies how frequently Splunk Enterprise should run the MapReduce reduce phase on accumulated map values.
dispatch.spawn_process Specifies whether Splunk Enterprise spawns a new search process when this saved search is executed.

Searches against indexes must run in a separate process.

dispatch.time_format Time format string that defines the time format that Splunk Enterprise uses to specify the earliest and latest time.
dispatch.ttl Indicates the time to live (in seconds) for the artifacts of the scheduled search, if no actions are triggered.

If an action is triggered Splunk Enterprise changes the ttl to that action ttl. If multiple actions are triggered, Splunk Enterprise applies the maximum ttl to the artifacts. To set the action ttl, refer to alert_actions.conf.spec.

If the integer is followed by the letter 'p' Splunk Enterprise interprets the ttl as a multiple of the scheduled search period.

displayview Defines the default UI view name (not label) in which to load the results. Accessibility is subject to the user having sufficient permissions.
earliest_time For scheduled searches display all the scheduled times starting from this time (not just the next run time).
is_scheduled Indicates if this search is to be run on a schedule
is_visible Indicates if this saved search appears in the visible saved search list.
latest_time For scheduled searches display all the scheduled times until this time (not just the next run time).
listDefaultActionArgs List default values of actions.*, even though some of the actions may not be specified in the saved search.
max_concurrent The maximum number of concurrent instances of this search the scheduler is allowed to run.
next_scheduled_time Time when the scheduler runs this search again.
qualifiedSearch The exact search string that the scheduler would run.
realtime_schedule Controls the way the scheduler computes the next execution time of a scheduled search. If this value is set to 1, the scheduler bases its determination of the next scheduled search execution time on the current time.

If this value is set to 0, the scheduler bases its determination of the next scheduled search on the last search execution time. This is called continuous scheduling. If set to 0, the scheduler never skips scheduled execution periods. However, the execution of the saved search might fall behind depending on the scheduler load. Use continuous scheduling whenever you enable the summary index option.

If set to 1, the scheduler might skip some execution periods to make sure that the scheduler is executing the searches running over the most recent time range.

The scheduler tries to execute searches that have realtime_schedule set to 1 before it executes searches that have continuous scheduling (realtime_schedule = 0).

request.ui_dispatch_app A field used by Splunk Web to denote the app this search should be dispatched in.
request.ui_dispatch_view Specifies a field used by Splunk Web to denote the view this search should be displayed in.
restart_on_searchpeer_add Specifies whether to restart a real-time search managed by the scheduler when a search peer becomes available for this saved search.

Note: The peer can be a newly added peer or a peer down and now available.

run_on_startup Indicates whether this search runs when Splunk Enterprise starts. If it does not run on startup, it runs at the next scheduled time.

Splunk Enterprise recommends that you set run_on_startup to true for scheduled searches that populate lookup tables.

search Search expression to filter the response. The response matches field values against the search expression. For example:

search=foo matches any object that has "foo" as a substring in a field. search=field_name%3Dfield_value restricts the match to a single field. URI-encoding is required in this example.

vsid The viewstate id associated with the UI view listed in 'displayview'.

Matches to a stanza in viewstates.conf.


POST saved/searches method detail

Example

Request parameters
Name Type Default Description
action.* String Wildcard argument for any action.

Use this parameter to specify specific action arguments. For example, to specify the email recipients for action.email.to.

action.email Boolean 0 The state of the email action. Read-only attribute. Value ignored on POST. Use actions to specify a list of enabled actions.
action.email.auth_password String The password to use when authenticating with the SMTP server. Normally this value is set when editing the email settings, however you can set a clear text password here and it is encrypted on the next Splunk Enterprise restart.

Defaults to empty string.

action.email.auth_username String The username to use when authenticating with the SMTP server. If this is empty string, no authentication is attempted. Defaults to empty string.

NOTE: Your SMTP server might reject unauthenticated emails.

action.email.bcc String BCC email address to use if action.email is enabled.
action.email.cc String CC email address to use if action.email is enabled.
action.email.command String The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.email.format Enum Valid values: (plain | html | raw | csv)

Specify the format of text in the email. This value also applies to any attachments.

action.email.from String Email address from which the email action originates.

Defaults to splunk@$LOCALHOST or whatever value is set in alert_actions.conf.

action.email.hostname String Sets the hostname used in the web link (url) sent in email actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

When this value is a simple hostname, the protocol and port which are configured within splunk are used to construct the base of the url.

When this value begins with 'http://', it is used verbatim. NOTE: This means the correct port must be specified if it is not the default port for http or https. This is useful in cases when the Splunk Enterprise server is not aware of how to construct an externally referencable url, such as SSO environments, other proxies, or when the Splunk Enterprise server hostname is not generally resolvable.

Defaults to current hostname provided by the operating system, or if that fails "localhost". When set to empty, default behavior is used.

action.email.inline Boolean Indicates whether the search results are contained in the body of the email.

Results can be either inline or attached to an email. See action.email.sendresults.

action.email.mailserver String Set the address of the MTA server to be used to send the emails.

Defaults to <LOCALHOST> (or whatever is set in alert_actions.conf).

action.email.maxresults Number Sets the global maximum number of search results to send when email.action is enabled.

Defaults to 100.

action.email.maxtime Number Valid values are Integer[m|s|h|d].

Specifies the maximum amount of time the execution of an email action takes before the action is aborted. Defaults to 5m.

action.email.pdfview String The name of the view to deliver if sendpdf is enabled
action.email.preprocess_results String Search string to preprocess results before emailing them. Defaults to empty string (no preprocessing).

Usually the preprocessing consists of filtering out unwanted internal fields.

action.email.reportCIDFontList Enum Space-separated list. Specifies the set (and load order) of CID fonts for handling Simplified Chinese(gb), Traditional Chinese(cns), Japanese(jp), and Korean(kor) in Integrated PDF Rendering.

If multiple fonts provide a glyph for a given character code, the glyph from the first font specified in the list is used.

To skip loading any CID fonts, specify the empty string.

Defaults to "gb cns jp kor"

action.email.reportIncludeSplunkLogo Boolean Indicates whether to include the Splunk logo with the report.
action.email.reportPaperOrientation Enum Valid values: (portrait | landscape)

Specifies the paper orientation: portrait or landscape. Defaults to portrait.

action.email.reportPaperSize Enum Valid values: (letter | legal | ledger | a2 | a3 | a4 | a5)

Specifies the paper size for PDFs. Defaults to letter.

action.email.reportServerEnabled Boolean Not supported.
action.email.reportServerURL String Not supported.

For a default locally installed report server, the URL is http://localhost:8091/

action.email.sendpdf Boolean Indicates whether to create and send the results as a PDF. Defaults to false.
action.email.sendresults Boolean Indicates whether to attach the search results in the email.

Results can be either attached or inline. See action.email.inline.

action.email.subject String Specifies an alternate email subject.

Defaults to SplunkAlert-<savedsearchname>.

action.email.to String A comma or semicolon separated list of recipient email addresses. Required if this search is scheduled and the email alert action is enabled.
action.email.track_alert Boolean Indicates whether the execution of this action signifies a trackable alert.
action.email.ttl Number Valid values are Integer[p].

Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows <Integer>, int is the number of scheduled periods. Defaults to 86400 (24 hours).

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

action.email.use_ssl Boolean Indicates whether to use SSL when communicating with the SMTP server.

Defaults to false.

action.email.use_tls Boolean Indicates whether to use TLS (transport layer security) when communicating with the SMTP server (starttls).

Defaults to false.

action.email.width_sort_columns Boolean Indicates whether columns should be sorted from least wide to most wide, left to right.

Only valid if format=text.

action.populate_lookup Boolean 0 The state of the populate lookup action. Read-only attribute. Value ignored on POST. Use actions to specify a list of enabled actions.
action.populate_lookup.command String The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.populate_lookup.dest String Lookup name of path of the lookup to populate
action.populate_lookup.hostname String Sets the hostname used in the web link (url) sent in alert actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

See action.email.hostname for details.

action.populate_lookup.maxresults Number Sets the maximum number of search results sent using alerts. Defaults to 100.
action.populate_lookup.maxtime Number Valid values are: Integer[m|s|h|d]

Sets the maximum amount of time the execution of an action takes before the action is aborted. Defaults to 5m.

action.populate_lookup.track_alert Boolean Indicates whether the execution of this action signifies a trackable alert.
action.populate_lookup.ttl Number Valid values are Integer[p]

Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows Integer, then this specifies the number of scheduled periods. Defaults to 10p.

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

action.rss Boolean 0 The state of the rss action. Read-only attribute. Value ignored on POST. Use actions to specify a list of enabled actions.
action.rss.command String The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.rss.hostname String Sets the hostname used in the web link (url) sent in alert actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

See action.email.hostname for details.

action.rss.maxresults Number Sets the maximum number of search results sent using alerts. Defaults to 100.
action.rss.maxtime Number Valid values are Integer[m|s|h|d].

Sets the maximum amount of time the execution of an action takes before the action is aborted. Defaults to 1m.

action.rss.track_alert Boolean Indicates whether the execution of this action signifies a trackable alert.
action.rss.ttl Number Valid values are: Integer[p]

Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows Integer, specifies the number of scheduled periods. Defaults to 86400 (24 hours).

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

action.script Boolean 0 The state of the script action. Read-only attribute. Value ignored on POST. Use actions to specify a list of enabled actions.
action.script.command String The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.script.filename String File name of the script to call. Required if script action is enabled
action.script.hostname String Sets the hostname used in the web link (url) sent in alert actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

See action.email.hostname for details.

action.script.maxresults Number Sets the maximum number of search results sent using alerts. Defaults to 100.
action.script.maxtime Number Valid values are: Integer[m|s|h|d]

Sets the maximum amount of time the execution of an action takes before the action is aborted. Defaults to 5m.

action.script.track_alert Boolean Indicates whether the execution of this action signifies a trackable alert.
action.script.ttl Number Valid values are: Integer[p]

Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows Integer, specifies the number of scheduled periods. Defaults to 600 (10 minutes).

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

action.summary_index Boolean 0 The state of the summary index action. Read-only attribute. Value ignored on POST. Use actions to specify a list of enabled actions.

Defaults to 0

action.summary_index._name String Specifies the name of the summary index where the results of the scheduled search are saved.

Defaults to "summary."

action.summary_index.command String The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.summary_index.hostname String Sets the hostname used in the web link (url) sent in summary-index alert actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

See action.email.hostname for details.

action.summary_index.inline Boolean Determines whether to execute the summary indexing action as part of the scheduled search.

NOTE: This option is considered only if the summary index action is enabled and is always executed (in other words, if counttype = always).

Defaults to true

action.summary_index.maxresults Number Sets the maximum number of search results sent using alerts. Defaults to 100.
action.summary_index.maxtime Number Valid values are: Integer[m|s|h|d]

Sets the maximum amount of time the execution of an action takes before the action is aborted. Defaults to 5m.

action.summary_index.track_alert Boolean Indicates whether the execution of this action signifies a trackable alert.
action.summary_index.ttl Number Valid values are: Integer[p]

Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows Integer, specifies the number of scheduled periods. Defaults to 10p.

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

actions String A comma-separated list of actions to enable.

For example: rss,email

alert.digest_mode Boolean 1 Specifies whether Splunk Enterprise applies the alert actions to the entire result set or on each individual result.

Defaults to true.

alert.expires Number 24h Valid values: [number][time-unit]

Sets the period of time to show the alert in the dashboard. Defaults to 24h.

Use [number][time-unit] to specify a time. For example: 60 = 60 seconds, 1m = 1 minute, 1h = 60 minutes = 1 hour.

alert.severity Enum 3 Valid values: (1 | 2 | 3 | 4 | 5 | 6)

Sets the alert severity level.

Valid values are:

1 DEBUG 2 INFO 3 WARN 4 ERROR 5 SEVERE 6 FATAL

alert.suppress Boolean Indicates whether alert suppression is enabled for this scheduled search.
alert.suppress.fields String Comma delimited list of fields to use for suppression when doing per result alerting. Required if suppression is turned on and per result alerting is enabled.
alert.suppress.period Number Valid values: [number][time-unit]

Specifies the suppresion period. Only valid if alert.supress is enabled.

Use [number][time-unit] to specify a time. For example: 60 = 60 seconds, 1m = 1 minute, 1h = 60 minutes = 1 hour.

alert.track Enum auto Valid values: (true | false | auto)

Specifies whether to track the actions triggered by this scheduled search.

auto - determine whether to track or not based on the tracking setting of each action, do not track scheduled searches that always trigger actions.

true - force alert tracking.

false - disable alert tracking for this search.

alert_comparator String One of the following strings: greater than, less than, equal to, rises by, drops by, rises by perc, drops by perc

Used with alert_threshold to trigger alert actions.

alert_condition String Contains a conditional search that is evaluated against the results of the saved search. Defaults to an empty string.

Alerts are triggered if the specified search yields a non-empty search result list.

NOTE: If you specify an alert_condition, do not set counttype, relation, or quantity.

alert_threshold Number Valid values are: Integer[%]

Specifies the value to compare (see alert_comparator) before triggering the alert actions. If expressed as a percentage, indicates value to use when alert_comparator is set to "rises by perc" or "drops by perc."

alert_type String What to base the alert on, overriden by alert_condition if it is specified. Valid values are: always, custom, number of events, number of hosts, number of sources
args.* String Wildcard argument that accepts any saved search template argument, such as args.username=foobar when the search is search $username$.
auto_summarize Boolean 0 Indicates whether the scheduler should ensure that the data for this search is automatically summarized.
auto_summarize.command String summarize override=partial timespan=$auto_summarize.timespan$ max_summary_size=$auto_summarize.max_summary_size$ max_summary_ratio=$auto_summarize.max_summary_ratio$ max_disabled_buckets=$auto_summarize.max_disabled_buckets$ max_time=$auto_summarize.max_time$ [ $search$ ] A search template that constructs the auto summarization for this search.

Caution: Advanced feature. Do not change unless you understand the architecture of auto summarization of saved searches.

auto_summarize.cron_schedule String */10 * * * * Cron schedule that probes and generates the summaries for this saved search.

The default value corresponds to every ten minutes.

auto_summarize.dispatch.earliest_time String A time string that specifies the earliest time for summarizing this search. Can be a relative or absolute time.

If this value is an absolute time, use the dispatch.time_format to format the value.

auto_summarize.dispatch.latest_time String A time string that specifies the latest time for summarizing this saved search. Can be a relative or absolute time.

If this value is an absolute time, use the dispatch.time_format to format the value.

auto_summarize.dispatch.time_format String %FT%T.%Q%:z Defines the time format that Splunk Enterprise uses to specify the earliest and latest time.
auto_summarize.dispatch.ttl String 60 Valid values: Integer[p]

Indicates the time to live (in seconds) for the artifacts of the summarization of the scheduled search.

auto_summarize.max_disabled_buckets Number 2 The maximum number of buckets with the suspended summarization before the summarization search is completely stopped, and the summarization of the search is suspended for auto_summarize.suspend_period.
auto_summarize.max_summary_ratio Number 0.1 The maximum ratio of summary_size/bucket_size, which specifies when to stop summarization and deem it unhelpful for a bucket.

Note: The test is only performed if the summary size is larger than auto_summarize.max_summary_size.

auto_summarize.max_summary_size Number 52428800 The minimum summary size, in bytes, before testing whether the summarization is helpful.

The default value is equivalent to 5MB.

auto_summarize.max_time Number 3600 Maximum time (in seconds) that the summary search is allowed to run.

Note: This is an approximate time. The summary search stops at clean bucket boundaries.

auto_summarize.suspend_period String 24h Time specfier indicating when to suspend summarization of this search if the summarization is deemed unhelpful.
auto_summarize.timespan String The list of time ranges that each summarized chunk should span. This comprises the list of available granularity levels for which summaries would be available. Specify a comma delimited list of time specifiers.

For example a timechart over the last month whose granuality is at the day level should set this to 1d. If you need the same data summarized at the hour level for weekly charts, use: 1h,1d.

cron_schedule String Valid values: cron string

The cron schedule to execute this search. For example: */5 * * * * causes the search to execute every 5 minutes.

cron lets you use standard cron notation to define your scheduled search interval. In particular, cron can accept this type of notation: 00,20,40 * * * *, which runs the search every hour at hh:00, hh:20, hh:40. Along the same lines, a cron of 03,23,43 * * * * runs the search every hour at hh:03, hh:23, hh:43.

Splunk recommends that you schedule your searches so that they are staggered over time. This reduces system load. Running all of them every 20 minutes (*/20) means they would all launch at hh:00 (20, 40) and might slow your system every 20 minutes.

description String Human-readable description of this saved search. Defaults to empty string.
disabled Boolean 0 Indicates if the saved search is enabled.

Disabled saved searches are not visible in Splunk Web.

dispatch.* String Wildcard argument that accepts any dispatch related argument.
dispatch.buckets Number 0 The maximum number of timeline buckets.
dispatch.earliest_time String A time string that specifies the earliest time for this search. Can be a relative or absolute time.

If this value is an absolute time, use the dispatch.time_format to format the value.

dispatch.indexedRealtime Boolean Indicates whether to used indexed-realtime mode when doing real-time searches.
dispatch.latest_time String A time string that specifies the latest time for this saved search. Can be a relative or absolute time.

If this value is an absolute time, use the dispatch.time_format to format the value.

dispatch.lookups Boolean 1 Enables or disables the lookups for this search.
dispatch.max_count Number 500000 The maximum number of results before finalizing the search.
dispatch.max_time Number 0 Indicates the maximum amount of time (in seconds) before finalizing the search.
dispatch.reduce_freq Number 10 Specifies, in seconds, how frequently Splunk Enterprise should run the MapReduce reduce phase on accumulated map values.
dispatch.rt_backfill Boolean 0 Whether to back fill the real time window for this search. Parameter valid only if this is a real time search
dispatch.spawn_process Boolean 1 Specifies whether Splunk Enterprise spawns a new search process when this saved search is executed.

Searches against indexes must run in a separate process.

dispatch.time_format String %FT%T.%Q%:z A time format string that defines the time format that Splunk Enterprise uses to specify the earliest and latest time.
dispatch.ttl Number 2p Valid values: Integer[p]

Indicates the time to live (in seconds) for the artifacts of the scheduled search, if no actions are triggered.

If an action is triggered Splunk Enterprise changes the ttl to that action ttl. If multiple actions are triggered, Splunk Enterprise applies the maximum ttl to the artifacts. To set the action ttl, refer to alert_actions.conf.spec.

If the integer is followed by the letter 'p' Splunk Enterprise interprets the ttl as a multiple of the scheduled search period.

displayview String Defines the default UI view name (not label) in which to load the results. Accessibility is subject to the user having sufficient permissions.
is_scheduled Boolean Whether this search is to be run on a schedule
is_visible Boolean 1 Specifies whether this saved search should be listed in the visible saved search list.
max_concurrent Number 1 The maximum number of concurrent instances of this search the scheduler is allowed to run.
name
required
String A name for the search.
next_scheduled_time String Read-only attribute. Value ignored on POST. There are some old clients who still send this value
qualifiedSearch String Read-only attribute. Value ignored on POST. Splunk Enterprise computes this value during runtime.
realtime_schedule Boolean 1 Controls the way the scheduler computes the next execution time of a scheduled search. If this value is set to 1, the scheduler bases its determination of the next scheduled search execution time on the current time.

If this value is set to 0, the scheduler bases its determination of the next scheduled search on the last search execution time. This is called continuous scheduling. If set to 0, the scheduler never skips scheduled execution periods. However, the execution of the saved search might fall behind depending on the scheduler load. Use continuous scheduling whenever you enable the summary index option.

If set to 1, the scheduler might skip some execution periods to make sure that the scheduler is executing the searches running over the most recent time range.

The scheduler tries to execute searches that have realtime_schedule set to 1 before it executes searches that have continuous scheduling (realtime_schedule = 0).

request.ui_dispatch_app String Specifies a field used by Splunk Web to denote the app this search should be dispatched in.
request.ui_dispatch_view String Specifies a field used by Splunk Web to denote the view this search should be displayed in.
restart_on_searchpeer_add Boolean 1 Specifies whether to restart a real-time search managed by the scheduler when a search peer becomes available for this saved search.

NOTE: The peer can be a newly added peer or a peer down and now available.

run_on_startup Boolean 0 Indicates whether this search runs when Splunk Enterprise starts. If it does not run on startup, it runs at the next scheduled time.

Splunk recommends that you set run_on_startup to true for scheduled searches that populate lookup tables.

search
required
String The search to save.
vsid String Defines the viewstate id associated with the UI view listed in 'displayview'.

Must match up to a stanza in viewstates.conf.

Response data keys
Name Description
action.* * represents any custom action.
action.email Indicates the state of the email action.
action.email.auth_password The password to use when authenticating with the SMTP server. Normally this value is set when editing the email settings, however you can set a clear text password here and it is encrypted on the next Splunk Enterprise restart.

Defaults to empty string.

action.email.auth_username The username to use when authenticating with the SMTP server. If this is empty string, no authentication is attempted. Defaults to empty string.

Note: Your SMTP server might reject unauthenticated emails.

action.email.bcc BCC email address to use if action.email is enabled.
action.email.cc CC email address to use if action.email is enabled.
action.email.command The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.email.format Specify the format of text in the email. This value also applies to any attachments.<

Valid values: (plain | html | raw | csv)

action.email.from Email address from which the email action originates.

Defaults to splunk@$LOCALHOST or whatever value is set in alert_actions.conf.

action.email.hostname Sets the hostname used in the web link (url) sent in email actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

When this value is a simple hostname, the protocol and port which are configured within splunk are used to construct the base of the url.

When this value begins with 'http://', it is used verbatim. NOTE: This means the correct port must be specified if it is not the default port for http or https. This is useful in cases when the Splunk Enterprise server is not aware of how to construct an externally referencable url, such as SSO environments, other proxies, or when the Splunk Enterprise server hostname is not generally resolvable.

Defaults to current hostname provided by the operating system, or if that fails "localhost". When set to empty, default behavior is used.

action.email.inline Indicates whether the search results are contained in the body of the email.

Results can be either inline or attached to an email. See action.email.sendresults.

action.email.mailserver Set the address of the MTA server to be used to send the emails.

Defaults to <LOCALHOST> (or whatever is set in alert_actions.conf).

action.email.maxresults Sets the global maximum number of search results to send when email.action is enabled.
action.email.maxtime Specifies the maximum amount of time the execution of an email action takes before the action is aborted.
action.email.pdfview The name of the view to deliver if sendpdf is enabled
action.email.preprocess_results Search string to preprocess results before emailing them. Defaults to empty string (no preprocessing).

Usually the preprocessing consists of filtering out unwanted internal fields.

action.email.reportCIDFontList Space-separated list. Specifies the set (and load order) of CID fonts for handling Simplified Chinese(gb), Traditional Chinese(cns), Japanese(jp), and Korean(kor) in Integrated PDF Rendering.

If multiple fonts provide a glyph for a given character code, the glyph from the first font specified in the list is used.

To skip loading any CID fonts, specify the empty string.

Default value: "gb cns jp kor"

action.email.reportIncludeSplunkLogo Indicates whether to include the Splunk logo with the report.
action.email.reportPaperOrientation Specifies the paper orientation: portrait or landscape.
action.email.reportPaperSize Specifies the paper size for PDFs. Defaults to letter.

Valid values: (letter | legal | ledger | a2 | a3 | a4 | a5)

action.email.reportServerEnabled Not supported.
action.email.reportServerURL Not supported.
action.email.sendpdf Indicates whether to create and send the results as a PDF.
action.email.sendresults Indicates whether to attach the search results in the email.

Results can be either attached or inline. See action.email.inline.

action.email.subject Specifies an email subject.

Defaults to SplunkAlert-<savedsearchname>.

action.email.to List of recipient email addresses. Required if this search is scheduled and the email alert action is enabled.
action.email.track_alert Indicates whether the execution of this action signifies a trackable alert.
action.email.ttl Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows <Integer>, int is the number of scheduled periods. Defaults to 86400 (24 hours).

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

Valid values are Integer[p].

action.email.use_ssl Indicates whether to use SSL when communicating with the SMTP server.
action.email.use_tls Indicates whether to use TLS (transport layer security) when communicating with the SMTP server (starttls).
action.email.width_sort_columns Indicates whether columns should be sorted from least wide to most wide, left to right.

Only valid if format=text.

action.populate_lookup Indicates the state of the populate lookup action.
action.populate_lookup.command The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.populate_lookup.dest Lookup name of path of the lookup to populate.
action.populate_lookup.hostname Sets the hostname used in the web link (url) sent in alert actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

See action.email.hostname for details.

action.populate_lookup.maxresults The maximum number of search results sent using alerts.
action.populate_lookup.maxtime Sets the maximum amount of time the execution of an action takes before the action is aborted. Defaults to 5m.

Valid values are: Integer[m|s|h|d]

action.populate_lookup.track_alert Indicates whether the execution of this action signifies a trackable alert.
action.populate_lookup.ttl Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows Integer, then this specifies the number of scheduled periods. Defaults to 10p.

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

Valid values are Integer[p]

action.rss Indicates the state of the RSS action.
action.rss.command The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.rss.hostname Sets the hostname used in the web link (url) sent in alert actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

See action.email.hostname for details.

action.rss.maxresults Sets the maximum number of search results sent using alerts.
action.rss.maxtime Sets the maximum amount of time the execution of an action takes before the action is aborted.

Valid values are Integer[m |s |h |d].

action.rss.track_alert Indicates whether the execution of this action signifies a trackable alert.
action.rss.ttl Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows Integer, specifies the number of scheduled periods. Defaults to 86400 (24 hours).

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

Valid values are: Integer[p]

action.script Indicates the state of the script for this action.
action.script.command The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.script.filename File name of the script to call. Required if script action is enabled
action.script.hostname Sets the hostname used in the web link (url) sent in alert actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

See action.email.hostname for details.

action.script.maxresults Sets the maximum number of search results sent using alerts.
action.script.maxtime Sets the maximum amount of time the execution of an action takes before the action is aborted.
action.script.track_alert Indicates whether the execution of this action signifies a trackable alert.
action.script.ttl Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows Integer, specifies the number of scheduled periods. Defaults to 600 (10 minutes).

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

Valid values are: Integer[p]

action.summary_index Indicates the state of the summary index.
action.summary_index._name Specifies the name of the summary index where the results of the scheduled search are saved.

Defaults to "summary."

action.summary_index.command The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.summary_index.hostname Sets the hostname used in the web link (url) sent in alert actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

See action.email.hostname for details.

action.summary_index.inline Determines whether to execute the summary indexing action as part of the scheduled search.

Note: This option is considered only if the summary index action is enabled and is always executed (in other words, if counttype = always).

action.summary_index.maxresults Sets the maximum number of search results sent using alerts.
action.summary_index.maxtime Sets the maximum amount of time the execution of an action takes before the action is aborted. Defaults to 5m.

Valid values are: Integer[m|s|h|d]

action.summary_index.track_alert Indicates whether the execution of this action signifies a trackable alert.
action.summary_index.ttl Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows Integer, specifies the number of scheduled periods. Defaults to 10p.

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

Valid values are: Integer[p]

actions Actions triggerd by this alert.
alert.digest_mode Indicates if Splunk Enterprise applies the alert actions to the entire result set or on each individual result.
alert.expires Sets the period of time to show the alert in the dashboard. Defaults to 24h.

Use [number][time-unit] to specify a time. For example: 60 = 60 seconds, 1m = 1 minute, 1h = 60 minutes = 1 hour.

Valid values: [number][time-unit]

alert.severity Valid values: (1 | 2 | 3 | 4 | 5 | 6)

Sets the alert severity level.

Valid values are:

1 DEBUG
2 INFO
3 WARN
4 ERROR
5 SEVERE
6 FATAL
alert.suppress Indicates whether alert suppression is enabled for this schedules search.
alert.suppress.fields Fields to use for suppression when doing per result alerting. Required if suppression is turned on and per result alerting is enabled.
alert.suppress.period Specifies the suppresion period. Only valid if alert.supress is enabled.

Uses [number][time-unit] to specify a time. For example: 60 = 60 seconds, 1m = 1 minute, 1h = 60 minutes = 1 hour.

alert.track Specifies whether to track the actions triggered by this scheduled search.

auto - determine whether to track or not based on the tracking setting of each action, do not track scheduled searches that always trigger actions.

true - force alert tracking.

false - disable alert tracking for this search.

alert_comparator One of the following strings: greater than, less than, equal to, rises by, drops by, rises by perc, drops by perc
alert_condition A conditional search that is evaluated against the results of the saved search. Defaults to an empty string.

Alerts are triggered if the specified search yields a non-empty search result list.

Note: If you specify an alert_condition, do not set counttype, relation, or quantity.

alert_threshold Valid values are: Integer[%]

Specifies the value to compare (see alert_comparator) before triggering the alert actions. If expressed as a percentage, indicates value to use when alert_comparator is set to "rises by perc" or "drops by perc."

alert_type What to base the alert on, overriden by alert_condition if it is specified. Valid values are: always, custom, number of events, number of hosts, number of sources
args.* Wildcard argument that accepts any saved search template argument, such as args.username=foobar when the search is search $username$.
auto_summarize Indicates whether the scheduler should ensure that the data for this search is automatically summarized.
auto_summarize.command A search template that constructs the auto summarization for this search.

Caution: Advanced feature. Do not change unless you understand the architecture of auto summarization of saved searches.

auto_summarize.cron_schedule Cron schedule that probes and generates the summaries for this saved search.
auto_summarize.dispatch.earliest_time A time string that specifies the earliest time for summarizing this search. Can be a relative or absolute time.
auto_summarize.dispatch.latest_time A time string that specifies the latest time for this saved search. Can be a relative or absolute time.
auto_summarize.dispatch.time_format Time format used to specify the earliest and latest times.
auto_summarize.dispatch.ttl Indicates the time to live (in seconds) for the artifacts of the summarization of the scheduled search. If the integer is followed by the letter 'p' Splunk Enterprise interprets the ttl as a multiple of the scheduled search period.
auto_summarize.max_disabled_buckets The maximum number of buckets with the suspended summarization before the summarization search is completely stopped, and the summarization of the search is suspended for auto_summarize.suspend_period.
auto_summarize.max_summary_ratio The maximum ratio of summary_size/bucket_size, which specifies when to stop summarization and deem it unhelpful for a bucket.

Note: The test is only performed if the summary size is larger than auto_summarize.max_summary_size.

auto_summarize.max_summary_size The minimum summary size, in bytes, before testing whether the summarization is helpful.
auto_summarize.max_time Maximum time (in seconds) that the summary search is allowed to run.

Note: This is an approximate time. The summary search stops at clean bucket boundaries.

auto_summarize.suspend_period Time specfier indicating when to suspend summarization of this search if the summarization is deemed unhelpful.
auto_summarize.timespan The list of time ranges that each summarized chunk should span. This comprises the list of available granularity levels for which summaries would be available.

For example a timechart over the last month whose granuality is at the day level should set this to 1d. If you need the same data summarized at the hour level for weekly charts, use: 1h,1d.

cron_schedule The cron schedule to execute this search. For example: */5 * * * * causes the search to execute every 5 minutes.

cron lets you use standard cron notation to define your scheduled search interval. In particular, cron can accept this type of notation: 00,20,40 * * * *, which runs the search every hour at hh:00, hh:20, hh:40. Along the same lines, a cron of 03,23,43 * * * * runs the search every hour at hh:03, hh:23, hh:43.

Splunk recommends that you schedule your searches so that they are staggered over time. This reduces system load. Running all of them every 20 minutes (*/20) means they would all launch at hh:00 (20, 40) and might slow your system every 20 minutes.

Valid values: cron string

description Description of this saved search. Defaults to empty string.
disabled Indicates if this saved search is disabled.
dispatch.* * represents any custom dispatch field.
dispatch.buckets The maximum nuber of timeline buckets.
dispatch.earliest_time A time string that specifies the earliest time for this search. Can be a relative or absolute time.

If this value is an absolute time, use the dispatch.time_format to format the value.

dispatch.indexedRealtime Indicates whether to used indexed-realtime mode when doing real-time searches.
dispatch.latest_time A time string that specifies the latest time for the aved search. Can be a relative or absolute time.

If this value is an absolute time, use the dispatch.time_format to format the value.

dispatch.lookups Indicates if lookups are enabled for this search.
dispatch.max_count The maximum number of results before finalizing the search.
dispatch.max_time Indicates the maximum amount of time (in seconds) before finalizing the search.
dispatch.reduce_freq Specifies how frequently Splunk Enterprise should run the MapReduce reduce phase on accumulated map values.
dispatch.rt_backfill Indicates whether to back fill the real time window for this search. Parameter valid only if this is a real time search
dispatch.spawn_process Indicates whether Splunk Enterprise spawns a new search process when this saved search is executed.
dispatch.time_format Time format string that defines the time format that Splunk Enterprise uses to specify the earliest and latest time.
dispatch.ttl Indicates the time to live (in seconds) for the artifacts of the scheduled search, if no actions are triggered.

If an action is triggered Splunk Enterprise changes the ttl to that action ttl. If multiple actions are triggered, Splunk Enterprise applies the maximum ttl to the artifacts. To set the action ttl, refer to alert_actions.conf.spec.

If the integer is followed by the letter 'p' Splunk Enterprise interprets the ttl as a multiple of the scheduled search period.

displayview Defines the default UI view name (not label) in which to load the results. Accessibility is subject to the user having sufficient permissions.
is_scheduled Indicates if this search is to be run on a schedule.
is_visible Indicates if this saved search appears in the visible saved search list.
max_concurrent The maximum number of concurrent instances of this search the scheduler is allowed to run.
next_scheduled_time The time when the scheduler runs this search again.
qualifiedSearch The exact search string that the scheduler would run.
realtime_schedule Controls the way the scheduler computes the next execution time of a scheduled search. If this value is set to 1, the scheduler bases its determination of the next scheduled search execution time on the current time.

If this value is set to 0, the scheduler bases its determination of the next scheduled search on the last search execution time. This is called continuous scheduling. If set to 0, the scheduler never skips scheduled execution periods. However, the execution of the saved search might fall behind depending on the scheduler load. Use continuous scheduling whenever you enable the summary index option.

If set to 1, the scheduler might skip some execution periods to make sure that the scheduler is executing the searches running over the most recent time range.

The scheduler tries to execute searches that have realtime_schedule set to 1 before it executes searches that have continuous scheduling (realtime_schedule = 0).

request.ui_dispatch_app A field used by Splunk Web to denote the app this search should be dispatched in.
request.ui_dispatch_view Specifies a field used by Splunk Web to denote the view this search should be displayed in.
restart_on_searchpeer_add Indicates whether to restart a real-time search managed by the scheduler when a search peer becomes available for this saved search.

Note: The peer can be a newly added peer or a peer down and now available.

run_on_startup Indicates whether this search runs when Splunk Enterprise starts. If it does not run on startup, it runs at the next scheduled time.

Splunk recommends that you set run_on_startup to true for scheduled searches that populate lookup tables.

search Search expression to filter the response. The response matches field values against the search expression. For example:

search=foo matches any object that has "foo" as a substring in a field. search=field_name%3Dfield_value restricts the match to a single field. URI-encoding is required in this example.

vsid The viewstate id associated with the UI view listed in 'displayview'.

Matches to a stanza in viewstates.conf.

[ Top ]


saved/searches/{name}

https://<host>:<mPort>/services/saved/searches/{name}


Description

Manage the {name} saved search.

Method summary

Method Description Formats
DELETE Delete this saved search. XML, JSON
GET Get information on this saved search. XML, JSON
POST Updates this saved search XML, JSON

DELETE saved/searches/{name} method detail

Example

Request parameters

None

Response data keys

None


GET saved/searches/{name} method detail

Example

Request parameters
Name Type Default Description
earliest_time String If the search is scheduled display scheduled times starting from this time
latest_time String If the search is scheduled display scheduled times ending at this time
listDefaultActionArgs Boolean Indicates whether to list default actions.
Response data keys
Name Description
action.email Indicates the state of the email action.
action.email.auth_password The password to use when authenticating with the SMTP server. Normally this value is set when editing the email settings, however you can set a clear text password here that is encrypted on the next Splunk Enterprise restart.

Defaults to empty string.

action.email.auth_username The username to use when authenticating with the SMTP server. If this is empty string, no authentication is attempted. Defaults to empty string.

Note: Your SMTP server might reject unauthenticated emails.

action.email.bcc BCC email address to use if action.email is enabled.
action.email.cc CC email address to use if action.email is enabled.
action.email.command The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.email.format Specify the format of text in the email. This value also applies to any attachments.

Valid values: (plain | html | raw | csv)

action.email.from Email address from which the email action originates.
action.email.hostname Sets the hostname used in the web link (url) sent in email actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

When this value is a simple hostname, the protocol and port which are configured within splunk are used to construct the base of the url.

When this value begins with 'http://', it is used verbatim. Note: This means the correct port must be specified if it is not the default port for http or https. This is useful in cases when the Splunk Enterprise server is not aware of how to construct an externally referencable url, such as SSO environments, other proxies, or when the Splunk Enterprise server hostname is not generally resolvable.

Defaults to current hostname provided by the operating system, or if that fails "localhost." When set to empty, default behavior is used.

action.email.inline Indicates whether the search results are contained in the body of the email.

Results can be either inline or attached to an email. See action.email.sendresults.

action.email.mailserver Set the address of the MTA server to be used to send the emails.

Defaults to <LOCALHOST> (or whatever is set in alert_actions.conf).

action.email.maxresults Sets the global maximum number of search results to send when email.action is enabled.
action.email.maxtime Specifies the maximum amount of time the execution of an email action takes before the action is aborted.
action.email.preprocess_results Search string to preprocess results before emailing them. Defaults to empty string (no preprocessing).

Usually the preprocessing consists of filtering out unwanted internal fields.

action.email.reportPaperOrientation Specifies the paper orientation: portrait or landscape.
action.email.reportPaperSize Specifies the paper size for PDFs. Defaults to letter.

Valid values: (letter | legal | ledger | a2 | a3 | a4 | a5)

action.email.reportServerEnabled Not supported.
action.email.reportServerURL Not supported.
action.email.sendpdf Indicates whether to create and send the results as a PDF.
action.email.sendresults Indicates whether to attach the search results in the email.

Results can be either attached or inline. See action.email.inline.

action.email.subject Specifies an email subject.

Defaults to SplunkAlert-<savedsearchname>.

action.email.to List of recipient email addresses. Required if this search is scheduled and the email alert action is enabled.
action.email.track_alert Indicates whether the execution of this action signifies a trackable alert.
action.email.ttl Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows <Integer>, int is the number of scheduled periods. Defaults to 86400 (24 hours).

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

Valid values are Integer[p].

action.email.use_ssl Indicates whether to use SSL when communicating with the SMTP server.
action.email.use_tls Indicates whether to use TLS (transport layer security) when communicating with the SMTP server (starttls).
action.populate_lookup The state of the populate lookup action.
action.populate_lookup.command The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search.

To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.populate_lookup.hostname Sets the hostname used in the web link (url) sent in alert actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

See action.email.hostname for details.

action.populate_lookup.maxresults The maximum number of search results sent using alerts.
action.populate_lookup.maxtime Sets the maximum amount of time the execution of an action takes before the action is aborted. Defaults to 5m.

Valid values are: Integer[m|s|h|d]

action.populate_lookup.track_alert Indicates whether the execution of this action signifies a trackable alert.
action.populate_lookup.ttl Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows Integer, then this specifies the number of scheduled periods. Defaults to 10p.

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

Valid values are Integer[p]

action.rss The state of the RSS action.
action.rss.command The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.rss.hostname Sets the hostname used in the web link (url) sent in alert actions.
action.rss.maxresults Sets the maximum number of search results sent using alerts.
action.rss.maxtime Sets the maximum amount of time the execution of an action takes before the action is aborted. Defaults to 1m.
action.rss.track_alert Indicates whether the execution of this action signifies a trackable alert.
action.rss.ttl Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows Integer, specifies the number of scheduled periods. Defaults to 86400 (24 hours).

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

Valid values are: Integer[p]

action.script The state of the script action.
action.script.command The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.script.hostname Sets the hostname used in the web link (url) sent in alert actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)


protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)


See action.email.hostname for details.

action.script.maxresults The maximum number of search results sent using alerts.
action.script.maxtime Sets the maximum amount of time the execution of an action takes before the action is aborted.
action.script.track_alert Indicates whether the execution of this action signifies a trackable alert.
action.script.ttl Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows Integer, specifies the number of scheduled periods. Defaults to 600 (10 minutes).

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

Valid values are: Integer[p]

action.summary_index The state of the summary index action.
action.summary_index._name Specifies the name of the summary index where the results of the scheduled search are saved.

Defaults to "summary."

action.summary_index.command The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.summary_index.hostname Sets the hostname used in the web link (url) sent in alert actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

See action.email.hostname for details.

action.summary_index.inline Determines whether to execute the summary indexing action as part of the scheduled search.

Note: This option is considered only if the summary index action is enabled and is always executed (in other words, if counttype = always).

action.summary_index.maxresults Sets the maximum number of search results sent using alerts.
action.summary_index.maxtime Sets the maximum amount of time the execution of an action takes before the action is aborted. Defaults to 5m.
action.summary_index.track_alert Indicates whether the execution of this action signifies a trackable alert.
action.summary_index.ttl Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows Integer, specifies the number of scheduled periods. Defaults to 10p.

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

Valid values are: Integer[p]

alert.digest_mode Specifies whether Splunk Enterprise applies the alert actions to the entire result set or on each individual result.
alert.expires Sets the period of time to show the alert in the dashboard. Defaults to 24h.
alert.severity Valid values: (1 | 2 | 3 | 4 | 5 | 6)

Sets the alert severity level.

Valid values are:

1 DEBUG
2 INFO
3 WARN
4 ERROR
5 SEVERE
6 FATAL
alert.suppress Indicates whether alert suppression is enabled for this schedules search.
alert.suppress.period Specifies the suppresion period. Only valid if alert.supress is enabled.

Uses [number][time-unit] to specify a time. For example: 60 = 60 seconds, 1m = 1 minute, 1h = 60 minutes = 1 hour.

alert.track Specifies whether to track the actions triggered by this scheduled search.

auto - determine whether to track or not based on the tracking setting of each action, do not track scheduled searches that always trigger actions.

true - force alert tracking.

false - disable alert tracking for this search.

alert_comparator One of the following strings:
greater than
less than
equal to
rises by
drops by
rises by perc
drops by perc

Used with alert_threshold to trigger alert actions.

alert_condition A conditional search that is evaluated against the results of the saved search. Defaults to an empty string.

Alerts are triggered if the specified search yields a non-empty search result list.

alert_threshold Valid values are: Integer[%]

Specifies the value to compare (see alert_comparator) before triggering the alert actions. If expressed as a percentage, indicates value to use when alert_comparator is set to "rises by perc" or "drops by perc."

alert_type What to base the alert on, overriden by alert_condition if it is specified. Valid values are: always, custom, number of events, number of hosts, number of sources.
cron_schedule The cron schedule to execute this search. For example: */5 * * * * causes the search to execute every 5 minutes.

cron lets you use standard cron notation to define your scheduled search interval. In particular, cron can accept this type of notation: 00,20,40 * * * *, which runs the search every hour at hh:00, hh:20, hh:40. Along the same lines, a cron of 03,23,43 * * * * runs the search every hour at hh:03, hh:23, hh:43.

Splunk recommends that you schedule your searches so that they are staggered over time. This reduces system load. Running all of them every 20 minutes (*/20) means they would all launch at hh:00 (20, 40) and might slow your system every 20 minutes.

Valid values: cron string

description Description of this saved search.
disabled Indicates if this saved search is disabled.
dispatch.buckets The maximum nuber of timeline buckets.
dispatch.earliest_time A time string that specifies the earliest time for this search. Can be a relative or absolute time.

If this value is an absolute time, use the dispatch.time_format to format the value.

dispatch.latest_time A time string that specifies the latest time for this saved search. Can be a relative or absolute time.

If this value is an absolute time, use the dispatch.time_format to format the value.

dispatch.lookups Indicates if lookups are enabled for this search.
dispatch.max_count The maximum number of results before finalizing the search.
dispatch.max_time Indicates the maximum amount of time (in seconds) before finalizing the search.
dispatch.reduce_freq Specifies how frequently Splunk Enterprise should run the MapReduce reduce phase on accumulated map values.
dispatch.spawn_process Indicates whether Splunk Enterprise spawns a new search process when this saved search is executed.
dispatch.time_format A time format string that defines the time format that Splunk Enterprise uses to specify the earliest and latest time.
dispatch.ttl Indicates the time to live (in seconds) for the artifacts of the scheduled search, if no actions are triggered.

If an action is triggered Splunk Enterprise changes the ttl to that action ttl. If multiple actions are triggered, Splunk Enterprise applies the maximum ttl to the artifacts. To set the action ttl, refer to alert_actions.conf.spec.

If the integer is followed by the letter 'p' Splunk Enterprise interprets the ttl as a multiple of the scheduled search period.

displayview Defines the default Splunk Web view name (not label) in which to load the results. Accessibility is subject to the user having sufficient permissions.
earliest_time For scheduled searches display all the scheduled times starting from this time.
is_scheduled Indicates if this search is to be run on a schedule.
is_visible Indicates if this saved search appears in the visible saved search list.
latest_time For scheduled searches display all the scheduled times until this time (not just the next run time).
listDefaultActionArgs List default values of actions.*, even though some of the actions may not be specified in the saved search.
max_concurrent The maximum number of concurrent instances of this search the scheduler is allowed to run.
next_scheduled_time The time when the scheduler runs this search again.
qualifiedSearch The exact search command for this saved search.
realtime_schedule Controls the way the scheduler computes the next execution time of a scheduled search. If this value is set to 1, the scheduler bases its determination of the next scheduled search execution time on the current time.

If this value is set to 0, the scheduler bases its determination of the next scheduled search on the last search execution time. This is called continuous scheduling.

See the POST parameter for this attribute for details.

request.ui_dispatch_app A field used by Splunk Web to denote the app this search should be dispatched in.
request.ui_dispatch_view Specifies a field used by Splunk Web to denote the view this search should be displayed in.
restart_on_searchpeer_add Indicates whether to restart a real-time search managed by the scheduler when a search peer becomes available for this saved search.

Note: The peer can be a newly added peer or a peer down and now available.

run_on_startup Indicates whether this search runs when Splunk Enterprise starts. If it does not run on startup, it runs at the next scheduled time.

Splunk recommends that you set run_on_startup to true for scheduled searches that populate lookup tables.

search Search expression to filter the response. The response matches field values against the search expression. For example:

search=foo matches any object that has "foo" as a substring in a field. search=field_name%3Dfield_value restricts the match to a single field. URI-encoding is required in this example.

vsid Defines the viewstate id associated with the UI view listed in 'displayview'.

Must match up to a stanza in viewstates.conf.


POST saved/searches/{name} method detail

Example

Request parameters
Name Type Default Description
action.* String Wildcard argument for any action.

Use this parameter to specify specific action arguments. For example, to specify the email recipients for action.email.to.

action.email Boolean 0 The state of the email action. Read-only attribute. Value ignored on POST. Use actions to specify a list of enabled actions.
action.email.auth_password String The password to use when authenticating with the SMTP server. Normally this value is set when editing the email settings, however you can set a clear text password here and it is encrypted on the next Splunk Enterprise restart.

Defaults to empty string.

action.email.auth_username String The username to use when authenticating with the SMTP server. If this is empty string, no authentication is attempted. Defaults to empty string.

NOTE: Your SMTP server might reject unauthenticated emails.

action.email.bcc String BCC email address to use if action.email is enabled.
action.email.cc String CC email address to use if action.email is enabled.
action.email.command String The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.email.format Enum Valid values: (plain | html | raw | csv)

Specify the format of text in the email. This value also applies to any attachments.

action.email.from String Email address from which the email action originates.

Defaults to splunk@$LOCALHOST or whatever value is set in alert_actions.conf.

action.email.hostname String Sets the hostname used in the web link (url) sent in email actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

When this value is a simple hostname, the protocol and port which are configured within splunk are used to construct the base of the url.

When this value begins with 'http://', it is used verbatim. NOTE: This means the correct port must be specified if it is not the default port for http or https. This is useful in cases when the Splunk Enterprise server is not aware of how to construct an externally referencable url, such as SSO environments, other proxies, or when the Splunk Enterprise server hostname is not generally resolvable.

Defaults to current hostname provided by the operating system, or if that fails "localhost". When set to empty, default behavior is used.

action.email.inline Boolean Indicates whether the search results are contained in the body of the email.

Results can be either inline or attached to an email. See action.email.sendresults.

action.email.mailserver String Set the address of the MTA server to be used to send the emails.

Defaults to <LOCALHOST> (or whatever is set in alert_actions.conf).

action.email.maxresults Number Sets the global maximum number of search results to send when email.action is enabled.

Defaults to 100.

action.email.maxtime Number Valid values are Integer[m|s|h|d].

Specifies the maximum amount of time the execution of an email action takes before the action is aborted. Defaults to 5m.

action.email.pdfview String The name of the view to deliver if sendpdf is enabled
action.email.preprocess_results String Search string to preprocess results before emailing them. Defaults to empty string (no preprocessing).

Usually the preprocessing consists of filtering out unwanted internal fields.

action.email.reportCIDFontList Enum Space-separated list. Specifies the set (and load order) of CID fonts for handling Simplified Chinese(gb), Traditional Chinese(cns), Japanese(jp), and Korean(kor) in Integrated PDF Rendering.

If multiple fonts provide a glyph for a given character code, the glyph from the first font specified in the list is used.

To skip loading any CID fonts, specify the empty string.

Defaults to "gb cns jp kor"

action.email.reportIncludeSplunkLogo Boolean Indicates whether to include the Splunk logo with the report.
action.email.reportPaperOrientation Enum Valid values: (portrait | landscape)

Specifies the paper orientation: portrait or landscape. Defaults to portrait.

action.email.reportPaperSize Enum Valid values: (letter | legal | ledger | a2 | a3 | a4 | a5)

Specifies the paper size for PDFs. Defaults to letter.

action.email.reportServerEnabled Boolean Not supported.
action.email.reportServerURL String Not supported.
action.email.sendpdf Boolean Indicates whether to create and send the results as a PDF. Defaults to false.
action.email.sendresults Boolean Indicates whether to attach the search results in the email.

Results can be either attached or inline. See action.email.inline.

action.email.subject String Specifies an alternate email subject.

Defaults to SplunkAlert-<savedsearchname>.

action.email.to String A comma or semicolon separated list of recipient email addresses. Required if this search is scheduled and the email alert action is enabled.
action.email.track_alert Boolean Indicates whether the execution of this action signifies a trackable alert.
action.email.ttl Number Valid values are Integer[p].

Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows <Integer>, int is the number of scheduled periods. Defaults to 86400 (24 hours).

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

action.email.use_ssl Boolean Indicates whether to use SSL when communicating with the SMTP server.

Defaults to false.

action.email.use_tls Boolean Indicates whether to use TLS (transport layer security) when communicating with the SMTP server (starttls).

Defaults to false.

action.email.width_sort_columns Boolean Indicates whether columns should be sorted from least wide to most wide, left to right.

Only valid if format=text.

action.populate_lookup Boolean 0 The state of the populate lookup action. Read-only attribute. Value ignored on POST. Use actions to specify a list of enabled actions.
action.populate_lookup.command String The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.populate_lookup.dest String Lookup name of path of the lookup to populate
action.populate_lookup.hostname String Sets the hostname used in the web link (url) sent in alert actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

See action.email.hostname for details.

action.populate_lookup.maxresults Number Sets the maximum number of search results sent using alerts. Defaults to 100.
action.populate_lookup.maxtime Number Valid values are: Integer[m|s|h|d]

Sets the maximum amount of time the execution of an action takes before the action is aborted. Defaults to 5m.

action.populate_lookup.track_alert Boolean Indicates whether the execution of this action signifies a trackable alert.
action.populate_lookup.ttl Number Valid values are Integer[p]

Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows Integer, then this specifies the number of scheduled periods. Defaults to 10p.

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

action.rss Boolean 0 The state of the rss action. Read-only attribute. Value ignored on POST. Use actions to specify a list of enabled actions.
action.rss.command String The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.rss.hostname String Sets the hostname used in the web link (url) sent in alert actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

See action.email.hostname for details.

action.rss.maxresults Number Sets the maximum number of search results sent using alerts. Defaults to 100.
action.rss.maxtime Number Valid values are Integer[m|s|h|d].

Sets the maximum amount of time the execution of an action takes before the action is aborted. Defaults to 1m.

action.rss.track_alert Boolean Indicates whether the execution of this action signifies a trackable alert.
action.rss.ttl Number Valid values are: Integer[p]

Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows Integer, specifies the number of scheduled periods. Defaults to 86400 (24 hours).

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

action.script Boolean 0 The state of the script action. Read-only attribute. Value ignored on POST. Use actions to specify a list of enabled actions.
action.script.command String The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.script.filename String File name of the script to call. Required if script action is enabled
action.script.hostname String Sets the hostname used in the web link (url) sent in alert actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

See action.email.hostname for details.

action.script.maxresults Number Sets the maximum number of search results sent using alerts. Defaults to 100.
action.script.maxtime Number Valid values are: Integer[m|s|h|d]

Sets the maximum amount of time the execution of an action takes before the action is aborted. Defaults to 5m.

action.script.track_alert Boolean Indicates whether the execution of this action signifies a trackable alert.
action.script.ttl Number Valid values are: Integer[p]

Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows Integer, specifies the number of scheduled periods. Defaults to 600 (10 minutes).

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

action.summary_index Boolean 0 The state of the summary index action. Read-only attribute. Value ignored on POST. Use actions to specify a list of enabled actions.

Defaults to 0

action.summary_index._name String Specifies the name of the summary index where the results of the scheduled search are saved.

Defaults to "summary."

action.summary_index.command String The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.summary_index.hostname String Sets the hostname used in the web link (url) sent in summary-index alert actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

See action.email.hostname for details.

action.summary_index.inline Boolean Determines whether to execute the summary indexing action as part of the scheduled search.

NOTE: This option is considered only if the summary index action is enabled and is always executed (in other words, if counttype = always).

Defaults to true

action.summary_index.maxresults Number Sets the maximum number of search results sent using alerts. Defaults to 100.
action.summary_index.maxtime Number Valid values are: Integer[m|s|h|d]

Sets the maximum amount of time the execution of an action takes before the action is aborted. Defaults to 5m.

action.summary_index.track_alert Boolean Indicates whether the execution of this action signifies a trackable alert.
action.summary_index.ttl Number Valid values are: Integer[p]

Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows Integer, specifies the number of scheduled periods. Defaults to 10p.

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

actions String A comma-separated list of actions to enable.

For example: rss,email

alert.digest_mode Boolean 1 Specifies whether Splunk Enterprise applies the alert actions to the entire result set or on each individual result.

Defaults to true.

alert.expires Number 24h Valid values: [number][time-unit]

Sets the period of time to show the alert in the dashboard. Defaults to 24h.

Use [number][time-unit] to specify a time. For example: 60 = 60 seconds, 1m = 1 minute, 1h = 60 minutes = 1 hour.

alert.severity Enum 3 Valid values: (1 | 2 | 3 | 4 | 5 | 6)

Sets the alert severity level.

Valid values are:

1 DEBUG 2 INFO 3 WARN 4 ERROR 5 SEVERE 6 FATAL

alert.suppress Boolean Indicates whether alert suppression is enabled for this scheduled search.
alert.suppress.fields String Comma delimited list of fields to use for suppression when doing per result alerting. Required if suppression is turned on and per result alerting is enabled.
alert.suppress.period Number Valid values: [number][time-unit]

Specifies the suppresion period. Only valid if alert.supress is enabled.

Use [number][time-unit] to specify a time. For example: 60 = 60 seconds, 1m = 1 minute, 1h = 60 minutes = 1 hour.

alert.track Enum auto Valid values: (true | false | auto)

Specifies whether to track the actions triggered by this scheduled search.

auto - determine whether to track or not based on the tracking setting of each action, do not track scheduled searches that always trigger actions.

true - force alert tracking.

false - disable alert tracking for this search.

alert_comparator String One of the following strings: greater than, less than, equal to, rises by, drops by, rises by perc, drops by perc

Used with alert_threshold to trigger alert actions.

alert_condition String Contains a conditional search that is evaluated against the results of the saved search. Defaults to an empty string.

Alerts are triggered if the specified search yields a non-empty search result list.

NOTE: If you specify an alert_condition, do not set counttype, relation, or quantity.

alert_threshold Number Valid values are: Integer[%]

Specifies the value to compare (see alert_comparator) before triggering the alert actions. If expressed as a percentage, indicates value to use when alert_comparator is set to "rises by perc" or "drops by perc."

alert_type String What to base the alert on, overriden by alert_condition if it is specified. Valid values are: always, custom, number of events, number of hosts, number of sources
args.* String Wildcard argument that accepts any saved search template argument, such as args.username=foobar when the search is search $username$.
auto_summarize Boolean 0 Indicates whether the scheduler should ensure that the data for this search is automatically summarized.
auto_summarize.command String summarize override=partial timespan=$auto_summarize.timespan$ max_summary_size=$auto_summarize.max_summary_size$ max_summary_ratio=$auto_summarize.max_summary_ratio$ max_disabled_buckets=$auto_summarize.max_disabled_buckets$ max_time=$auto_summarize.max_time$ [ $search$ ] A search template that constructs the auto summarization for this search.

Caution: Advanced feature. Do not change unless you understand the architecture of auto summarization of saved searches.

auto_summarize.cron_schedule String */10 * * * * Cron schedule that probes and generates the summaries for this saved search.

The default value corresponds to every ten hours.

auto_summarize.dispatch.earliest_time String A time string that specifies the earliest time for summarizing this search. Can be a relative or absolute time.

If this value is an absolute time, use the dispatch.time_format to format the value.

auto_summarize.dispatch.latest_time String A time string that specifies the latest time for summarizing this saved search. Can be a relative or absolute time.

If this value is an absolute time, use the dispatch.time_format to format the value.

auto_summarize.dispatch.time_format String %FT%T.%Q%:z Defines the time format that Splunk Enterprise uses to specify the earliest and latest time.
auto_summarize.dispatch.ttl String 60 Valid values: Integer[p]

Indicates the time to live (in seconds) for the artifacts of the summarization of the scheduled search.

auto_summarize.max_disabled_buckets Number 2 The maximum number of buckets with the suspended summarization before the summarization search is completely stopped, and the summarization of the search is suspended for auto_summarize.suspend_period.
auto_summarize.max_summary_ratio Number 0.1 The maximum ratio of summary_size/bucket_size, which specifies when to stop summarization and deem it unhelpful for a bucket.

Note: The test is only performed if the summary size is larger than auto_summarize.max_summary_size.

auto_summarize.max_summary_size Number 52428800 The minimum summary size, in bytes, before testing whether the summarization is helpful.

The default value is equivalent to 5MB.

auto_summarize.max_time Number 3600 Maximum time (in seconds) that the summary search is allowed to run.

Note: This is an approximate time. The summary search stops at clean bucket boundaries.

auto_summarize.suspend_period String 24h Time specfier indicating when to suspend summarization of this search if the summarization is deemed unhelpful.
auto_summarize.timespan String The list of time ranges that each summarized chunk should span. This comprises the list of available granularity levels for which summaries would be available. Specify a comma delimited list of time specifiers.

For example a timechart over the last month whose granuality is at the day level should set this to 1d. If you need the same data summarized at the hour level for weekly charts, use: 1h,1d.

cron_schedule String Valid values: cron string

The cron schedule to execute this search. For example: */5 * * * * causes the search to execute every 5 minutes.

cron lets you use standard cron notation to define your scheduled search interval. In particular, cron can accept this type of notation: 00,20,40 * * * *, which runs the search every hour at hh:00, hh:20, hh:40. Along the same lines, a cron of 03,23,43 * * * * runs the search every hour at hh:03, hh:23, hh:43.

Splunk recommends that you schedule your searches so that they are staggered over time. This reduces system load. Running all of them every 20 minutes (*/20) means they would all launch at hh:00 (20, 40) and might slow your system every 20 minutes.

description String Human-readable description of this saved search. Defaults to empty string.
disabled Boolean 0 Indicates if the saved search is enabled.

Disabled saved searches are not visible in Splunk Web.

dispatch.* String Wildcard argument that accepts any dispatch related argument.
dispatch.buckets Number 0 The maximum number of timeline buckets.
dispatch.earliest_time String A time string that specifies the earliest time for this search. Can be a relative or absolute time.

If this value is an absolute time, use the dispatch.time_format to format the value.

dispatch.indexedRealtime Boolean Indicates whether to used indexed-realtime mode when doing real-time searches.
dispatch.latest_time String A time string that specifies the latest time for this saved search. Can be a relative or absolute time.

If this value is an absolute time, use the dispatch.time_format to format the value.

dispatch.lookups Boolean 1 Enables or disables the lookups for this search.
dispatch.max_count Number 500000 The maximum number of results before finalizing the search.
dispatch.max_time Number 0 Indicates the maximum amount of time (in seconds) before finalizing the search.
dispatch.reduce_freq Number 10 Specifies, in seconds, how frequently Splunk Enterprise should run the MapReduce reduce phase on accumulated map values.
dispatch.rt_backfill Boolean 0 Whether to back fill the real time window for this search. Parameter valid only if this is a real time search
dispatch.spawn_process Boolean 1 Specifies whether Splunk Enterprise spawns a new search process when this saved search is executed.

Searches against indexes must run in a separate process.

dispatch.time_format String %FT%T.%Q%:z A time format string that defines the time format that Splunk Enterprise uses to specify the earliest and latest time.
dispatch.ttl Number 2p Valid values: Integer[p]

Indicates the time to live (in seconds) for the artifacts of the scheduled search, if no actions are triggered.

If an action is triggered Splunk Enterprise changes the ttl to that action ttl. If multiple actions are triggered, Splunk Enterprise applies the maximum ttl to the artifacts. To set the action ttl, refer to alert_actions.conf.spec.

If the integer is followed by the letter 'p' Splunk Enterprise interprets the ttl as a multiple of the scheduled search period.

displayview String Defines the default UI view name (not label) in which to load the results. Accessibility is subject to the user having sufficient permissions.
is_scheduled Boolean Whether this search is to be run on a schedule
is_visible Boolean 1 Specifies whether this saved search should be listed in the visible saved search list.
max_concurrent Number 1 The maximum number of concurrent instances of this search the scheduler is allowed to run.
next_scheduled_time String Read-only attribute. Value ignored on POST. There are some old clients who still send this value
qualifiedSearch String Read-only attribute. Value ignored on POST. Splunk computes this value during runtime.
realtime_schedule Boolean 1 Controls the way the scheduler computes the next execution time of a scheduled search. If this value is set to 1, the scheduler bases its determination of the next scheduled search execution time on the current time.

If this value is set to 0, the scheduler bases its determination of the next scheduled search on the last search execution time. This is called continuous scheduling. If set to 0, the scheduler never skips scheduled execution periods. However, the execution of the saved search might fall behind depending on the scheduler load. Use continuous scheduling whenever you enable the summary index option.

If set to 1, the scheduler might skip some execution periods to make sure that the scheduler is executing the searches running over the most recent time range.

The scheduler tries to execute searches that have realtime_schedule set to 1 before it executes searches that have continuous scheduling (realtime_schedule = 0).

request.ui_dispatch_app String Specifies a field used by Splunk Web to denote the app this search should be dispatched in.
request.ui_dispatch_view String Specifies a field used by Splunk Web to denote the view this search should be displayed in.
restart_on_searchpeer_add Boolean 1 Specifies whether to restart a real-time search managed by the scheduler when a search peer becomes available for this saved search.

NOTE: The peer can be a newly added peer or a peer down and now available.

run_on_startup Boolean 0 Indicates whether this search runs when Splunk Enterprise starts. If it does not run on startup, it runs at the next scheduled time.

Splunk recommends that you set run_on_startup to true for scheduled searches that populate lookup tables.

search String The search to save.
vsid String Defines the viewstate id associated with the UI view listed in 'displayview'.

Must match up to a stanza in viewstates.conf.

Response data keys
Name Description
action.* * represents any custom action.
action.email Indicates the state of the email action.
action.email.auth_password The password to use when authenticating with the SMTP server. Normally this value is set when editing the email settings, however you can set a clear text password here that is encrypted on the next Splunk Enterprise restart.

Defaults to empty string.

action.email.auth_username The username to use when authenticating with the SMTP server. If this is empty string, no authentication is attempted. Defaults to empty string.

Note: Your SMTP server might reject unauthenticated emails.

action.email.bcc BCC email address to use if action.email is enabled.
action.email.cc CC email address to use if action.email is enabled.
action.email.command The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.email.format Specify the format of text in the email. This value also applies to any attachments.<

Valid values: (plain | html | raw | csv)

action.email.from Email address from which the email action originates.

Defaults to splunk@$LOCALHOST or whatever value is set in alert_actions.conf.

action.email.hostname Sets the hostname used in the web link (url) sent in email actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

When this value is a simple hostname, the protocol and port which are configured within splunk are used to construct the base of the url.

When this value begins with 'http://', it is used verbatim. NOTE: This means the correct port must be specified if it is not the default port for http or https. This is useful in cases when the Splunk Enterprise server is not aware of how to construct an externally referencable url, such as SSO environments, other proxies, or when the Splunk Enterprise server hostname is not generally resolvable.

Defaults to current hostname provided by the operating system, or if that fails "localhost". When set to empty, default behavior is used.

action.email.inline Indicates whether the search results are contained in the body of the email.

Results can be either inline or attached to an email. See action.email.sendresults.

action.email.mailserver Set the address of the MTA server to be used to send the emails.

Defaults to <LOCALHOST> (or whatever is set in alert_actions.conf).

action.email.maxresults A conditional search that is evaluated against the results of the saved search. Defaults to an empty string.

Alerts are triggered if the specified search yields a non-empty search result list.

Note: If you specify an alert_condition, do not set counttype, relation, or quantity.

action.email.maxtime Specifies the maximum amount of time the execution of an email action takes before the action is aborted.
action.email.pdfview The name of the view to deliver if sendpdf is enabled
action.email.preprocess_results Search string to preprocess results before emailing them. Defaults to empty string (no preprocessing).

Usually the preprocessing consists of filtering out unwanted internal fields.

action.email.reportCIDFontList Space-separated list. Specifies the set (and load order) of CID fonts for handling Simplified Chinese(gb), Traditional Chinese(cns), Japanese(jp), and Korean(kor) in Integrated PDF Rendering.

If multiple fonts provide a glyph for a given character code, the glyph from the first font specified in the list is used.

To skip loading any CID fonts, specify the empty string.

Default value: "gb cns jp kor"

action.email.reportIncludeSplunkLogo Indicates whether to include the Splunk logo with the report.
action.email.reportPaperOrientation Specifies the paper orientation: portrait or landscape.
action.email.reportPaperSize Specifies the paper size for PDFs. Defaults to letter.

Valid values: (letter | legal | ledger | a2 | a3 | a4 | a5)

action.email.reportServerEnabled Not supported.
action.email.reportServerURL Not supported.
action.email.sendpdf Indicates whether to create and send the results as a PDF.
action.email.sendresults Indicates whether to attach the search results in the email.

Results can be either attached or inline. See action.email.inline.

action.email.subject Specifies an email subject.

Defaults to SplunkAlert-<savedsearchname>.

action.email.to List of recipient email addresses. Required if this search is scheduled and the email alert action is enabled.
action.email.track_alert Indicates whether the execution of this action signifies a trackable alert.
action.email.ttl Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows <Integer>, int is the number of scheduled periods. Defaults to 86400 (24 hours).

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

Valid values are Integer[p].

action.email.use_ssl Indicates whether to use SSL when communicating with the SMTP server.
action.email.use_tls Indicates whether to use TLS (transport layer security) when communicating with the SMTP server (starttls).
action.email.width_sort_columns Indicates whether columns should be sorted from least wide to most wide, left to right.

Only valid if format=text.

action.populate_lookup Indicates the state of the populate lookup action.
action.populate_lookup.command The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.populate_lookup.dest Lookup name of path of the lookup to populate.
action.populate_lookup.hostname Sets the hostname used in the web link (url) sent in alert actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

See action.email.hostname for details.

action.populate_lookup.maxresults The maximum number of search results sent using alerts.
action.populate_lookup.maxtime The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.populate_lookup.track_alert Indicates whether the execution of this action signifies a trackable alert.
action.populate_lookup.ttl Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows Integer, then this specifies the number of scheduled periods. Defaults to 10p.

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

Valid values are Integer[p]

action.rss Indicates the state of the RSS action.
action.rss.command The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.rss.hostname Sets the hostname used in the web link (url) sent in alert actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

See action.email.hostname for details.

action.rss.maxresults Sets the maximum number of search results sent using alerts.
action.rss.maxtime Sets the maximum amount of time the execution of an action takes before the action is aborted. Defaults to 1m.
action.rss.track_alert Indicates whether the execution of this action signifies a trackable alert.
action.rss.ttl Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows Integer, specifies the number of scheduled periods. Defaults to 86400 (24 hours).

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

Valid values are: Integer[p]

action.script Indicates the state of the script for this action.
action.script.command The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.script.filename File name of the script to call. Required if script action is enabled
action.script.hostname Sets the hostname used in the web link (url) sent in alert actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)


protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)


See action.email.hostname for details.

action.script.maxresults Sets the maximum number of search results sent using alerts.
action.script.maxtime Sets the maximum amount of time the execution of an action takes before the action is aborted.
action.script.track_alert Specifies the name of the summary index where the results of the scheduled search are saved.

Defaults to "summary."

action.script.ttl Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows Integer, specifies the number of scheduled periods. Defaults to 600 (10 minutes).

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

Valid values are: Integer[p]

action.summary_index Indicates the state of the summary index.
action.summary_index._name Specifies the name of the summary index where the results of the scheduled search are saved.

Defaults to "summary."

action.summary_index.command The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.summary_index.hostname Sets the hostname used in the web link (url) sent in alert actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

See action.email.hostname for details.

action.summary_index.inline Determines whether to execute the summary indexing action as part of the scheduled search.

Note: This option is considered only if the summary index action is enabled and is always executed (in other words, if counttype = always).

action.summary_index.maxresults Sets the maximum number of search results sent using alerts.
action.summary_index.maxtime Sets the maximum amount of time the execution of an action takes before the action is aborted. Defaults to 5m.

Valid values are: Integer[m|s|h|d]

action.summary_index.track_alert Indicates whether the execution of this action signifies a trackable alert.
action.summary_index.ttl Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows Integer, specifies the number of scheduled periods. Defaults to 10p.

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

Valid values are: Integer[p]

actions Actions to enable.
alert.digest_mode Indicates if Splunk Enterprise applies the alert actions to the entire result set or on each individual result.
alert.expires Sets the period of time to show the alert in the dashboard. Defaults to 24h.

Use [number][time-unit] to specify a time. For example: 60 = 60 seconds, 1m = 1 minute, 1h = 60 minutes = 1 hour.

Valid values: [number][time-unit]

alert.severity Valid values: (1 | 2 | 3 | 4 | 5 | 6)

Sets the alert severity level.

Valid values are:

1 DEBUG
2 INFO
3 WARN
4 ERROR
5 SEVERE
6 FATAL
alert.suppress Indicates whether alert suppression is enabled for this schedules search.
alert.suppress.fields Fields to use for suppression when doing per result alerting. Required if suppression is turned on and per result alerting is enabled.
alert.suppress.period Specifies the suppresion period. Only valid if alert.supress is enabled.

Uses [number][time-unit] to specify a time. For example: 60 = 60 seconds, 1m = 1 minute, 1h = 60 minutes = 1 hour.

alert.track Specifies whether to track the actions triggered by this scheduled search.

auto - determine whether to track or not based on the tracking setting of each action, do not track scheduled searches that always trigger actions.

true - force alert tracking.

false - disable alert tracking for this search.

alert_comparator One of the following strings: greater than, less than, equal to, rises by, drops by, rises by perc, drops by perc

Used with alert_threshold to trigger alert actions.

alert_condition A conditional search that is evaluated against the results of the saved search. Defaults to an empty string.

Alerts are triggered if the specified search yields a non-empty search result list.

Note: If you specify an alert_condition, do not set counttype, relation, or quantity.

alert_threshold Valid values are: Integer[%]

Specifies the value to compare (see alert_comparator) before triggering the alert actions. If expressed as a percentage, indicates value to use when alert_comparator is set to "rises by perc" or "drops by perc."

alert_type What to base the alert on, overriden by alert_condition if it is specified. Valid values are: always, custom, number of events, number of hosts, number of sources.
args.* Wildcard argument that accepts any saved search template argument, such as args.username=foobar when the search is search $username$.
auto_summarize Indicates whether the scheduler should ensure that the data for this search is automatically summarized.
auto_summarize.command A search template that constructs the auto summarization for this search.

Caution: Advanced feature. Do not change unless you understand the architecture of auto summarization of saved searches.

auto_summarize.cron_schedule Cron schedule that probes and generates the summaries for this saved search.

The default value corresponds to every ten hours.

auto_summarize.dispatch.earliest_time A time string that specifies the earliest time for summarizing this search. Can be a relative or absolute time.
auto_summarize.dispatch.latest_time A time string that specifies the latest time for this saved search. Can be a relative or absolute time.
auto_summarize.dispatch.time_format Defines the time format that Splunk Enterprise uses to specify the earliest and latest time.
auto_summarize.dispatch.ttl Indicates the time to live (in seconds) for the artifacts of the summarization of the scheduled search. If the integer is followed by the letter 'p' Splunk Enterprise interprets the ttl as a multiple of the scheduled search period.
auto_summarize.max_disabled_buckets The maximum number of buckets with the suspended summarization before the summarization search is completely stopped, and the summarization of the search is suspended for auto_summarize.suspend_period.
auto_summarize.max_summary_ratio The maximum ratio of summary_size/bucket_size, which specifies when to stop summarization and deem it unhelpful for a bucket.

Note: The test is only performed if the summary size is larger than auto_summarize.max_summary_size.

auto_summarize.max_summary_size The minimum summary size, in bytes, before testing whether the summarization is helpful.
auto_summarize.max_time Maximum time (in seconds) that the summary search is allowed to run.

Note: This is an approximate time. The summary search stops at clean bucket boundaries.

auto_summarize.suspend_period Time specfier indicating when to suspend summarization of this search if the summarization is deemed unhelpful.
auto_summarize.timespan The list of time ranges that each summarized chunk should span. This comprises the list of available granularity levels for which summaries would be available.

For example a timechart over the last month whose granuality is at the day level should set this to 1d. If you need the same data summarized at the hour level for weekly charts, use: 1h,1d.

cron_schedule The cron schedule to execute this search. For example: */5 * * * * causes the search to execute every 5 minutes.

cron lets you use standard cron notation to define your scheduled search interval. In particular, cron can accept this type of notation: 00,20,40 * * * *, which runs the search every hour at hh:00, hh:20, hh:40. Along the same lines, a cron of 03,23,43 * * * * runs the search every hour at hh:03, hh:23, hh:43.

Splunk recommends that you schedule your searches so that they are staggered over time. This reduces system load. Running all of them every 20 minutes (*/20) means they would all launch at hh:00 (20, 40) and might slow your system every 20 minutes.

Valid values: cron string

description Description of this saved search.
disabled Indicates if the saved search is disnabled.

Disabled saved searches are not visible in Splunk Web.

dispatch.* * represents any custom dispatch field.
dispatch.buckets The maximum nuber of timeline buckets.
dispatch.earliest_time A time string that specifies the earliest time for this search. Can be a relative or absolute time.

If this value is an absolute time, use the dispatch.time_format to format the value.

dispatch.indexedRealtime Indicates whether to used indexed-realtime mode when doing real-time searches.
dispatch.latest_time A time string that specifies the latest time for this saved search. Can be a relative or absolute time.

If this value is an absolute time, use the dispatch.time_format to format the value.

dispatch.lookups Indicates if lookups are enabled for this search.
dispatch.max_count The maximum number of results before finalizing the search.
dispatch.max_time Indicates the maximum amount of time (in seconds) before finalizing the search.
dispatch.reduce_freq Specifies how frequently Splunk Enterprise should run the MapReduce reduce phase on accumulated map values.
dispatch.rt_backfill Indicates whether to back fill the real time window for this search. Parameter valid only if this is a real time search
dispatch.spawn_process Indicates whether Splunk Enterprise spawns a new search process when this saved search is executed.
dispatch.time_format Time format string that defines the time format that Splunk Enterprise uses to specify the earliest and latest time.
dispatch.ttl Indicates the time to live (in seconds) for the artifacts of the scheduled search, if no actions are triggered.

If an action is triggered Splunk Enterprise changes the ttl to that action ttl. If multiple actions are triggered, Splunk Enterprise applies the maximum ttl to the artifacts. To set the action ttl, refer to alert_actions.conf.spec.

If the integer is followed by the letter 'p' Splunk Enterprise interprets the ttl as a multiple of the scheduled search period.

displayview Defines the default UI view name (not label) in which to load the results. Accessibility is subject to the user having sufficient permissions.
is_scheduled Indicates if this search is to be run on a schedule.
is_visible Indicates if this saved search appears in the visible saved search list.
max_concurrent The maximum number of concurrent instances of this search the scheduler is allowed to run.
next_scheduled_time The time when the scheduler runs this search again.
qualifiedSearch The exact search command for this saved search.
realtime_schedule Controls the way the scheduler computes the next execution time of a scheduled search. If this value is set to 1, the scheduler bases its determination of the next scheduled search execution time on the current time.

If this value is set to 0, the scheduler bases its determination of the next scheduled search on the last search execution time. This is called continuous scheduling. If set to 0, the scheduler never skips scheduled execution periods. However, the execution of the saved search might fall behind depending on the scheduler load. Use continuous scheduling whenever you enable the summary index option.

If set to 1, the scheduler might skip some execution periods to make sure that the scheduler is executing the searches running over the most recent time range.

The scheduler tries to execute searches that have realtime_schedule set to 1 before it executes searches that have continuous scheduling (realtime_schedule = 0).

request.ui_dispatch_app A field used by Splunk Web to denote the app this search should be dispatched in.
request.ui_dispatch_view Specifies a field used by Splunk Web to denote the view this search should be displayed in.
restart_on_searchpeer_add Indicates whether to restart a real-time search managed by the scheduler when a search peer becomes available for this saved search.

Note: The peer can be a newly added peer or a peer down and now available.

run_on_startup Indicates whether this search runs when Splunk Enterprise starts. If it does not run on startup, it runs at the next scheduled time.

Splunk recommends that you set run_on_startup to true for scheduled searches that populate lookup tables.

search Search expression to filter the response. The response matches field values against the search expression. For example:

search=foo matches any object that has "foo" as a substring in a field. search=field_name%3Dfield_value restricts the match to a single field. URI-encoding is required in this example.

vsid Defines the viewstate id associated with the UI view listed in 'displayview'.

Must match up to a stanza in viewstates.conf.

[ Top ]


saved/searches/{name}/acknowledge

https://<host>:<mPort>/services/saved/searches/{name}/acknowledge

Description

Acknowledge the {name} saved search alert suppression.

Method summary

Method Description Formats
POST Acknowledge the {name} saved search alert suppression and resume alerting. XML, JSON

POST saved/searches/{name}/acknowledge method detail

Example

Request parameters
Name Type Default Description
key String The suppression key used in field-based supression.

For example, in host-based suppression, with data from 5 hosts, the key is the host, as each host could have different suppression expiration times.

Response data keys

None

[ Top ]


saved/searches/{name}/dispatch

https://<host>:<mPort>/services/saved/searches/{name}/dispatch

Description

Dispatch the {name} saved search.

Method summary

Method Description Formats
POST Dispatch the {name} saved search. XML, JSON

POST saved/searches/{name}/dispatch method detail

Example

Request parameters
Name Type Default Description
args.* Arg values to create a saved search is the saved search is a template search.

For example, specify arg.index_name to create the following search:

search index=$args.index_name | ...
dispatch.* String Any dispatch.* field of the search that needs to be overridden when running the summary search.
dispatch.adhoc_search_level String Use one of the following search modes.
[ verbose | fast | smart ] 
dispatch.now Boolean Dispatch the search as if the specified time for this parameter was the current time.
force_dispatch Boolean Indicates whether to start a new search even if another instance of this search is already running.
now String [Deprecated] Use dispatch.now.
trigger_actions Boolean Indicates whether to trigger alert actions.
Response data keys

None

[ Top ]


saved/searches/{name}/history

https://<host>:<mPort>/services/saved/searches/{name}/history

Description

List available search jobs created from the {name} saved search.

Method summary

Method Description Formats
GET List available search jobs created from the {name} saved search. XML, JSON

GET saved/searches/{name}/history method detail

Example

Request parameters

None

Response data keys
Name Description
earliest_time The earliest time a search job is configured to start.
isDone Indicates if the search has completed.
isFinalized Indicates if the search was finalized (stopped before completion).
isRealTimeSearch Indicates if the search is a real time search.
isSaved Indicates if the search is saved idefinitely.
isScheduled Indicates if the search is a scheduled search.
isZombie Indicates if the process running the search is dead, but with the search not finished.
latest_time The latest time a search job is configured to start.
listDefaultActionArgs List default values of actions.*, even though some of the actions may not be specified in the saved search.
ttl The time to live, or time before the search job expires after it completes.

[ Top ]


saved/searches/{name}/reschedule

https://<host>:<mPort>/services/saved/searches/{name}/reschedule

Description

Get list of scheduled searches.

Method summary

Method Description Formats
POST Get list of scheduled searches. XML, JSON

POST saved/searches/{name}/reschedule method detail

Example

Request parameters
Name Type Default Description
schedule_time String The time to next run the search.
Response data keys

None

Application usage

If no schedule_time argument is specified, it is assumed that the search should be run as soon as possible.

[ Top ]


saved/searches/{name}/scheduled_times

https://<host>:<mPort>/services/saved/searches/{name}/scheduled_times

Description

Get {name} scheduled saved search time.

Method summary

Method Description Formats
GET Get {name} scheduled saved search time. XML, JSON

GET saved/searches/{name}/scheduled_times method detail

Example

Request parameters
Name Type Default Description
earliest_time
required
String Absolute or relative earliest time
latest_time
required
String Absolute or relative latest time
Response data keys
Name Description
action.email Indicates the state of the email action.
action.email.auth_password The password to use when authenticating with the SMTP server. Normally this value is set when editing the email settings, however you can set a clear text password here that is encrypted on the next Splunk Enterprise restart.

Defaults to empty string.

action.email.auth_username The username to use when authenticating with the SMTP server. If this is empty string, no authentication is attempted. Defaults to empty string.

Note: Your SMTP server might reject unauthenticated emails.

action.email.pdfview The name of the view to deliver if sendpdf is enabled.
action.email.subject Specifies an email subject.

Defaults to SplunkAlert-<savedsearchname>.

action.email.to List of recipient email addresses. Required if this search is scheduled and the email alert action is enabled.
action.summary_index The state of the summary index action.
action.summary_index._name The state of the summary index action.
actions Actions triggerd by this alert.
alert.digest_mode Indicates if Splunk Enterprise applies the alert actions to the entire result set or on each individual result.
alert.expires Sets the period of time to show the alert in the dashboard. Defaults to 24h.

Uses [number][time-unit] to specify a time. For example: 60 = 60 seconds, 1m = 1 minute, 1h = 60 minutes = 1 hour.

alert.severity Valid values: (1 | 2 | 3 | 4 | 5 | 6)

Sets the alert severity level.

Valid values are:

1 DEBUG 2 INFO 3 WARN 4 ERROR 5 SEVERE 6 FATAL

alert.suppress Indicates whether alert suppression is enabled for this schedules search.
alert.suppress.fields Fields to use for suppression when doing per result alerting. Required if suppression is turned on and per result alerting is enabled.
alert.suppress.period Specifies the suppresion period. Only valid if alert.supress is enabled.

Use [number][time-unit] to specify a time. For example: 60 = 60 seconds, 1m = 1 minute, 1h = 60 minutes = 1 hour.

alert.track Specifies whether to track the actions triggered by this scheduled search.

auto - determine whether to track or not based on the tracking setting of each action, do not track scheduled searches that always trigger actions.

true - force alert tracking.

false - disable alert tracking for this search.

alert_comparator Valid values are: Integer[%]

Specifies the value to compare (see alert_comparator) before triggering the alert actions. If expressed as a percentage, indicates value to use when alert_comparator is set to "rises by perc" or "drops by perc."

alert_condition A conditional search that is evaluated against the results of the saved search. Defaults to an empty string.

Alerts are triggered if the specified search yields a non-empty search result list.

Note: If you specify an alert_condition, do not set counttype, relation, or quantity.

alert_threshold Valid values are: Integer[%]

Specifies the value to compare (see alert_comparator) before triggering the alert actions. If expressed as a percentage, indicates value to use when alert_comparator is set to "rises by perc" or "drops by perc."

alert_type What to base the alert on, overriden by alert_condition if it is specified. Valid values are: always, custom, number of events, number of hosts, number of sources.
cron_schedule The cron schedule to execute this search. For example: */5 * * * * causes the search to execute every 5 minutes.

cron lets you use standard cron notation to define your scheduled search interval. In particular, cron can accept this type of notation: 00,20,40 * * * *, which runs the search every hour at hh:00, hh:20, hh:40. Along the same lines, a cron of 03,23,43 * * * * runs the search every hour at hh:03, hh:23, hh:43.

Splunk recommends that you schedule your searches so that they are staggered over time. This reduces system load. Running all of them every 20 minutes (*/20) means they would all launch at hh:00 (20, 40) and might slow your system every 20 minutes.

Valid values: cron string

description Description of the saved search.
disabled Indicates if this saved search is disabled.
dispatch.buckets The maximum number of timeline buckets.
dispatch.earliest_time A time string that specifies the earliest time for this search. Can be a relative or absolute time.

If this value is an absolute time, use the dispatch.time_format to format the value.

dispatch.latest_time A time string that specifies the latest time for this saved search. Can be a relative or absolute time.

If this value is an absolute time, use the dispatch.time_format to format the value.

dispatch.lookups Indicates if lookups are enabled for this search.
dispatch.max_count The maximum number of results before finalizing the search.
dispatch.max_time Indicates the maximum amount of time (in seconds) before finalizing the search
earliest_time For scheduled searches display all the scheduled times starting from this time.
is_scheduled Indicates if this search is to be run on a schedule.
is_visible Indicates if this saved search appears in the visible saved search list.
latest_time A time string that specifies the latest time for this saved search. Can be a relative or absolute time.

If this value is an absolute time, use the dispatch.time_format to format the value.

listDefaultActionArgs List default values of actions.*, even though some of the actions may not be specified in the saved search.
max_concurrent The maximum number of concurrent instances of this search the scheduler is allowed to run.
next_scheduled_time The time when the scheduler runs this search again.
qualifiedSearch The exact search command for this saved search.
realtime_schedule Controls the way the scheduler computes the next execution time of a scheduled search. If this value is set to 1, the scheduler bases its determination of the next scheduled search execution time on the current time.

If this value is set to 0, the scheduler bases its determination of the next scheduled search on the last search execution time. This is called continuous scheduling. If set to 0, the scheduler never skips scheduled execution periods. However, the execution of the saved search might fall behind depending on the scheduler load. Use continuous scheduling whenever you enable the summary index option.

If set to 1, the scheduler might skip some execution periods to make sure that the scheduler is executing the searches running over the most recent time range.

The scheduler tries to execute searches that have realtime_schedule set to 1 before it executes searches that have continuous scheduling (realtime_schedule = 0).

request.ui_dispatch_app A field used by Splunk Web to denote the app this search should be dispatched in.
request.ui_dispatch_view A field used by Splunk Web to denote the app this search should be dispatched in.
restart_on_searchpeer_add Indicates whether to restart a real-time search managed by the scheduler when a search peer becomes available for this saved search.

Note: The peer can be a newly added peer or a peer down and now available.

run_on_startup Indicates whether this search runs when Splunk Enterprise starts. If it does not run on startup, it runs at the next scheduled time.

Splunk recommends that you set run_on_startup to true for scheduled searches that populate lookup tables.

scheduled_times The times when the scheduler runs the search.
search Search expression to filter the response. The response matches field values against the search expression. For example:

search=foo matches any object that has "foo" as a substring in a field. search=field_name%3Dfield_value restricts the match to a single field. URI-encoding is required in this example.

vsid The viewstate id associated with the Splunk Web view listed in 'displayview'.

Matches to a stanza in viewstates.conf.

Application usage

Specify a time range for the data returned using earliest_time and latest_time parameters.

[ Top ]


saved/searches/{name}/suppress

https://<host>:<mPort>/services/saved/searches/{name}/suppress

Description

Get the {name} saved search alert suppression state.

Method summary

Method Description Formats
GET Get the {name} saved search alert suppression state. XML, JSON

GET saved/searches/{name}/suppress method detail

Example

Request parameters
Name Type Default Description
expiration String Indicates the time the suppression period expires.
key
Response data keys
Name Description
earliest_time For scheduled searches display all the scheduled times starting from this time.
expiration Sets the period of time to show the alert in the dashboard. Defaults to 24h.

Uses [number][time-unit] to specify a time. For example: 60 = 60 seconds, 1m = 1 minute, 1h = 60 minutes = 1 hour.

latest_time A time string that specifies the latest time for this saved search. Can be a relative or absolute time.

If this value is an absolute time, use the dispatch.time_format to format the value.

listDefaultActionArgs List default values of actions.*, even though some of the actions may not be specified in the saved search.
suppressed Indicates if alert suppression is enabled for this search.
suppressionKey A combination of all the values of the suppression fields (or the combinations MD5), if fields were specified.

[ Top ]


scheduled/views

https://<host>:<mPort>/services/scheduled/views

Description

Allows for management of scheduled (for pdf delivery) views. Scheduled views are dummy/noop scheduled saved searches that email a pdf version of a view.

Method summary

Method Description Formats
GET Lists all scheduled view objects. XML, JSON

GET scheduled/views method detail

Example

Request parameters

Pagination and filtering parameters can be used with this method.

Response data keys
Name Description
action.email Indicates the state of the email action.
action.email.pdfview Name of the view to send as a PDF.
action.email.sendpdf Indicates whether to create and send the results as a PDF.
action.email.sendresults Indicates whether the search results are included in the email. The results can be attached or inline.
action.email.to List of recipient email addresses. Required if the email alert action is enabled.
action.email.ttl Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows <Integer>, int is the number of scheduled periods. Defaults to 86400 (24 hours).

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

Valid values are Integer[p].

cron_schedule The cron schedule to use for delivering the view. Scheduled views are dummy/noop scheduled saved searches that email a pdf version of a view

For example: */5 * * * * causes the search to execute every 5 minutes.

cron lets you use standard cron notation to define your scheduled search interval. In particular, cron can accept this type of notation: 00,20,40 * * * *, which runs the search every hour at hh:00, hh:20, hh:40. Along the same lines, a cron of 03,23,43 * * * * runs the search every hour at hh:03, hh:23, hh:43.

Splunk recommends that you schedule your searches so that they are staggered over time. This reduces system load. Running all of them every 20 minutes (*/20) means they would all launch at hh:00 (20, 40) and might slow your system every 20 minutes.

description Description of this scheduled view object.
disabled Indicates if the scheduled view is disabled.
is_scheduled Indicates if PDF delivery of this view is scheduled.
next_scheduled_time The next time when the view is delivered.

[ Top ]


scheduled/views/{name}

https://<host>:<mPort>/services/scheduled/views/{name}

Description

Manage the {name} scheduled view.

Method summary

Method Description Formats
DELETE Delete a scheduled view. XML, JSON
GET List the {name} scheduled view object. XML, JSON
POST Modify the {name} scheduled view. XML, JSON

DELETE scheduled/views/{name} method detail

Example

Request parameters

None

Response data keys

None


GET scheduled/views/{name} method detail

Example

Request parameters

None

Response data keys
Name Description
action.email Indicates the sate of the email action.
action.email.auth_password The password to use when authenticating with the SMTP server. Normally this value is set when editing the email settings, however you can set a clear text password here and it is encrypted on the next Splunk Enterprise restart.

Defaults to empty string.

action.email.auth_username The username to use when authenticating with the SMTP server. If this is empty string, no authentication is attempted. Defaults to empty string.

Note: Your SMTP server might reject unauthenticated emails.

action.email.bcc "BCC email address to use if action.email is enabled.
action.email.cc CC email address to use if action.email is enabled.
action.email.command The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.email.format Specify the format of text in the email. This value also applies to any attachments.<

Valid values: (plain | html | raw | csv)

action.email.from Email address from which the email action originates.

Defaults to splunk@$LOCALHOST or whatever value is set in alert_actions.conf.

action.email.hostname Sets the hostname used in the web link (url) sent in email actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

When this value is a simple hostname, the protocol and port which are configured within splunk are used to construct the base of the url.

When this value begins with 'http://', it is used verbatim. NOTE: This means the correct port must be specified if it is not the default port for http or https. This is useful in cases when the Splunk Enterprise server is not aware of how to construct an externally referencable url, such as SSO environments, other proxies, or when the Splunk Enterprise server hostname is not generally resolvable.

Defaults to current hostname provided by the operating system, or if that fails "localhost". When set to empty, default behavior is used.

action.email.inline Indicates whether the search results are contained in the body of the email.

Results can be either inline or attached to an email. See action.email.sendresults.

action.email.mailserver Set the address of the MTA server to be used to send the emails.

Defaults to <LOCALHOST> (or whatever is set in alert_actions.conf).

action.email.maxresults Sets the global maximum number of search results to send when email.action is enabled.
action.email.maxtime Specifies the maximum amount of time the execution of an email action takes before the action is aborted.
action.email.pdfview The name of the view to deliver if sendpdf is enabled.
action.email.preprocess_results Search string to preprocess results before emailing them. Defaults to empty string (no preprocessing).

Usually the preprocessing consists of filtering out unwanted internal fields.

action.email.reportPaperOrientation Specifies the paper orientation: portrait or landscape.
action.email.reportPaperSize Specifies the paper size for PDFs. Defaults to letter.

Valid values: (letter | legal | ledger | a2 | a3 | a4 | a5)

action.email.sendpdf Indicates whether to create and send the results as a PDF.
action.email.sendresults Indicates whether to attach the search results in the email.

Results can be either attached or inline. See action.email.inline.

action.email.subject Specifies the email subject.

Defaults to SplunkAlert-<savedsearchname>.

action.email.to List of recipient email addresses. Required if this search is scheduled and the email alert action is enabled.
action.email.track_alert Indicates whether the execution of this action signifies a trackable alert.
action.email.ttl Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows <Integer>, int is the number of scheduled periods. Defaults to 86400 (24 hours).

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

Valid values are Integer[p].

action.email.use_ssl Indicates whether to use SSL when communicating with the SMTP server
action.email.use_tls Indicates whether to use TLS (transport layer security) when communicating with the SMTP server (starttls).
cron_schedule The cron schedule to execute this search. For example: */5 * * * * causes the search to execute every 5 minutes.

cron lets you use standard cron notation to define your scheduled search interval. In particular, cron can accept this type of notation: 00,20,40 * * * *, which runs the search every hour at hh:00, hh:20, hh:40. Along the same lines, a cron of 03,23,43 * * * * runs the search every hour at hh:03, hh:23, hh:43.

Splunk recommends that you schedule your searches so that they are staggered over time. This reduces system load. Running all of them every 20 minutes (*/20) means they would all launch at hh:00 (20, 40) and might slow your system every 20 minutes.

Valid values: cron string

description Description of this saved search for this view.
disabled Indicates if the saved search for this view is disabled.
is_scheduled Indicates if this search is to be run on a schedule.
next_scheduled_time The next time when the view is delivered.

POST scheduled/views/{name} method detail

Example

Request parameters
Name Type Default Description
action.email.to
required
String Comma or semicolon separated list of email addresses to send the view to
action.email* String Wildcard argument that accepts any email action.
cron_schedule
required
String The cron schedule to use for delivering the view. Scheduled views are dummy/noop scheduled saved searches that email a pdf version of a view.

For example: */5 * * * * causes the search to execute every 5 minutes.

cron lets you use standard cron notation to define your scheduled search interval. In particular, cron can accept this type of notation: 00,20,40 * * * *, which runs the search every hour at hh:00, hh:20, hh:40. Along the same lines, a cron of 03,23,43 * * * * runs the search every hour at hh:03, hh:23, hh:43.

Splunk recommends that you schedule your searches so that they are staggered over time. This reduces system load. Running all of them every 20 minutes (*/20) means they would all launch at hh:00 (20, 40) and might slow your system every 20 minutes.

description String User readable description of this scheduled view object
disabled Boolean 0 Whether this object is enabled or disabled
is_scheduled
required
Boolean Whether this pdf delivery should be scheduled
next_scheduled_time String The next time when the view is delivered. Ignored on edit, here only for backwards compatability.
Response data keys
Name Description
action.email Indicates the status of the email action.
action.email.auth_password The password to use when authenticating with the SMTP server. Normally this value is set when editing the email settings, however you can set a clear text password here that is encrypted on the next Splunk Enterprise restart.

Defaults to empty string.

action.email.auth_username The username to use when authenticating with the SMTP server. If this is empty string, no authentication is attempted. Defaults to empty string.

Note: Your SMTP server might reject unauthenticated emails.

action.email.bcc BCC email address to use if action.email is enabled.
action.email.cc CC email address to use if action.email is enabled.
action.email.command The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.email.format Specify the format of text in the email. This value also applies to any attachments.<

Valid values: (plain | html | raw | csv)

action.email.from Email address from which the email action originates
action.email.hostname Sets the hostname used in the web link (url) sent in email actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

When this value is a simple hostname, the protocol and port which are configured within splunk are used to construct the base of the url.

When this value begins with 'http://', it is used verbatim. NOTE: This means the correct port must be specified if it is not the default port for http or https. This is useful in cases when the Splunk Enterprise server is not aware of how to construct an externally referencable url, such as SSO environments, other proxies, or when the Splunk Enterprise server hostname is not generally resolvable.

Defaults to current hostname provided by the operating system, or if that fails "localhost". When set to empty, default behavior is used.

action.email.inline Indicates whether the search results are contained in the body of the email.

Results can be either inline or attached to an email. See action.email.sendresults.

action.email.mailserver Set the address of the MTA server to be used to send the emails.

Defaults to <LOCALHOST> (or whatever is set in alert_actions.conf).

action.email.maxresults Sets the maximum number of search results sent using alerts.
action.email.maxtime Specifies the maximum amount of time the execution of an email action takes before the action is aborted.
action.email.pdfview The name of the view to deliver if sendpdf is enabled.
action.email.preprocess_results Search string to preprocess results before emailing them. Defaults to empty string (no preprocessing).

Usually the preprocessing consists of filtering out unwanted internal fields.

action.email.reportPaperOrientation Specifies the paper orientation: portrait or landscape.
action.email.reportPaperSize Specifies the paper size for PDFs. Defaults to letter.

Valid values: (letter | legal | ledger | a2 | a3 | a4 | a5)

action.email.sendpdf Indicates whether to create and send the results as a PDF.
action.email.sendresults Indicates whether to attach the search results in the email.

Results can be either attached or inline. See action.email.inline.

action.email.subject Specifies an email subject.

Defaults to SplunkAlert-<savedsearchname>.

action.email.to List of recipient email addresses. Required if this search is scheduled and the email alert action is enabled.
action.email.track_alert Indicates whether the execution of this action signifies a trackable alert.
action.email.ttl Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows <Integer>, int is the number of scheduled periods. Defaults to 86400 (24 hours).

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

Valid values are Integer[p].

action.email.use_ssl Indicates whether to use SSL when communicating with the SMTP server.
action.email.use_tls Indicates whether to use TLS (transport layer security) when communicating with the SMTP server (starttls).
cron_schedule The cron schedule to execute this search. For example: */5 * * * * causes the search to execute every 5 minutes.

cron lets you use standard cron notation to define your scheduled search interval. In particular, cron can accept this type of notation: 00,20,40 * * * *, which runs the search every hour at hh:00, hh:20, hh:40. Along the same lines, a cron of 03,23,43 * * * * runs the search every hour at hh:03, hh:23, hh:43.

Splunk recommends that you schedule your searches so that they are staggered over time. This reduces system load. Running all of them every 20 minutes (*/20) means they would all launch at hh:00 (20, 40) and might slow your system every 20 minutes.

Valid values: cron string

description Description of the saved search for this view.
disabled Indicates if the saved search for this view is disabled.
is_scheduled Indicates if this search is to be run on a schedule.
next_scheduled_time The next time when the view is delivered.

[ Top ]


scheduled/views/{name}/dispatch

https://<host>:<mPort>/services/scheduled/views/{name}/dispatch

Description

Dispatch the scheduled search associated with the {name} scheduled view.

Method summary

Method Description Formats
POST Dispatch the scheduled search associated with the {name} scheduled view. XML, JSON

POST scheduled/views/{name}/dispatch method detail

Example

Request parameters
Name Type Default Description
args.* String Wildcard argument that accepts any saved search template argument, such as arg.username=foobar when the search is search $username$.
dispatch.* String Wildcard argument that accepts any dispatch related argument.
dispatch.now Boolean Dispatch the search as if the specified time for this parameter was the current time.
force_dispatch Boolean Indicates whether to start a new search even if another instance of this search is already running.
now String [Deprecated] Use dispatch.now.
trigger_actions Boolean Indicates whether to trigger alert actions
Response data keys

None

[ Top ]


scheduled/views/{name}/history

https://<host>:<mPort>/services/scheduled/views/{name}/history

Description

Get a list of search jobs used to render the {name} scheduled view.

Method summary

Method Description Formats
GET Get a list of search jobs used to render the {name} scheduled view. XML, JSON

GET scheduled/views/{name}/history method detail

Example

Request parameters

None

Response data keys

None

[ Top ]


scheduled/views/{name}/reschedule

https://<host>:<mPort>/services/scheduled/views/{name}/reschedule

Description

Schedule when to deliver a PDF of the view.

Method summary

Method Description Formats
POST Schedule when to deliver a PDF of the view. XML, JSON

POST scheduled/views/{name}/reschedule method detail

Example

Request parameters
Name Type Default Description
schedule_time String Absolute or relative schedule time.
Response data keys

None

Application usage

If schedule_time is not specified, then it is assumed that the delivery should occur as soon as possible.

[ Top ]


scheduled/views/{name}/scheduled_times

https://<host>:<mPort>/services/scheduled/views/{name}/scheduled_times

Description

Get scheduled view times.

Method summary

Method Description Formats
GET Get scheduled view times. XML, JSON

GET scheduled/views/{name}/scheduled_times method detail

Example

Request parameters
Name Type Default Description
earliest_time String Absolute or relative earliest time
latest_time String Absolute or relative latest time
Response data keys
Name Description
action.email Indicates the state of the email action.
action.email.auth_password The password to use when authenticating with the SMTP server. Normally this value is set when editing the email settings, however you can set a clear text password here that is encrypted on the next Splunk Enterprise restart.

Defaults to empty string.

action.email.auth_username The username to use when authenticating with the SMTP server. If this is empty string, no authentication is attempted. Defaults to empty string.

Note: Your SMTP server might reject unauthenticated emails.

action.email.bcc BCC email address to use if action.email is enabled.
action.email.cc CC email address to use if action.email is enabled.
action.email.command The search command (or pipeline) which is responsible for executing the action.

Generally the command is a template search pipeline which is realized with values from the saved search. To reference saved search field values wrap them in $, for example to reference the savedsearch name use $name$, to reference the search use $search$.

action.email.format Specify the format of text in the email. This value also applies to any attachments.<

Valid values: (plain | html | raw | csv)

action.email.from Email address from which the email action originates.
action.email.hostname Sets the hostname used in the web link (url) sent in email actions.

This value accepts two forms:

hostname (for example, splunkserver, splunkserver.example.com)

protocol://hostname:port (for example, http://splunkserver:8000, https://splunkserver.example.com:443)

When this value is a simple hostname, the protocol and port which are configured within splunk are used to construct the base of the url.

When this value begins with 'http://', it is used verbatim. NOTE: This means the correct port must be specified if it is not the default port for http or https. This is useful in cases when the Splunk Enterprise server is not aware of how to construct an externally referencable url, such as SSO environments, other proxies, or when the Splunk Enterprise server hostname is not generally resolvable.

Defaults to current hostname provided by the operating system, or if that fails "localhost". When set to empty, default behavior is used.

action.email.inline Indicates whether the search results are contained in the body of the email.

Results can be either inline or attached to an email. See action.email.sendresults.

action.email.mailserver Set the address of the MTA server to be used to send the emails.

Defaults to <LOCALHOST> (or whatever is set in alert_actions.conf).

action.email.maxresults Sets the maximum number of search results sent using alerts.
action.email.maxtime Specifies the maximum amount of time the execution of an email action takes before the action is aborted.
action.email.pdfview The name of the view to deliver if sendpdf is enabled.
action.email.preprocess_results Search string to preprocess results before emailing them. Defaults to empty string (no preprocessing).

Usually the preprocessing consists of filtering out unwanted internal fields.

action.email.reportPaperOrientation Specifies the paper orientation: portrait or landscape.
action.email.reportPaperSize Specifies the paper size for PDFs. Defaults to letter.

Valid values: (letter | legal | ledger | a2 | a3 | a4 | a5)

action.email.reportServerEnabled Not supported.
action.email.reportServerURL Not supported.
action.email.sendpdf Indicates whether to create and send the results as a PDF.
action.email.sendresults Indicates whether to attach the search results in the email.

Results can be either attached or inline. See action.email.inline.

action.email.subject Specifies an email subject.

Defaults to SplunkAlert-<savedsearchname>.

action.email.to List of recipient email addresses. Required if this search is scheduled and the email alert action is enabled.
action.email.track_alert Indicates whether the execution of this action signifies a trackable alert.
action.email.ttl Specifies the minimum time-to-live in seconds of the search artifacts if this action is triggered. If p follows <Integer>, int is the number of scheduled periods. Defaults to 86400 (24 hours).

If no actions are triggered, the artifacts have their ttl determined by dispatch.ttl in savedsearches.conf.

Valid values are Integer[p].

action.email.use_ssl Indicates whether to use SSL when communicating with the SMTP server.
action.email.use_tls Indicates whether to use TLS (transport layer security) when communicating with the SMTP server (starttls).
action.email.width_sort_columns Indicates whether columns should be sorted from least wide to most wide, left to right.

Only valid if format=text.

cron_schedule The cron schedule to execute this search. For example: */5 * * * * causes the search to execute every 5 minutes.

cron lets you use standard cron notation to define your scheduled search interval. In particular, cron can accept this type of notation: 00,20,40 * * * *, which runs the search every hour at hh:00, hh:20, hh:40. Along the same lines, a cron of 03,23,43 * * * * runs the search every hour at hh:03, hh:23, hh:43.

Splunk recommends that you schedule your searches so that they are staggered over time. This reduces system load. Running all of them every 20 minutes (*/20) means they would all launch at hh:00 (20, 40) and might slow your system every 20 minutes.

Valid values: cron string

description Description of the saved search for this view.
disabled Indicates if the saved search for this view is disnabled.

Disabled saved searches are not visible in Splunk Web.

is_scheduled Indicates if this search is to be run on a schedule.
next_scheduled_time The next time when the view is delivered.
Application usage

Specify a time range for the data returned using earliest_time and latest_time parameters.

[ Top ]


search/jobs

https://<host>:<mPort>/services/search/jobs

Description

List search jobs.

Refer to Creating searches using the REST API for information on using this endpoint and other search endpoints.

Method summary

Method Description Formats
GET Get details of all current searches. XML, JSON
POST Starts a new search, returning the search ID (<sid>). XML, JSON

GET search/jobs method detail

Example

Request parameters

Pagination and filtering parameters can be used with this method.

Response data keys
Name Description
cursorTime The earliest time from which no events are later scanned.

Can be used to indicate progress. See description for doneProgress.

custom Custom job property. (See the search/jobs POST request for an example of how to create a custom property.)
delegate For saved searches, specifies jobs that were started by the user. Defaults to scheduler.
diskUsage The total amount of disk space used, in bytes.
dispatchState The state of the search. Can be any of QUEUED, PARSING, RUNNING, PAUSED, FINALIZING, FAILED, DONE.
doneProgress A number between 0 and 1.0 that indicates the approximate progress of the search.

doneProgress = (latestTime – cursorTime) / (latestTime – earliestTime)

dropCount For real-time searches only, the number of possible events that were dropped due to the rt_queue_size (default to 100000).
earliestTime The earliest time a search job is configured to start.

Can be used to indicate progress. See description for doneProgress.

eventAvailableCount The number of events that are available for export.
eventCount The number of events returned by the search.
eventFieldCount The number of fields found in the search results.
eventIsStreaming Indicates if the events of this search are being streamed.
eventIsTruncated Indicates if events of the search are not stored, making them unavailable from the events endpoint for the search.
eventSearch Subset of the entire search that is before any transforming commands. The timeline and events endpoint represents the result of this part of the search.
eventSorting Indicates if the events of this search are sorted, and in which order.

asc = ascending;

desc = descending;

none = not sorted

isDone Indicates if the search has completed.
isFailed Indicates if there was a fatal error executing the search. For example, invalid search string syntax.
isFinalized Indicates if the search was finalized (stopped before completion).
isPaused Indicates if the search is paused.
isPreviewEnabled Indicates if previews are enabled.
isRealTimeSearch Indicates if the search is a real time search.
isRemoteTimeline Indicates if the remote timeline feature is enabled.
isSaved Indicates that the search job is saved, storing search artifacts on disk for 7 days from the last time that the job was viewed or touched. Add or edit the default_save_ttl value in limits.conf to override the default value of 7 days.
isSavedSearch Indicates if this is a saved search run using the scheduler.
isZombie Indicates if the process running the search is dead, but with the search not finished.
keywords All positive keywords used by this search. A positive keyword is a keyword that is not in a NOT clause.
label Custom name created for this search.
latestTime The latest time a search job is configured to start.

Can be used to indicate progress. See description for doneProgress.

messages Errors and debug messages.
numPreviews Number of previews generated so far for this search job.
performance A representation of the execution costs.
priority An integer between 0-10 that indicates the search priority.

The priority is mapped to the OS process priority. The higher the number the higher the priority. The priority can be changed using action parameter for POST search/jobs/{search_id}/control. For example, for the action parameter, specify priority=5.

Note: In *nix systems, non-privileged users can only reduce the priority of a process.

remoteSearch The search string that is sent to every search peer.
reportSearch If reporting commands are used, the reporting search.
request GET arguments that the search sends to splunkd.
resultCount The total number of results returned by the search. In other words, this is the subset of scanned events (represented by the scanCount) that actually matches the search terms.
resultIsStreaming Indicates if the final results of the search are available using streaming (for example, no transforming operations).
resultPreviewCount The number of result rows in the latest preview results.
runDuration Time in seconds that the search took to complete.
scanCount The number of events that are scanned or read off disk.
searchEarliestTime Specifies the earliest time for a search, as specified in the search command rather than the earliestTime parameter. It does not snap to the indexed data time bounds for all-time searches (something that earliestTime/latestTime does).
searchLatestTime Specifies the latest time for a search, as specified in the search command rather than the latestTime parameter. It does not snap to the indexed data time bounds for all-time searches (something that earliestTime/latestTime does).
searchProviders A list of all the search peers that were contacted.
sid The search ID number.
statusBuckets Maximum number of timeline buckets.
ttl The time to live, or time before the search job expires after it completes.
Application usage

The user ID is implied by the authentication to the call.

Information returned for each entry includes the search job properties, such as eventCount (number of events returned), runDuration (time the search took to complete), and others. The parameters to POST /search/jobs provides details on search job properties when creating a search. Search job properties are also described in Search job properties in the Knowledge Manager Manual.

You can specify optional arguments based on the search job properties to filter the entries returned. For example, specify search=eventCount>100 as an argument to the GET operation to return searches with event counts greater than 100.

The dispatchState property is of particular interest to determine the state of a search, and can contain the following values:

   QUEUED 
   PARSING 
   RUNNING 
   PAUSED 
   FINALIZING 
   FAILED 
   DONE 

This operation also returns performance information for the search. For more information refer to "View search job properties with the Search Job Inspector" in the Knowledge Manager Manual.

For more information on searches in Splunk Enterprise, refer to the Splunk Search Reference.


POST search/jobs method detail

Example

Request parameters
Name Type Default Description
auto_cancel Number 0 If specified, the job automatically cancels after this many seconds of inactivity. (0 means never auto-cancel)
auto_finalize_ec Number 0 Auto-finalize the search after at least this many events are processed.

Specify 0 to indicate no limit.

auto_pause Number 0 If specified, the search job pauses after this many seconds of inactivity. (0 means never auto-pause.)

To restart a paused search job, specify unpause as an action to POST search/jobs/{search_id}/control.

auto_pause only goes into effect once. Unpausing after auto_pause does not put auto_pause into effect again.

custom String Specify a custom parameter (see example).
earliest_time String Specify a time string. Sets the earliest (inclusive), respectively, time bounds for the search.

The time string can be either a UTC time (with fractional seconds), a relative time specifier (to now) or a formatted time string. Refer to Time modifiers for search for information and examples of specifying a time string.

Compare to index_earliest parameter. Also see comment for the search_mode parameter.

enable_lookups Boolean true Indicates whether lookups should be applied to events.

Specifying true (the default) may slow searches significantly depending on the nature of the lookups.

exec_mode Enum normal Valid values: (blocking | oneshot | normal)

If set to normal, runs an asynchronous search.

If set to blocking, returns the sid when the job is complete.

If set to oneshot, returns results in the same call. In this case, you can specify the format for the output (for example, json output) using the output_mode parameter as described in GET search/jobs/export. Default format for output is xml.

force_bundle_replication Boolean false Specifies whether this search should cause (and wait depending on the value of sync_bundle_replication) for bundle synchronization with all search peers.
id String Optional string to specify the search ID (<sid>). If unspecified, a random ID is generated.
index_earliest String Specify a time string. Sets the earliest (inclusive), respectively, time bounds for the search, based on the index time bounds.

The time string can be either a UTC time (with fractional seconds), a relative time specifier (to now) or a formatted time string. Compare to earliest_time parameter. Also see comment for the search_mode parameter.

Refer to Time modifiers for search for information and examples of specifying a time string.

index_latest String Specify a time string. Sets the latest (exclusive), respectively, time bounds for the search, based on the index time bounds.

The time string can be either a UTC time (with fractional seconds), a relative time specifier (to now) or a formatted time string.

Refer to Time modifiers for search for information and examples of specifying a time string.

Compare to latest_time parameter. Also see comment for the search_mode parameter.

indexedRealtime Boolean Indicate whether or not to used indexed-realtime mode for real-time searches.
indexedRealtimeOffset Number Set disk sync delay for indexed real-time search (seconds).
latest_time String Specify a time string. Sets the latest (exclusive), respectively, time bounds for the search.

The time string can be either a UTC time (with fractional seconds), a relative time specifier (to now) or a formatted time string.

Refer to Time modifiers for search for information and examples of specifying a time string.

Compare to index_latest parameter. Also see comment for the search_mode parameter.

max_count Number 10000 The number of events that can be accessible in any given status bucket.

Also, in transforming mode, the maximum number of results to store. Specifically, in all calls, codeoffset+count <= max_count.

max_time Number 0 The number of seconds to run this search before finalizing. Specify 0 to never finalize.
namespace String The application namespace in which to restrict searches.

The namespace corresponds to the identifier recognized in the /services/apps/local endpoint.

now String current system time Specify a time string to set the absolute time used for any relative time specifier in the search. Defaults to the current system time.

You can specify a relative time modifier for this parameter. For example, specify +2d to specify the current time plus two days.

If you specify a relative time modifier both in this parameter and in the search string, the search string modifier takes precedence.

Refer to Time modifiers for search for details on specifying relative time modifiers.

reduce_freq Number 0 Determines how frequently to run the MapReduce reduce phase on accumulated map values.
reload_macros Boolean true Specifies whether to reload macro definitions from macros.conf.

Default is true.

remote_server_list String empty list Comma-separated list of (possibly wildcarded) servers from which raw events should be pulled. This same server list is to be used in subsearches.
required_field_list String empty list [Deprecated] Use rf.

A comma-separated list of required fields that, even if not referenced or used directly by the search, is still included by the events and summary endpoints. Splunk Web uses these fields to prepopulate panels in the Search view.

reuse_max_seconds_ago Number Specifies the number of seconds ago to check when an identical search is started and return the job's search ID instead of starting a new job.
rf String Adds a required field to the search. There can be multiple rf POST arguments to the search.

These fields, even if not referenced or used directly by the search, are still included by the events and summary endpoints. Splunk Web uses these fields to prepopulate panels in the Search view.

Consider using this form of passing the required fields to the search instead of the deprecated required_field_list. If both rf and required_field_list are provided, the union of the two lists is used.

rt_blocking Boolean false For a real-time search, indicates if the indexer blocks if the queue for this search is full.
rt_indexfilter Boolean true For a real-time search, indicates if the indexer prefilters events.
rt_maxblocksecs Number 60 For a real-time search with rt_blocking set to true, the maximum time to block.

Specify 0 to indicate no limit.

rt_queue_size Number 10000 events For a real-time search, the queue size (in events) that the indexer should use for this search.
search
required
String The search language string to execute, taking results from the local and remote servers.

Examples:

"search *"
"search * | outputcsv"
search_listener String Registers a search state listener with the search.

Use the format:

search_state;results_condition;http_method;uri;

For example:

search_listener=onResults;true;POST;/servicesNS/admin/search/saved/search/foobar/notify;

search_mode Enum normal Valid values: (normal | realtime)

If set to realtime, search runs over live data. A real-time search may also be indicated by earliest_time and latest_time variables starting with 'rt' even if the search_mode is set to normal or is unset. For a real-time search, if both earliest_time and latest_time are both exactly 'rt', the search represents all appropriate live data received since the start of the search.

Additionally, if earliest_time and/or latest_time are 'rt' followed by a relative time specifiers then a sliding window is used where the time bounds of the window are determined by the relative time specifiers and are continuously updated based on the wall-clock time.

spawn_process Boolean true Specifies whether the search should run in a separate spawned process. Default is true.

Searches against indexes must run in a separate process.

status_buckets Number 0 The most status buckets to generate.

0 indicates to not generate timeline information.

sync_bundle_replication Boolean Specifies whether this search should wait for bundle replication to complete.
time_format String %FT%T.%Q%:z Used to convert a formatted time string from {start,end}_time into UTC seconds. The default value is the ISO-8601 format.
timeout Number 86400 The number of seconds to keep this search after processing has stopped.
Response data keys

None

Application usage

Refer to Creating searches using the REST API for information on using this endpoint and other search endpoints.

The search parameter is a search language string that specifies the search. Often you create a search specifying just the search parameter. Use the other parameters to customize a search to specific needs.

Use the returned (<sid>) in the following endpoints to view and manage the search:

   search/jobs/{search_id}: View the status of this search job. 
   search/jobs/{search_id}/control: Execute job control commands, such as pause, cancel, preview, and others. 
   search/jobs/{search_id}/events: View a set of untransformed events for the search. 
   search/jobs/{search_id}/results: View results of the search. 
   search/jobs/{search_id}/results_preview: Preview results of a search that has not completed 
   search/jobs/{search_id}/search.log: View the log file generated by the search. 
   search/jobs/{search_id}/summary: View field summary information 
   search/jobs/{search_id}/timeline: View event distribution over time. 

You can also use the custom attribute to create custom job properties (see example).

For more information on searches in Splunk Enterprise, refer to the Splunk Search Reference.

[ Top ]

search/jobs/export

https://<host>:<mPort>/services/search/jobs/export

Description

Run a search and stream results as they become available.

Method summary

Method Description Formats
POST Run a search similarly to a POST on search/jobs. Stream search results. XML, JSON


POST search/jobs/export method detail

Example

Request parameters
Name Type Default Description
auto_cancel Number Same as for POST search/jobs.
auto_finalize_ec Number Same as for POST search/jobs.
auto_pause Number Same as for POST search/jobs.
earliest_time String Same as for POST search/jobs.
enable_lookups Bool Same as for POST search/jobs.
force_bundle_replication Bool Same as for POST search/jobs.
id String Same as for POST search/jobs.
index_earliest String Specify a time string. Sets the earliest (inclusive), respectively, time bounds for the search, based on the index time.

The time string can be either a UTC time (with fractional seconds), a relative time specifier (to now) or a formatted time string.

Refer to Time modifiers for search for information and examples of specifying a time string.

index_latest String Specify a time string. Sets the latest (inclusive), respectively, time bounds for the search, based on the index time.

The time string can be either a UTC time (with fractional seconds), a relative time specifier (to now) or a formatted time string.

Refer to Time modifiers for search for information and examples of specifying a time string.

latest_time String Same as for POST search/jobs.
max_time Number Same as for POST search/jobs.
namespace String Same as for POST search/jobs.
now String Same as for POST search/jobs.
output_mode Enum xml Valid values: (atom | csv | json | json_cols | json_rows | raw | xml)

Specifies the format for the returned output.

reduce_freq Number Same as for POST search/jobs.
reload_macros Bool Same as for POST search/jobs.
remote_server_list String Same as for POST search/jobs.
required_field_list String Same as for POST search/jobs.
rf String Same as for POST search/jobs.
rt_blocking Bool Same as for POST search/jobs.
rt_indexfilter Bool Same as for POST search/jobs.
rt_maxblocksecs Number Same as for POST search/jobs.
rt_queue_size Number Same as for POST search/jobs.
search
required
String Same as for POST search/jobs.
search_listener String Same as for POST search/jobs.
search_mode Enum Same as for POST search/jobs.
sync_bundle_replication Bool Same as for POST search/jobs.
time_format String Same as for POST search/jobs.
timeout Number Same as for POST search/jobs.
Response data keys

None

Application usage

Performs a search identical to POST search/jobs, except the search does not create a search ID (<sid>) and the search streams results as they become available. Streaming of results is based on the search string.

For non-streaming searches, previews of the final results are available if preview is enabled. If preview is not enabled, it is better to use search/jobs with exec_mode=oneshot.

For searches that return extremely large result sets, consider using a POST to search/jobs with exec_mode=blocking.

search/jobs/{search_id}

https://<host>:<mPort>/services/search/jobs/{search_id}

Description

Manage the {search_id} search job.

Method summary

Method Description Formats
DELETE Delete the {search_id} search job. XML, JSON
GET Get information about the {search_id} search job. XML, JSON
POST Update the {search_id} search job. XML, JSON

DELETE search/jobs/{search_id} method detail

Example

Request parameters

None

Response data keys

None

Application usage

{search_id} is the <sid> field returned from the GET operation for the search/jobs endpoint.


GET search/jobs/{search_id} method detail

Example

Request parameters

None

Response data keys

None

Application usage

The user ID is implied by the authentication to the call.

Information returned includes the search job properties, such as eventCount (number of events returned), runDuration (time the search took to complete), and others. The parameters to POST /search/jobs provides details on search job properties when creating a search. Search job properties are also described in "View search job properties with the Search Job Inspector" in the Knowledge Manager Manual.

The dispatchState property is of particular interest to determine the state of a search, and can contain the following values:

   QUEUED 
   PARSING 
   RUNNING 
   PAUSED 
   FINALIZING 
   FAILED 
   DONE 

This operation also returns performance information for the search. For more information refer to "View search job properties with the Search Job Inspector" in the Knowledge Manager Manual.

For more information on searches in Splunk, refer to the Splunk Search Reference.

POST /search/jobs returns a <sid> for a search. You can also get a search ID from the <sid> field returned from GET search/jobs.


POST search/jobs/{search_id} method detail

Example

Request parameters
Name Type Default Description
custom.*
required
String Specify custom job properties for the specified search job.
Response data keys

None

[ Top ]


search/jobs/{search_id}/control

https://<host>:<mPort>/services/search/jobs/{search_id}/control

Description

Run a job control command for the {search_id} search.

Method summary

Method Description Formats
POST Run a job control command for the {search_id} search. XML, JSON

POST search/jobs/{search_id}/control method detail

Example

Request parameters
Name Type Default Description
action
required
Enum Valid values: (pause | unpause | finalize | cancel | touch | setttl | setpriority | enablepreview | disablepreview)

The control action to execute.

pause: Suspends the execution of the current search.

unpause: Resumes the execution of the current search, if paused.

finalize: Stops the search, and provides intermediate results to the /results endpoint.

cancel: Stops the current search and deletes the result cache.

touch: Extends the expiration time of the search to now + ttl

setttl: Change the ttl of the search. Arguments: ttl=<number>

setpriority: Sets the priority of the search process. Arguments: priority=<0-10>

enablepreview: Enable preview generation (may slow search considerably).

disablepreview: Disable preview generation.

save: saves the search job, storing search artifacts on disk for 7 days. Add or edit the default_save_ttl value in limits.conf to override the default value of 7 days.

unsave: Disables any action performed by save.

Response data keys

None

[ Top ]


search/jobs/{search_id}/events

https://<host>:<mPort>/services/search/jobs/{search_id}/events

Description

Get {search_id} search events.

Method summary

Method Description Formats
GET Get {search_id} search events. XML, JSON

GET search/jobs/{search_id}/events method detail

Example

Request parameters
Name Type Default Description
count Number 100 The maximum number of results to return. If value is set to 0, then all available results are returned. Default value is 100.
earliest_time String A time string representing the earliest (inclusive), respectively, time bounds for the results to be returned. If not specified, the range applies to all results found.
f String A field to return for the event set.

You can pass multiple POST f arguments if multiple field are required. If field_list and f are provided, the union of the lists is used.

field_list String * [Deprecated] Use f.

A comma-separated list of the fields to return for the event set.

latest_time String A time string representing the latest (exclusive), respectively, time bounds for the results to be returned. If not specified, the range applies to all results found.
max_lines Number 0 The maximum lines that any single event _raw field should contain.

Specify 0 to specify no limit.

offset Number 0 The first result (inclusive) from which to begin returning data.

This value is 0-indexed. Default value is 0.

In 4.1+, negative offsets are allowed and are added to count to compute the absolute offset (for example, offset=-1 is the last available offset. Offsets in the results are always absolute and never negative.

output_mode Enum xml Valid values: (atom | csv | json | json_cols | json_rows | raw | xml)

Specifies the format for the returned output.

output_time_format String time_format Formats a UTC time. Defaults to what is specified in time_format.
search String The post processing search to apply to results. Can be any valid search language string.
segmentation String raw The type of segmentation to perform on the data. This incudes an option to perform k/v segmentation.
time_format String %m/%d/%Y:%H:%M:%S Expression to convert a formatted time string from {start,end}_time into UTC seconds.
truncation_mode Enum abstract Valid values: (abstract | truncate)

Specifies how "max_lines" should be achieved.

Response data keys

None

Application usage

These events are the data from the search pipeline before the first "transforming" search command. This is the primary method for a client to fetch a set of UNTRANSFORMED events for the search job.

This endpoint is only valid if the status_buckets > 0 or the search has no transforming commands.

[ Top ]


search/jobs/{search_id}/results

https://<host>:<mPort>/services/search/jobs/{search_id}/results

Description

Get {search_id} search results.

Method summary

Method Description Formats
GET Get {search_id} search results. XML, JSON

GET search/jobs/{search_id}/results method detail

Example

Request parameters
Name Type Default Description
count Number 100 The maximum number of results to return. If value is set to 0, then all available results are returned.
f String A field to return for the event set.

You can pass multiple POST f arguments if multiple field are required. If field_list and f are provided the union of the lists is used.

field_list String [Deprecated] Use f.

Specify a comma-separated list of the fields to return for the event set.

offset Number 0 The first result (inclusive) from which to begin returning data.

This value is 0-indexed. Default value is 0.

In 4.1+, negative offsets are allowed and are added to count to compute the absolute offset (for example, offset=-1 is the last available offset).

Offsets in the results are always absolute and never negative.

output_mode Enum xml Valid values: (atom | csv | json | json_cols | json_rows | raw | xml)

Specifies the format for the returned output.

search String The post processing search to apply to results. Can be any valid search language string.
Response data keys

None

Application usage

This is the table that exists after all processing from the search pipeline has completed.

This is the primary method for a client to fetch a set of TRANSFORMED events. If the dispatched search does not include a transforming command, the effect is the same as get_events, however with fewer options.

[ Top ]


search/jobs/{search_id}/results_preview

https://<host>:<mPort>/services/search/jobs/{search_id}/results_preview

Description

Preview {search_id} search results.

Method summary

Method Description Formats
GET Preview {search_id} search results. XML, JSON

GET search/jobs/{search_id}/results_preview method detail

Example

Request parameters
Name Type Default Description
count Number 100 The maximum number of results to return.

If value is set to 0, then all available results are returned.

f String A field to return for the event set.

You can pass multiple POST f arguments if multiple field are required. If field_list and f are provided the union of the lists is used.

field_list String [Deprecated] Use f.

A comma-separated list of the fields to return for the event set.

offset Number 0 The first result (inclusive) from which to begin returning data.

This value is 0-indexed. Default value is 0.

output_mode Enum xml Valid values: (atom | csv | json | json_cols | json_rows | raw | xml)

Specifies the format for the returned output.

search String The post processing search to apply to results. Can be any valid search language string.
Response data keys

None

Application usage

Returns the intermediate preview results of the search specified by {search_id}. When the job is complete, this gives the same response as /search/jobs/{search_id}/results. Preview is enabled for real-time searches and for searches where status_buckets > 0.

[ Top ]


search/jobs/{search_id}/search.log

https://<host>:<mPort>/services/search/jobs/{search_id}/search.log

Description

Get the {search_id} search log.

Method summary

Method Description Formats
GET Get the {search_id} search log. XML, JSON

GET search/jobs/{search_id}/search.log method detail

Example

Request parameters
Name Type Default Description
attachment Boolean false If true, returns search.log as an attachment. Otherwise, streams search.log.
Response data keys

None

[ Top ]


search/jobs/{search_id}/summary

https://<host>:<mPort>/services/search/jobs/{search_id}/summary

Description

Get the getFieldsAndStats output of the events to-date, for the search_id search.

Method summary

Method Description Formats
GET Get the getFieldsAndStats output of the events to-date, for the search_id search. XML, JSON

GET search/jobs/{search_id}/summary method detail

Example

Request parameters
Name Type Default Description
earliest_time String Time string representing the earliest (inclusive), respectively, time bounds for the search.

The time string can be either a UTC time (with fractional seconds), a relative time specifier (to now) or a formatted time string. (Also see comment for the search_mode variable.)

f String A field to return for the event set.

You can pass multiple POST f arguments if multiple field are required. If field_list and f are provided, the union of the lists is used.

field_list String [Deprecated] Use f.

A comma-separated list of the fields to return for the event set.

histogram Boolean false Indicates whether to add histogram data to the summary output.
latest_time String Time string representing the latest (exclusive), respectively, time bounds for the search.
min_freq Number 0 For each key, the fraction of results this key must occur in to be displayed.

Express the fraction as a number between 0 and 1.

output_time_format String time_format Formats a UTC time.
search String Empty string Specifies a substring that all returned events should contain either in one of their values or tags.
time_format String %m/%d/%Y:%H:%M:%S Expression to convert a formatted time string from {start,end}_time into UTC seconds.
top_count Number 10 For each key, specifies how many of the most frequent items to return.
Response data keys

None

Application usage

This endpoint is only valid when status_buckets > 0. To guarantee a set of fields in the summary, when creating the search, use the required_fields_list or rf parameters.

[ Top ]


search/jobs/{search_id}/timeline

https://<host>:<mPort>/services/search/jobs/{search_id}/timeline

Description

Get event distribution over time of the untransformed events read to-date, for the search_id search.

Method summary

Method Description Formats
GET Get event distribution over time of the untransformed events read to-date, for the search_id search. XML, JSON

GET search/jobs/{search_id}/timeline method detail

The output from this endpoint provides values for the following fields:

Field Description
c Event count
a Available. Not all events in a bucket are retrievable. Generally capped at 10000.
t Time in epoch seconds
d Bucket size (time)
f Indicates if the search finished scanning events from the time range of this bucket.
etz Timezone offset, in seconds, for the earliest time of this bucket.

etz and ltz are different if the buckets are months or days and you have a DST change during the middle.

ltz Timezone offset, in seconds, for the latest time of this bucket.

Example

Request parameters
Name Type Default Description
output_time_format String time_format Formats a UTC time.
time_format String %m/%d/%Y:%H:%M:%S Expression to convert a formatted time string from {start,end}_time into UTC seconds.
Response data keys

None

Application usage

This endpoint is only valid when status_buckets > 0. To guarantee a set of fields in the summary, when creating the search, use the required_fields_list or rf parameters.

[ Top ]


search/parser

https://<host>:<mPort>/services/search/parser

Authentication: Required

Description

Provide search language parsing services.

Method summary

Method Description Formats
GET Parses Splunk search language and returns semantic map. XML, JSON

GET search/parser method detail

Example

Request parameters
Name Type Default Description
enable_lookups Boolean false If true, reverse lookups are done to expand the search expression.
output_mode String xml Specify output formatting. Select from either:
xml: XML formatting
json: JSON formatting
parse_only Boolean false If true, disables expansion of search due evaluation of subsearches, time term expansion, lookups, tags, eventtypes, sourcetype alias.
q
required
String The search string to parse.
reload_macros Boolean true If true, reload macro definitions from macros.conf.
Response data keys

None

[ Top ]


search/timeparser

https://<host>:<mPort>/services/search/timeparser

Description

Time argument parse.

Method summary

Method Description Formats
GET Get a lookup table of time arguments to absolute timestamps. XML, JSON

GET search/timeparser method detail

Example

Request parameters
Name Type Default Description
now String The time to use as current time for relative time identifiers.

Can itself either be a relative time (from the real "now" time) or an absolute time in the format specified by time_format.

output_time_format String %FT%T.%Q%:z Used to format a UTC time. Defaults to the value of time_format.
time
required
String The time argument to parse.

Acceptable inputs are either a relative time identifier or an absolute time. Multiple time arguments can be passed by specifying multiple time parameters.

time_format String %FT%T.%Q%:z The format (strftime) of the absolute time format passed in time.

This field is not used if a relative time identifier is provided. For absolute times, the default value is the ISO-8601 format.

Response data keys

None

[ Top ]


search/typeahead

https://<host>:<mPort>/services/search/typeahead

Description

Get search string auto-complete suggestions.

Method summary

Method Description Formats
GET Get a list of words or descriptions for possible auto-complete terms. XML, JSON

GET search/typeahead method detail

Example

Request parameters
Name Type Default Description
count
required
Number The number of items to return for this term.
output_mode String csv Specify output formatting. Select from:
csv: CSV formatting
xml: XML formatting
json: JSON formatting
prefix
required
String The term for which to return typeahead results.
Response data keys

None

[ Top ]

PREVIOUS
Output endpoint examples
  NEXT
Search endpoint examples

This documentation applies to the following versions of Splunk® Enterprise: 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.2.4, 6.2.5, 6.2.6, 6.2.7, 6.2.8, 6.2.9, 6.2.10, 6.2.11, 6.2.12, 6.2.13, 6.2.14, 6.2.15


Was this documentation topic helpful?

Enter your email address, and someone from the documentation team will respond to you:

Please provide your comments here. Ask a question or make a suggestion.

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

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters