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. Basic concepts about the Splunk platform REST API
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |