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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...