Splunk Dev

Custom REST API endpoint with PersistentServerConnectionApplication

douglasmsouza
Explorer

I'm currently using PersistentServerConnectionApplication to implement custom API endpoints inside Splunk. Any changes I make in code delays about 1 or 2 minutes to start working. 

Is this the correct behavior or am I missing something? If it is the correct behavior, is there any form to test the endpoint immediately after save the code?

Also, I would like to know if BaseRestHandler approach still works on Splunk newer versions (8.x), because I coudn't make this work (python can´t find splunk.rest.BaseRestHandler class).

Best regards.

Labels (2)
1 Solution

livehybrid
Builder

Ive recently been working with REST endpoints in this way, it took a bit of head scratching but the process stays running, and can be killed with something like this:

sudo kill $(ps -aux | grep -i [\/]opt.*persistconn | awk '{print $2}')

Then it will pick up your changes next time you query it.

I hope this helps

Will 

View solution in original post

livehybrid
Builder

Ive recently been working with REST endpoints in this way, it took a bit of head scratching but the process stays running, and can be killed with something like this:

sudo kill $(ps -aux | grep -i [\/]opt.*persistconn | awk '{print $2}')

Then it will pick up your changes next time you query it.

I hope this helps

Will 

spunk_enthusias
Path Finder

What a joke to have to rely on this. Simply insane. Thank you. 

0 Karma

livehybrid
Builder

Here I am, over 3 years later, finding my own answer to help me out again 🙂 

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