Skip to content
This repository was archived by the owner on May 22, 2018. It is now read-only.
This repository was archived by the owner on May 22, 2018. It is now read-only.

New-SplunkIndex fails with 400 status / Argument "search" is not supported by this handler. #13

@halr9000

Description

@halr9000

Answers post: http://answers.splunk.com/answers/216632/new-splunkindex-400-response-code.html

Root cause is that the Invoke-HTTPPost function is incorrectly embedding a search parameter into the REST call, as shown here:

Run cmdlet with verbose:

 <response>
   <messages>
    <msg type="ERROR">
  In handler 'indexes': Argument "search" is not supported by this handler.</msg>
   </messages>
 </response>

Digging into the verbose output, we can see the data being POST'ed to the Splunk endpoint:

VERBOSE:  [Invoke-HTTPPost] :: $PostString = search=&name=test

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions