# Calling external APIs in sandboxed scripts

**URL:** <https://discuss.elastic.co/t/calling-external-apis-in-sandboxed-scripts/48465>\
**Category:** Elasticsearch\
**Created:** [April 26, 2016, 5:19pm UTC](https://discuss.elastic.co/t/calling-external-apis-in-sandboxed-scripts/48465 "2016-04-26T17:19:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![barravi](https://avatars.discourse-cdn.com/v4/letter/b/cdc98d/32.png) [@barravi](https://discuss.elastic.co/u/barravi)\
**Post date:** [April 26, 2016, 5:19pm UTC](https://discuss.elastic.co/t/calling-external-apis-in-sandboxed-scripts/48465/1 "2016-04-26T17:19:28Z")

</div>

Hello

my apologies in advance if this seems trivial or deeply wrong. I tried to look for some documentation online, but didn't have any luck.

I was wondering if there was any way to call an external REST API when doing a scripted update.

Basically, I would like to call a script update in an index, where the script would just instantiate a REST client, call an external API sending the document source, and index back the result.

Is that something possible, in any language supported by ES scripting environment? Or do I have to write a plugin to do so ?

Thanks in advance.

---

<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:** [July 5, 2017, 10:56pm UTC](https://discuss.elastic.co/t/calling-external-apis-in-sandboxed-scripts/48465/2 "2017-07-05T22:56:12Z")

</div>


