Splunk Search

Problem Creating new search time field extraction Thru the REST API and Java Splunk SDK

misteryuku
Communicator

I have a problem creating new search time field extractions using the Splunk's REST API and the Java SDK.

This is the java code.
RequestMessage reqMsg = new RequestMessage();
reqMsg.setMethod("post");
reqMsg.setContent("name=firstname&stanza=sexuality&type=EXTRACT&value=(?i)^[^,]*,\w+=(?P[^,]+)");

ResponseMessage resMsg = authService.send("/servicesNS/admin/search/data/props/extractions",reqMsg);

The result was an error :
HTTP 500 -- In handler 'props-extract': Data could not be written: /admin/search/props/sexuality/EXTRACT-firstname: (?i)^[^,]*,\w

How do i fix this so that i can create a new search time field extraction through the REST API using Java ?? and i also cannot create the extraction on the IFX the error still persists.

0 Karma

gkanapathy
Splunk Employee
Splunk Employee
0 Karma
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...