Splunk REST

Splunk REST API gives paying clients full access to our data and native Splunk functionality. Please refer to Splunk REST API documentation page for the full list of available commands and options. There are also multiple SDKs available to make it easier to use Splunk REST API.

Access

Field Value
host rest.nterminal.com
port 443
username your login
password your password

Example - Python Code Snippet

from splunklib import client, results


if __name__ == '__main__':
    service = client.connect(
        host="rest.nterminal.com",
        port=443,
        username=<username>,
        password=<password>
    )

    job_result = service.jobs.oneshot("search index=blockchain-btc-mempool | head 5",
                                      latest_time="now",
                                      earliest_time="-1h")
    reader = results.ResultsReader(job_result)
    for item in reader:
        print(item)