Represents a running or completed search job.
package | Splunk |
---|
delete()
getContent() : array
inherited_from | \Splunk_Entity::getContent() |
---|
array
The properties of this entity.getName() : string
see | \Splunk_Entity::getName() |
---|
string
The name of this entity.
This name can be used to lookup this entity
from its collection.getNamespace() : \Splunk_Namespace
inherited_from | \Splunk_Entity::getNamespace() |
---|
\Splunk_Namespace
The non-wildcarded namespace in which this
entity resides.getProgress() : float
see | \Splunk_Entity::refresh() |
---|
float
Percentage of this job's results that were
computed (0.0-1.0) at the time this job was
last loaded or refreshed.getResults(array $args) : \Iterator
Large result sets will be paginated automatically.
Example:
$job = ...; while (!$job->refresh()->isDone()) { usleep(0.5 * 1000000); } foreach ($job->getResults() as $result) { // (See documentation for Splunk_ResultsReader to see how to // interpret $result.) ... }
This method cannot be used to access results from realtime jobs, which are never done. Use getResultsPreviewPage() instead.
link | http://docs.splunk.com/Documentation/Splunk/latest/RESTAPI/RESTsearch#search.2Fjobs.2F.7Bsearch_id.7D.2Fresults |
---|
array
(optional) {
count: (optional) The maximum number of results to return,
or -1 to return as many as possible.
Defaults to returning as many as possible.
offset: (optional) The offset of the first result to return.
Defaults to 0.
pagesize: (optional) The number of results to fetch from the
server on each request when paginating internally,
or -1 to return as many results as possible.
Defaults to returning as many results as possible.
field_list: (optional) Comma-separated list of fields to return
in the result set. Defaults to all fields.
output_mode: (optional) The output format of the result. Valid
values:
- "csv"
- "raw"
- "xml": The format parsed by Splunk_ResultsReader.
- "json"
Defaults to "xml".
You should not change this unless you are parsing
results yourself.
search: (optional) The post processing search to apply to
results. Can be any valid search language string.
For example "search sourcetype=splunkd" will match any
result whose "sourcetype" field is "splunkd".
}
\Splunk_JobNotDoneException |
If the results are not ready yet. Check isDone() to ensure the results are ready prior to calling this method. |
---|---|
\Splunk_IOException |
\Iterator
The results (i.e. transformed events)
of this job, via an iterator.getResultsPage(array $args) : resource
Most potential callers should use getResults() instead. Only use this method if you wish to parse job results yourself or want to control pagination manually.
By default, all results are returned. For large result sets, it is advisable to fetch items using multiple calls with the paging options (i.e. 'offset' and 'count').
The format of the results depends on the 'output_mode' argument (which defaults to "xml"). XML-formatted results can be parsed using Splunk_ResultsReader. For example:
$job = ...; while (!$job->refresh()->isDone()) { usleep(0.5 * 1000000); } $results = new Splunk_ResultsReader($job->getResultsPage()); foreach ($results as $result) { // (See documentation for Splunk_ResultsReader to see how to // interpret $result.) ... }
This method cannot be used to access results from realtime jobs, which are never done. Use getResultsPreviewPage() instead.
link | http://docs.splunk.com/Documentation/Splunk/latest/RESTAPI/RESTsearch#search.2Fjobs.2F.7Bsearch_id.7D.2Fresults |
---|
array
(optional) {
count: (optional) The maximum number of results to return,
or -1 to return as many as possible.
Defaults to returning as many as possible.
offset: (optional) The offset of the first result to return.
Defaults to 0.
field_list: (optional) Comma-separated list of fields to return
in the result set. Defaults to all fields.
output_mode: (optional) The output format of the result. Valid
values:
- "csv"
- "raw"
- "xml": The format parsed by Splunk_ResultsReader.
- "json"
Defaults to "xml".
You should not change this unless you are parsing
results yourself.
search: (optional) The post processing search to apply to
results. Can be any valid search language string.
For example "search sourcetype=splunkd" will match any
result whose "sourcetype" field is "splunkd".
}
\Splunk_JobNotDoneException |
If the results are not ready yet. Check isDone() to ensure the results are ready prior to calling this method. |
---|---|
\Splunk_IOException |
resource
The results (i.e. transformed events)
of this job, as a stream.getResultsPreviewPage(array $args) : resource
link | http://docs.splunk.com/Documentation/Splunk/latest/RESTAPI/RESTsearch#search.2Fjobs.2F.7Bsearch_id.7D.2Fresults_preview |
---|
array
(optional) {
count: (optional) The maximum number of results to return,
or -1 to return as many as possible.
Defaults to returning as many as possible.
offset: (optional) The offset of the first result to return.
Defaults to 0.
field_list: (optional) Comma-separated list of fields to return
in the result set. Defaults to all fields.
output_mode: (optional) The output format of the result. Valid
values:
- "csv"
- "raw"
- "xml": The format parsed by Splunk_ResultsReader.
- "json"
Defaults to "xml".
You should not change this unless you are parsing
results yourself.
search: (optional) The post processing search to apply to
results. Can be any valid search language string.
For example "search sourcetype=splunkd" will match any
result whose "sourcetype" field is "splunkd".
}
\Splunk_IOException |
---|
resource
The results (i.e. transformed events)
of this job, as a stream.getSearch() : string
string
The search string executed by this job.isDone() : boolean
see | \Splunk_Entity::refresh() |
---|
boolean
Whether this job's results were available
at the time this job was last loaded or
refreshed.isReady() : bool
bool
Whether this job has been loaded.makeReady(int $maxTries, float $delayPerRetry) : \Splunk_Entity
int
The maximum number of times to try loading this job.
float
The number of seconds to wait between attempts to retry loading this job.
\Splunk_IOException |
---|
\Splunk_Entity
This entity.offsetExists(string $key) : string
inherited_from | \Splunk_Entity::offsetExists() |
---|
string
The name of an entity property.
string
Whether the specified entity property exists.offsetGet(string $key) : string
inherited_from | \Splunk_Entity::offsetGet() |
---|
string
The name of an entity property.
string
The value of the specified entity property.refresh() : \Splunk_Entity
inherited_from | \Splunk_Entity::refresh() |
---|
\Splunk_IOException |
---|
\Splunk_Entity
This entity.sendDelete(string $relativePath, array $args) : \Splunk_HttpResponse
see | \Splunk_Http::delete() |
---|---|
inherited_from | \Splunk_Endpoint::sendDelete() |
inherited_from | \Splunk_Entity::sendDelete() |
string
relative URL path.
array
(optional) query parameters, merged with {
namespace: (optional) namespace to use, or NULL to use
the context's default namespace.
}
\Splunk_IOException |
---|
\Splunk_HttpResponse
sendGet(string $relativePath, array $args) : \Splunk_HttpResponse
see | \Splunk_Http::get() |
---|---|
inherited_from | \Splunk_Endpoint::sendGet() |
inherited_from | \Splunk_Entity::sendGet() |
string
relative URL path.
array
(optional) query parameters, merged with {
namespace: (optional) namespace to use, or NULL to use
the context's default namespace.
}
\Splunk_IOException |
---|
\Splunk_HttpResponse
sendPost(string $relativePath, array $args) : \Splunk_HttpResponse
see | \Splunk_Http::post() |
---|---|
inherited_from | \Splunk_Endpoint::sendPost() |
inherited_from | \Splunk_Entity::sendPost() |
string
relative URL path.
array
(optional) form parameters to send in the request
body, merged with {
namespace: (optional) namespace to use, or NULL to use
the context's default namespace.
}
\Splunk_IOException |
---|
\Splunk_HttpResponse
update(array $args) : \Splunk_Entity
Note that the "name" property cannot be updated.
inherited_from | \Splunk_Entity::update() |
---|
array
Dictionary of properties that will be changed, along with their new values.
\Splunk_IOException |
---|
\Splunk_Entity
This entity.extractEntryFromRootXmlElement($xml)
fetch($fetchArgs)
getSearchNamespace() : \Splunk_Namespace | NULL
inherited_from | \Splunk_Entity::getSearchNamespace() |
---|
\Splunk_Namespace
NULL
The namespace in which this endpoint
resides, or NULL to use the context's
default namespace.
Possibly a non-exact namespace.getTitle() : string
inherited_from | \Splunk_Entity::getTitle() |
---|
string
The title of this entity in the REST API.isLoaded()
inherited_from | \Splunk_Entity::isLoaded() |
---|
validate($fetchArgs) : \Splunk_Entity
Returns self.
inherited_from | \Splunk_Entity::validate() |
---|
\Splunk_IOException |
---|
\Splunk_Entity
This entity.fetchPage($pageType, $args)
load($fetchArgs)
parseContentsFromEntry()
inherited_from | \Splunk_Entity::parseContentsFromEntry() |
---|
sendControlAction($actionName)
sendSimpleRequest($method, $relativePath, $args)
inherited_from | \Splunk_Endpoint::sendSimpleRequest() |
---|---|
inherited_from | \Splunk_Entity::sendSimpleRequest() |
$path
inherited_from | \Splunk_Endpoint::$$path |
---|---|
inherited_from | \Splunk_Entity::$$path |
$service
inherited_from | \Splunk_Endpoint::$$service |
---|---|
inherited_from | \Splunk_Entity::$$service |
$content
inherited_from | \Splunk_Entity::$$content |
---|
$entry
inherited_from | \Splunk_Entity::$$entry |
---|
$loaded
inherited_from | \Splunk_Entity::$$loaded |
---|
$namespace
inherited_from | \Splunk_Entity::$$namespace |
---|
DEFAULT_FETCH_DELAY_PER_RETRY
DEFAULT_FETCH_MAX_TRIES