# How to make Elasticsearch REST calls with Postman given nothing but a Cloud ID and API Key?

**URL:** <https://discuss.elastic.co/t/how-to-make-elasticsearch-rest-calls-with-postman-given-nothing-but-a-cloud-id-and-api-key/375295>\
**Category:** Elasticsearch\
**Created:** [March 3, 2025, 3:15am UTC](https://discuss.elastic.co/t/how-to-make-elasticsearch-rest-calls-with-postman-given-nothing-but-a-cloud-id-and-api-key/375295 "2025-03-03T03:15:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![catmanjan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/catmanjan/32/77810_2.png) [@catmanjan](https://discuss.elastic.co/u/catmanjan)\
**Post date:** [March 3, 2025, 3:15am UTC](https://discuss.elastic.co/t/how-to-make-elasticsearch-rest-calls-with-postman-given-nothing-but-a-cloud-id-and-api-key/375295/1 "2025-03-03T03:15:36Z")

</div>

Hello, if I use the Elasticsearch SDK I can make API calls using nothing but a Cloud ID and API Key - how can I do the same with Postman, which requires a URL?

Presumeably the SDK is converting the Cloud ID to a URL, but how could I do the same with Postman?

---

<div class="post-metadata">

**Author:** ![strawgate](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/strawgate/32/131008_2.png) [@strawgate](https://discuss.elastic.co/u/strawgate)\
**Post date:** [March 3, 2025, 3:25am UTC](https://discuss.elastic.co/t/how-to-make-elasticsearch-rest-calls-with-postman-given-nothing-but-a-cloud-id-and-api-key/375295/2 "2025-03-03T03:25:26Z")

</div>

You'd have to have a pre request script in postman where you take the cloud id, base64 decode it and build the URL based on the components available in the cloud id

> **[Write pre-request scripts to add dynamic behavior in Postman | Postman Docs](https://learning.postman.com/docs/tests-and-scripts/write-scripts/pre-request-scripts/#scripting-before-your-request-runs)**
>
> Postman is a collaboration platform for API development. Postman's features simplify each step of building an API and streamline collaboration so you can create better APIs—faster.

I'm not aware of any other way

---

<div class="post-metadata">

**Author:** ![catmanjan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/catmanjan/32/77810_2.png) [@catmanjan](https://discuss.elastic.co/u/catmanjan)\
**Post date:** [March 3, 2025, 3:54am UTC](https://discuss.elastic.co/t/how-to-make-elasticsearch-rest-calls-with-postman-given-nothing-but-a-cloud-id-and-api-key/375295/3 "2025-03-03T03:54:45Z")

</div>

Thanks had no idea it was just a URL!

What do I do with the API key?

---

<div class="post-metadata">

**Author:** ![catmanjan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/catmanjan/32/77810_2.png) [@catmanjan](https://discuss.elastic.co/u/catmanjan)\
**Post date:** [March 3, 2025, 4:00am UTC](https://discuss.elastic.co/t/how-to-make-elasticsearch-rest-calls-with-postman-given-nothing-but-a-cloud-id-and-api-key/375295/4 "2025-03-03T04:00:03Z")

</div>

Worked it out, has to be sent as Authorization: ApiKey yourkey
