I am using GuzzleHttp
Login call " services/auth/login " works fine and I get the session token as well.
but after this each call give me following error
Client error: POST https://myip:8089/services/search/jobs resulted in a 401 Unauthorized response: Unauthorized
here is my code:
$request = new \GuzzleHttp\Psr7\Request('POST', $host, [ 'headers' => ['Authorization' => 'Splunk xxxxxxxxxxxxxxxxxxxx',
'Content-Type' => 'application/x-www-form-urlencoded']]);
$response = $client->send($request, [ 'verify' => false,
'form_params' => ["search" => 'search index="asm_live" sourcetype=syslog OR sourcetype=syslog_f5asm attack_type attack_type="*" ip_client="*" | stats count']
I am running in circles and unable to figure out the problem.
... View more