# Elasticsearch behind Azure API Management

**URL:** <https://discuss.elastic.co/t/elasticsearch-behind-azure-api-management/317834>\
**Category:** Elasticsearch\
**Created:** [October 31, 2022, 5:05pm UTC](https://discuss.elastic.co/t/elasticsearch-behind-azure-api-management/317834 "2022-10-31T17:05:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zxuz111](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zxuz111/32/100222_2.png) [@zxuz111](https://discuss.elastic.co/u/zxuz111)\
**Post date:** [October 31, 2022, 5:05pm UTC](https://discuss.elastic.co/t/elasticsearch-behind-azure-api-management/317834/1 "2022-10-31T17:05:08Z")

</div>

We have an Elasticsearch deployed on Azure, and we are planning to protect the access to the Elasticsearch using Azure API Management. When I tried to create API from OpenAPI specification by Elasticsearch ([https://cloud.elastic.co/api/v1/api-docs/spec.json](https://cloud.elastic.co/api/v1/api-docs/spec.json)), I got the following error:

```auto
One or more fields contain incorrect values:
 - Default value must be present in the list of values

```

I got the URL to the spec json file at page [OpenAPI specification | Elasticsearch Service Documentation | Elastic](https://www.elastic.co/guide/en/cloud/current/ec-openapi-specification.html). I am wondering if I am using the one that can be used to create API on Azure API Management.

Looked into the above JSON file again, and it seemed does not include REST API for search at all.

Is there any existing OPENAPI spec for the Elasticsearch REST API such as "/{index}/\_search"

Any help is appreciated.

---

<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, 11:14pm UTC](https://discuss.elastic.co/t/elasticsearch-behind-azure-api-management/317834/2 "2022-10-31T23:14:20Z")

</div>

> [@zxuz111](#):
>
> Is there any existing OPENAPI spec for the Elasticsearch REST API such as "/{index}/\_search"

Unfortunately not, no.

---

<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 28, 2022, 11:14pm UTC](https://discuss.elastic.co/t/elasticsearch-behind-azure-api-management/317834/3 "2022-11-28T23:14:51Z")

</div>

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