Splunk Dev

In a REST persistent script custom endpoint, how to return HTTP status code other than 200?

lekanneer
Loves-to-Learn Lots

I'm writing my own custom endpoint which is needed to be persistent. So it is based on the PersistentServerConnectionApplication class because performance is important. But how to return other HTTP status codes other than 200? I have to check some authorization within my custom endpoint so I rather want to use a status code in the range of 4xx if something goes wrong.

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...