![]() ![]() In most instances, the -d parameter will sufficiently URI-encode a search string. Endpoints with a search string parameter also require URI-encoding if the search string has the characters equal ( =), ampersand ( &), question mark ( ?), percent ( %), or a space, which are interpreted as part of the HTTP request. To access this endpoint with the value of /var/log for : ![]() For example, consider the GET operation for this endpoint: Typically, parameters with a path or URL value require URI-encoding. You might also need URI-encoding for your cURL commands. In the REST API reference, example cURL commands are formatted for a Unix shell or Bash, and different operating systems and shells might require different syntax. Use the DELETE method to delete an endpoint from the resource hierarchy.Īll methods return a HTTP status code to indicate the success of the operation or cause of a failure to fulfill the request. Use the POST method to create a resource or update existing resource data. Otherwise, the endpoint is a terminal node in the resource hierarchy and the GET request gets the current resource state as a list of property key-value pairs. Iterate over the resource hierarchy to see the instantiated endpoints. If the endpoint represents a collection, list the members of the collection. Corresponding CRUD operations appear in brackets. See the REST API Reference Manual for which endpoints support which methods. The Splunk REST API exposes the following REST methods subset. To use the unsecure, HTTP protocol, set the enableSplunkdSSL property in the nf file to false. When you use the REST API, use the splunkd management port, 8089, and the secure HTTPS protocol. Send GET requests again to verify that you deleted sampleMessage. The Uniform Resource Locator (URL) addressing defined as part of the HTTP protocol maps to Splunk platform resources identified by their Uniform Resource Identifier (URI).įor example, a request to the following URL will return a list of applications installed on your server: Your browser uses the same protocol, so you can use it to send API requests to the server. This REST API implementation accesses domain resources with corresponding endpoints, using the HTTP protocol. The API conforms to the Representational State Transfer (REST) architectural style. Each collection has some combination of resources and other collections. A resource is a single, named, object stored by splunkd, such as a job, a TCP raw input, or a saved search. The API is organized around object and configuration resources. To see additional tutorials, including how to use the Splunk platform REST API with Splunk Cloud Platform, see the REST API Tutorials Manual API functions and organizationĪPI functions allow you to either run searches, or manage objects and configuration. To see a list of available endpoints and operations for accessing, creating, updating, or deleting resources, see the REST API Reference Manual. The Splunk platform REST API gives you access to the same information and functionality available to core system software and Splunk Web. Keys for the KPIs to delete.Basic concepts about the Splunk platform REST API r, -delete For input, specify a list of service keys with the Note that only existing services andĮxisting KPIs could be updated using this option.Īssumes input is available in file_path/input.json ![]() g, -get For input, specify a list of service keys with the Use this option when you want to get/create/update/delete KPIs for Is not set, the restoring will halt if duplicate names e DUPNAME_TAG, -dupname-tag=DUPNAME_TAGĪutomatically rename all the duplicated service orĮntity names from restoring with a tag. The original ITSI application version user intends to a, -conf-file Use this option when you want to back up. y, -dry-run Use this option when you want only to list objects for NOTE:Īpplicable only if importData option is used d, -persist-data Use this option when you want to persist existingĬonfiguration in KV Store during import. However, filepath must be within quotes if Use filepath as wildcard to upload data from more than When importing data from version 1.2.0, you can i, -importData Use this option when you want to upload data to the KV Use this option when you want to perform backup/restore operations. 2 - for service KPIīackup and restore operations. Mode is set to: 1 - forīackup/restore operations. m MODE, -mode=MODE Specify the mode of operation - what kind of Input.json on entry and output.json on exit. Service KPIs, this is a directory containing When importing backed up data of version 1.2.0, thisĬould be a file or a set of files. v, -verbose Use this option for verbose logging n, -no-prompt Use this option when you want to disable the prompt h, -help show this help message and exit bin/splunk cmd python etc/apps/SA-ITOA/bin/kvstore_to_json.py -h
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |