Splunk Search

How to make a GET request and fetch SID?

ssharm02
Explorer

Hi I am new to Splunk,

I have created an Angular service that makes a get request to Splunk, I have a search and I want to return the Sid.

I tried this with postman- but it was returning a lot of JSON data.

How do I return the Sid?

Any help would be greatly appreciated.

Regards.

public _url: string = `https://digitalsplunk.secretlink.com:8089/services/search/jobs`
  search_query = JSON.stringify(`search index=mainframe task_name=P3MRBI1 | table _time, ebg_method_name`)

    header = {
    headers: new HttpHeaders().set(
      "Authorization",
      "Basic " + btoa("user:pass")
    )
  };

  constructor(public http: HttpClient) {}
  get_side() {
    this.http.get(this._url + this.search_query, this.header).subscribe(response => console.log('response ', response), err => console.log('error is ', err));
  }
0 Karma
Get Updates on the Splunk Community!

AppDynamics Summer Webinars

This summer, our mighty AppDynamics team is cooking up some delicious content on YouTube Live to satiate your ...

SOCin’ it to you at Splunk University

Splunk University is expanding its instructor-led learning portfolio with dedicated Security tracks at .conf25 ...

Credit Card Data Protection & PCI Compliance with Splunk Edge Processor

Organizations handling credit card transactions know that PCI DSS compliance is both critical and complex. The ...