Getting Data In

Update a lookup file via REST

Damien_Dallimor
Ultra Champion

I want to be able to update an existing csv lookup file (that resides within the lookups directory of a custom app on a searchhead) by uploading the updated file from the local machine(via a custom widget that uses the REST api)

I see there is a REST endpoint similar to this but requires the the lookup file to be published to a staging area on the Splunk server and doesn't allow you to target the destination app.

Tags (1)

ziegfried
Influencer

You could add a custom REST endpoint to Splunk that handles the file upload and updates the lookup CSV file.

twinspop
Influencer

Did you ever create this functionality? Can you share?

0 Karma

Damien_Dallimor
Ultra Champion

Cheers Z... I think that will be the approach.

0 Karma

Ayn
Legend

There's another REST endpoint that seems to be addressing this exact thing: http://docs.splunk.com/Documentation/Splunk/latest/RESTAPI/RESTknowledge#POST_data.2Ftransforms.2Flo...

Ayn
Legend

Hm, true. Sorry!

0 Karma

Damien_Dallimor
Ultra Champion

I don't see how this endpoint can be used to update an existing csv file, as in the contents of the existing lookup file.
The endpoint you mentioned is just for updating the lookup definition.

0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...