Splunk Search

How do we extract multiple events from xml response from REST API call

sunilbhogayta
New Member

Hello Spunkers,

I am trying to ingest the data using REST APIs and as a response i do see xml response in below format.

 

<Method>ProdList</Method>
<Result xsi:type="xsd:collection">
<APIList>
<API ID="12345" Name="Test Name 1" LastDate="11/5/2020 10:22:34 AM" NextDate="1/1/0001 12:00:00 AM"  Status="1" />
<API ID="65432" Name="Test Name 2" LastDate="2/8/2021 8:47:26 AM" NextDate="2/8/2021 9:02:26 AM"  Status="0" />
<API ID="876433" Name="Test Name 3" LastDate="2/8/2021 8:35:55 AM" NextDate="2/8/2021 8:50:55 AM" Status="0" />
</APIList>
</Result>
</SampleRestAPI>
 
In above results, there are three records returned. I would like to have this records as an individual events to use in a search and create dashboards but as of now it shows as single event.
 
Your help or pointers are highly appreciated.
 
 
Regards,
Sunil 
Labels (1)
0 Karma

vanajafe
New Member
0 Karma
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Dynamic formatting from XML events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  &#x1f680; Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...