Using the REST API reference
Use the REST API Reference to learn about available endpoints and operations for accessing, creating, updating, or deleting resources. See the REST API User Manual to learn about the Splunk REST API basic concepts.
Splunk Cloud Platform REST API usage
There are some REST API access and usage differences between Splunk Cloud Platform and Splunk Enterprise. If you are using Splunk Cloud Platform, review details in Access requirements and limitations for the Splunk Cloud Platform REST API.
Splunk REST API admin endpoints
Splunk does not support or document REST API endpoints that contain
/admin/ in their URIs. Use the corresponding publicly documented endpoint instead.
Resources are grouped into the following categories.
|Access control||Authorize and authenticate users.|
|Federated search||Manage federated providers and federated indexes.|
|Knowledge||Define indexed and searched data configurations.|
|Metrics Catalog||Enumerate metrics and dimensions associated with metrics.|
|Search||Manage searches and search-generated alerts and view objects.|
Splunk Cloud Platform supports a subset of the REST API endpoints available in Splunk Enterprise. For a full list of endpoints supported in Splunk Enterprise, see Resource groups in the Splunk Enterprise REST API Reference Manual.
See the Endpoints reference list for an alphabetical list of endpoints.
Depending on the endpoint, GET, POST, and/or DELETE operations are available for accessing, creating, updating, or deleting resources. Some operations have specific capability requirements, as noted.
Using endpoint reference entries
Reference information for each endpoint in the REST API includes the following items.
- Usage details
- Expandable elements showing available operations (GET, POST, and/or DELETE) for the endpoint.
Expand a GET, POST, or DELETE element to show the following usage information about the operation.
- Request parameter information and requirements.
- Returned values included in the response.
- Example request and response.
Request and response details
Pagination and filtering parameters
In addition to the parameters specific to each endpoint and operation, the following request parameters are valid for some GET methods.
||Maximum number of entries to return. Set value to 0 to get all available entries.|
|f||String||Filters the response to include only the named values. Specify multiple times to return multiple values.
||Index of first item to return.|
|search||String||Response filter, where the response field values are matched against this search expression.
||Response sort order:
||Field name to use for sorting.|
The response to GET and other requests typically includes key-value pairs representing details about the resource that you are accessing. Returned values specific to the resource and/or operation are listed along with their descriptions.
HTTP status codes
Responses can include HTTP status codes. Standard HTTP status codes are not included in endpoint documentation, but status codes with specific meaning for an endpoint and/or operation are noted.
Requests with an error, such as a missing required parameter, can prompt an error response like the following example.
<response> <messages> <msg type="ERROR"> In handler 'datamodelgenerate': The following required arguments are missing: sid. </msg> </messages> </response>
EAI response data
EAI response data, the
<eai:attributes> elements, typically apply to all endpoints and are configuration-dependent, so redundant explanation is omitted. These elements are also elided from the response examples to make the documentation easier to read.
Access Control List (ACL)
The REST implementation enforces ownership and permissions for a resource based on application context namespace. The ACL includes the following parameters.
|app||The app context for the resource. Allowed values are:
|can_list||For internal use only for the Splunk Web manager UI.|
|can_share_*||Indicates whether or not the current user can change the sharing state. The sharing state can be one of:
|can_write||Indicates whether or not the current user can edit this item.|
|owner||The user that owns the resource.
A value of
|modifiable||Indicates whether or not you can change the Access Control List (ACL).
Set to false for items not controlled by ACLs, such as items under
|perms.read||Properties that indicate read permissions of the resource.|
|perms.write||Properties that indicate write permissions of the resource.|
|removable||Indicates if an admin or user with sufficient permissions can remove the entity.|
|sharing||Indicates how the resource is shared. Allowed values are:
Note: You can append
/_acl to an endpoint to access its ACL properties. For more information, see Access Control List in the REST API User Manual.
eai:attributes element shows the mandatory and optional fields.
|optionalFields||Field is optional.|
|requiredFields||Field is required.|
|wildcardFields||Field can use wildcard.|
See the following resources for more information on working with the Splunk REST API.
Access endpoint descriptions
This documentation applies to the following versions of Splunk Cloud Platform™: 8.2.2109, 8.2.2111, 8.2.2112