Access requirements and limitations for the Splunk Cloud REST API
After you request access, you can use a limited subset of the Splunk Enterprise REST API endpoints with your Splunk Cloud deployment.
Accessing the Splunk Cloud REST API
To access your Splunk Cloud deployment using the Splunk REST API and SDKs, submit a case requesting access using the Splunk Support Portal. For managed deployments, Splunk Support opens port 8089 for REST access. You can specify a range of IP addresses to control who can access the REST API. For self-service deployments, Splunk Support defines a dedicated user and sends you credentials that enable that user to access the REST API.
You can make calls with the REST API with a local account, an LDAP account, or a SAML account. To learn more about setting up authentication with tokens, see Set up authentication with tokens.
Managed Splunk Cloud deployments
Use the following URL for managed deployments. If necessary, submit a support case to open port 8089 on your deployment. Please include the IP Addresses/CIDR Ranges you would like to have access from.
Self-service Splunk Cloud deployments
Use the following URL for self-service deployments. To get the required non-SAML user credentials, submit a support case.
Provide your own certificate
Optionally, you can provide your own certificate for the API port. To use your own certificate, submit a case using the Splunk Support Portal. You can request your own cert at the time that you request access to the REST API, or at a later time.
Administrative role limitations
The Splunk Cloud administrative role
sc_admin is restricted from performing the following types of tasks using Splunk Web, the command line interface, or the REST API:
- Modifying configuration of deployment servers, client configuration, and distributed components, such as indexers, search heads, and clustering.
- Restarting a Splunk Cloud deployment
- Executing debug commands
- Installing apps and modifying app configurations
REST API access limitations
As a Splunk Cloud user, you are restricted to interacting with the search tier only with the REST API. You cannot access other tiers by using the REST API. Splunk Support manages all tiers other than the search tier.
To access to endpoints and REST operations, you need to authenticate with your username and password.
Refer to the following table to see which resource groups have full, partial, or no support in Splunk Cloud. In groups with partial support, typically the endpoints that are not supported are those that interact with a tier other than the search tier.
|Access control||Partial||Authorize and authenticate users.|
|Applications||None||Install applications and application templates.|
|Clusters||None||Configure and manage indexer clusters and search head clusters.|
|Configuration||Partial||Manage configuration files and settings.|
|Deployment||None||Manage deployment servers and clients.|
|Inputs||None||Manage data input.|
|Introspection||None||Access system properties.|
|Knowledge||Full||Define indexed and searched data configurations.|
|KV store||None||Manage app key-value store (KV store).|
|Licensing||None||Manage licensing configurations.|
|Outputs||None||Manage forwarder data configuration.|
|Search||Full||Manage searches and search-generated alerts and view objects.|
|System||Partial||Manage server configuration.|
|Workload management||Partial||Manage system resources for search workloads.|
Use cases and examples
Refer to the following use cases and examples to complete tasks with the Splunk Cloud REST API.
The URLs in these examples are formatted for a managed Splunk Cloud deployment. See Accessing the Splunk Cloud REST API for information about formatting your requests for your type of deployment.
/services/cluster_blaster_indexes/sh_indexes_manager endpoint to create an index.
curl -k -u admin:pass https://<deployment-name>.splunkcloud.com:8089/services/cluster_blaster_indexes/sh_indexes_manager -d name=$INDEX_NAME_2 -d maxTotalDataSizeMB=$INDEX_SIZE_MB_2 -d frozenTimePeriodInSecs=$RETENTION_SECONDS_2
Create roles mapped to new indexes
Complete the following steps to create new roles and map them to new indexes.
1. Create index roles:
curl -k -u admin:pass https://<deployment-name>.splunkcloud.com:8089/services/authorization/roles -d name=$INDEX_ROLE_2 -d srchIndexesAllowed=$INDEX_NAME_2 -d srchIndexesDefault=$INDEX_NAME_2
2. Map the index roles to SAML groups:
curl -k -u admin:pass https://<deployment-name>.splunkcloud.com:8089/services/admin/SAML-groups -d name=$SAML_INDEX_ROLE_2 -d roles=$INDEX_ROLE_2
Create empty apps to store knowledge objects
Complete the following steps to create empty apps to store knowledge objects, create new roles that are mapped to those empty apps, and then map the app roles to SAML groups.
1. Create empty apps with Splunk Web.
This action causes an immediate rolling restart of your Splunk Cloud deployment.
2. From the command line, create roles that map to your empty apps:
curl -k -u admin:pass https://<deployment-name>.splunkcloud.com:8089/services/authorization/roles -d name=$APP_ROLE_2
3. Map the app roles to SAML groups:
curl -k -u admin:pass https://<deployment-name>.splunkcloud.com:8089/services/admin/SAML-groups -d name=$SAML_APP_ROLE_2 -d roles=$APP_ROLE_2
Managing knowledge objects
This documentation applies to the following versions of Splunk Cloud™: 8.0.2007, 8.1.2008, 8.1.2009