All Apps and Add-ons

REST API option for compressed file? Can I index a zip file?

tamduong16
Contributor

I want to set up a REST API call to https get request but this site will return a zip file instead of xml, jason , or text. Is there a way I could set it to index the zip file? If not, is there any workaround? This is the description from the site:

alt text

0 Karma
1 Solution

Damien_Dallimor
Ultra Champion

You can try using a custom response handler that will unzip the file for you.

  • Create a custom handler in $SPLUNK_HOME/etc/apps/rest_ta/bin/responsehandlers.py
  • Declare the handler in your configuration

Psuedo code examples :

alt text

alt text

View solution in original post

lfedak_splunk
Splunk Employee
Splunk Employee

Hey @tamduong16, if @damien solved your problem, please close the question and award karma points by accepting the answer. 🙂 Happy Splunking!

0 Karma

Damien_Dallimor
Ultra Champion

You can try using a custom response handler that will unzip the file for you.

  • Create a custom handler in $SPLUNK_HOME/etc/apps/rest_ta/bin/responsehandlers.py
  • Declare the handler in your configuration

Psuedo code examples :

alt text

alt text

Get Updates on the Splunk Community!

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL  The Splunk AI Assistant for SPL ...

Buttercup Games: Further Dashboarding Techniques (Part 5)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...

Customers Increasingly Choose Splunk for Observability

For the second year in a row, Splunk was recognized as a Leader in the 2024 Gartner® Magic Quadrant™ for ...