Refine your search:

How can I search a specific index via the API using curl? When I try to use curl -u user:pass -k -d 'search=search index="indexname" OR curl -u user:pass -k -d 'search=search index="indexname"

I get results but the following messages returned... No Matching index found for 'index=indexname' No mmatching index found for index::indexname

Any help would be appreciated..

asked 03 Feb, 16:14

msmapper's gravatar image

msmapper
412
accept rate: 0%


One Answer:

The problem here is because your request isn't URL encoded. Specifically, your:

search index="indexname"

Needs to be URL encoded. You can easily fix this by doing:

curl -k -u admin:changeme https://localhost:8089/services/search/jobs --data-urlencode 'search=search index="_internal" | head 1'
link

answered 03 Feb, 16:43

ineeman's gravatar image

ineeman
1111
accept rate: 50%

Post your answer
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×299
×101
×9
×3

Asked: 03 Feb, 16:14

Seen: 376 times

Last updated: 03 Feb, 16:43

Copyright © 2005-2012 Splunk, Inc. All rights reserved.