# Curling ElasticSearch API using logstash keystore credentials

**URL:** https://discuss.elastic.co/t/curling-elasticsearch-api-using-logstash-keystore-credentials/317647
**Category:** Logstash
**Created:** [October 27, 2022, 9:00pm UTC](https://discuss.elastic.co/t/curling-elasticsearch-api-using-logstash-keystore-credentials/317647 "2022-10-27T21:00:38Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Broken08](https://avatars.discourse-cdn.com/v4/letter/b/8baadc/32.png) [@Broken08](https://discuss.elastic.co/u/Broken08)
#### Post date: [October 27, 2022, 9:00pm UTC](https://discuss.elastic.co/t/curling-elasticsearch-api-using-logstash-keystore-credentials/317647/1 "2022-10-27T21:00:38Z")

</div>

Is it possible to call Elasticsearch API requests with the Logstash Keystore credentials that are stored (If they obviously are the right username/password/etc...).

I know API/curl calls can be done utilizing Username password or API Keys but what about from the Logstash server directory if they have a filled out keystore.

what would be the syntax?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [October 31, 2022, 2:16am UTC](https://discuss.elastic.co/t/curling-elasticsearch-api-using-logstash-keystore-credentials/317647/2 "2022-10-31T02:16:06Z")

</div>

Welcome to our community! 😃

Do you mean you want to run a curl and then use the details in the keystore?

---

<div class="post-metadata">

### Author: ![Broken08](https://avatars.discourse-cdn.com/v4/letter/b/8baadc/32.png) [@Broken08](https://discuss.elastic.co/u/Broken08)
#### Post date: [November 1, 2022, 12:49pm UTC](https://discuss.elastic.co/t/curling-elasticsearch-api-using-logstash-keystore-credentials/317647/3 "2022-11-01T12:49:16Z")

</div>

I actually want to use the keystore values as the credentials used to run the curl against the API.

Something like

curl -u {$ElasticUser}:{$ElasticPassword} [https://ElasticURL](https://ElasticURL)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [November 29, 2022, 12:50pm UTC](https://discuss.elastic.co/t/curling-elasticsearch-api-using-logstash-keystore-credentials/317647/4 "2022-11-29T12:50:01Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
