Splunk Search
Highlighted

How to make a GET request and fetch SID?

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