Enables clients to issue HTTP requests to a Splunk server.
package | Splunk |
---|
__construct(array $args)
array
{
username: (optional) The username to login with. Defaults to
"admin".
password: (optional) The password to login with. Defaults to
"changeme".
token: (optional) The authentication token to use. If provided,
the username and password are ignored and there is no
need to call login(). In the format "Splunk SESSION_KEY".
host: (optional) The hostname of the Splunk server. Defaults to
"localhost".
port: (optional) The port of the Splunk server. Defaults to
8089.
scheme: (optional) The scheme to use: either "http" or "https".
Defaults to "https".
namespace: (optional) Namespace that all object lookups will
occur in by default. Defaults to
Splunk_Namespace::createDefault()
.
http: (optional) An Http object that will be used for
performing HTTP requests. This is intended for testing
only.
}
getHost() : string
string
The hostname of the Splunk server.getNamespace() : \Splunk_Namespace
\Splunk_Namespace
The default namespace that will be used
to perform collection and entity operations
when none is explicitly specified.getPort() : string
string
The port of the Splunk server.getScheme() : string
string
The scheme to use: either "http" or "https".getToken() : string
string
The token used to authenticate HTTP requests
after logging in.login()
sendDelete(string $path, array $args) : \Splunk_HttpResponse
see | \Splunk_Http::delete() |
---|
string
relative or absolute URL path.
array
(optional) query parameters, merged with {
namespace: (optional) namespace to use, or NULL to use
this context's default namespace.
}
\Splunk_IOException |
---|
\Splunk_HttpResponse
sendGet(string $path, array $args) : \Splunk_HttpResponse
see | \Splunk_Http::get() |
---|
string
relative or absolute URL path.
array
(optional) query parameters, merged with {
namespace: (optional) namespace to use, or NULL to use
this context's default namespace.
}
\Splunk_IOException |
---|
\Splunk_HttpResponse
sendPost(string $path, array $args) : \Splunk_HttpResponse
see | \Splunk_Http::post() |
---|
string
relative or absolute URL path.
array
(optional) form parameters to send in the
request body, merged with {
namespace: (optional) namespace to use, or NULL to use
this context's default namespace.
}
\Splunk_IOException |
---|
\Splunk_HttpResponse
sendRequest(string $method, string $path, array $requestHeaders, string $requestBody, array $args) : \Splunk_HttpResponse
see | \Splunk_Http::request() |
---|
string
the HTTP method (ex: 'GET' or 'POST').
string
relative or absolute URL path.
array
(optional) dictionary of header names and values.
string
(optional) content to send in the request.
array
(optional) query parameters, merged with
{
namespace: (optional) namespace to use, or NULL to use
this context's default namespace.
}
\Splunk_IOException |
---|
\Splunk_HttpResponse
abspath(string $path, \Splunk_Namespace | NULL $namespace) : string
string
Relative or absolute URL path.
string
Absolute URL path.getRequestHeaders()
sendSimpleRequest($method, $path, $args)
url(string $path, \Splunk_Namespace | NULL $namespace) : string
string
Relative or absolute URL path.
string
Absolute URL.$host
$http
$namespace
$password
$port
$scheme
$token
$username