Other Usage

Empty Content for API request

shambhavi1321
Observer

- name: splunk jobid receive api call
uri:
url: https://{{ fis_apiBaseurl }}/services/search/jobs
method: POST
validate_certs: false
timeout: 360
force_basic_auth: yes
status_code: 201, 200 , 204
headers:
Accept: application/json
Content-Type: "application/json"
Authorization: " Bearer {{ fis_splunk_console_auth }}"
return_content: true
body: '{search = {{ data }}}'
#body_format: json
register: get_JobID
delegate_to: 127.0.0.1

 

 

 

I am using the above code and URL is url: https://{{ fis_apiBaseurl }}/services/search/jobs  .

 

I am using this job is ansible tower but i am getting content as blank where as return code is 200 .

 

ok: [100.73.4.110] => {
"get_JobID": {
"cache_control": "no-store, no-cache, must-revalidate, max-age=0",
"changed": false,
"connection": "Close",
"content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--This is to override browser formatting; see server.conf[httpServer] to disable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . …

 

Can someone help me with URL or exact query 

 

 

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...