1WWW::Splunk::API(3)   User Contributed Perl Documentation  WWW::Splunk::API(3)
2
3
4

NAME

6       WWW::Splunk::API - Splunk REST client
7

DESCRIPTION

9       WWW::Splunk::API is a low-level interface to Splunk log search engine.
10       It deals with HTTP communication as well as working around certain
11       interface glitches.
12
13       See
14       <http://www.splunk.com/base/Documentation/latest/Developer/RESTSearch>
15       for API definition.
16
17       This module is designed to be Splunk API version agnostic.
18
19   new (params)
20       A constructor.
21
22         my $splunk = WWW::Splunk::API->new({
23                 host => $host,
24                 port => $port,
25                 login => $login,
26                 password => $password,
27                 unsafe_ssl => 0,
28                 verbose => 0,
29         });
30
31   delete (parameters)
32       Wrapper around HTTP::Request::Common::DELETE().
33
34   post (parameters)
35       Wrapper around HTTP::Request::Common::POST().
36
37   get (parameters)
38       Wrapper around HTTP::Request::Common::GET().
39
40   head (parameters)
41       Wrapper around HTTP::Request::Common::HEAD().  Not used anywhere in
42       splunk API
43
44   put (parameters)
45       Wrapper around HTTP::Request::Common::PUT().  Not used anywhere in
46       splunk API
47
48   request (method, location, [data], [callback])
49       Request a Splunk api and deal with the results.
50
51       Method can be either a HTTP::Request instance (see
52       HTTP::Request::Common for useful ones), or a plain string, such as
53       "GET" or "DELETE."
54
55       Optional data is has reference gets serialized into a request body for
56       POST request. Use undef in case you don't have any data to send, but
57       need to specify a callback function in subsequent argument.
58
59       Call-back function can be specified for a single special case, where a
60       XML stream of <results> elements is expected.
61

SEE ALSO

63       WWW::Splunk, sc
64

AUTHORS

66       Lubomir Rintel, <lkundrak@v3.sk>, Michal Josef XpaXek <skim@cpan.org>
67
68       The code is hosted on GitHub
69       <http://github.com/tupinek/perl-WWW-Splunk>.  Bug fixes and feature
70       enhancements are always welcome.
71

LICENSE

73        This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
74
75
76
77perl v5.34.0                      2022-01-21               WWW::Splunk::API(3)
Impressum