All Apps and Add-ons

Use rest to create a lookup

a212830
Champion

Hi,

I have some data this is only retrievable via REST, and want to use it for a lookup. The data changes daily, so I need to run it at least once a day. Is there anyway to schedule a rest call to an external system and save it as a lookup?

0 Karma

Damien_Dallimor
Ultra Champion

Try a custom search command that reads from the REST Endpoint and then you can pipe to outputlookup.

| my_rest_command | outputlookup my_rest_lookup

Here is a code example : https://github.com/splunk/splunk-demo-yelp-search-command

You can then schedule this by way of a scheduled search

0 Karma

anatoliikostin
Explorer

I would expect you to support your own REST API modular input mentioned above 😉
Saving REST API output into an index will allow tracking of changes. And lookup export of recent data should work perfectly for the requested need!

Thanks for your very useful addon!

0 Karma

Damien_Dallimor
Ultra Champion

Yes , we provide support for that App , www.baboonbones.com/#support 🙂

0 Karma

Jeremiah
Motivator

Yes, you can use the REST modular input app:

https://splunkbase.splunk.com/app/1546/
http://blogs.splunk.com/2013/06/18/getting-data-from-your-rest-apis-into-splunk/

Once you have data indexed into Splunk, you can run a scheduled search to export the data using the outputlookup command.

http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Outputlookup

Your other option would be to write an external lookup that queries your REST API.

http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Configureexternallookups

If your data only changes once a day, and you use the lookup frequently, a CSV lookup will probably be the better choice.

a212830
Champion

Thanks. Be nice to see a supported REST API lookup creator - similar to what DB Connect does now.

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 ...