# How to do we retrieve the destination id of the already created destinations via api?

**URL:** <https://forum.opensearch.org/t/how-to-do-we-retrieve-the-destination-id-of-the-already-created-destinations-via-api/2048>\
**Category:** Alerting\
**Created:** [December 24, 2019, 6:33am UTC](https://forum.opensearch.org/t/how-to-do-we-retrieve-the-destination-id-of-the-already-created-destinations-via-api/2048 "2019-12-24T06:33:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pveerapa](https://avatars.discourse-cdn.com/v4/letter/p/e0b2c6/32.png) [@pveerapa](https://forum.opensearch.org/u/pveerapa)\
**Post date:** [December 24, 2019, 6:33am UTC](https://forum.opensearch.org/t/how-to-do-we-retrieve-the-destination-id-of-the-already-created-destinations-via-api/2048/1 "2019-12-24T06:33:57Z")

</div>

How to do we retrieve the destination id of the already created destinations via api

currently only these are supported?

- [Create destination](https://opendistro.github.io/for-elasticsearch-docs/docs/alerting/api/#create-destination)
- [Update destination](https://opendistro.github.io/for-elasticsearch-docs/docs/alerting/api/#update-destination)
- Delete destination

---

<div class="post-metadata">

**Author:** ![morazbekova](https://avatars.discourse-cdn.com/v4/letter/m/4491bb/32.png) [@morazbekova](https://forum.opensearch.org/u/morazbekova)\
**Post date:** [January 7, 2020, 4:22pm UTC](https://forum.opensearch.org/t/how-to-do-we-retrieve-the-destination-id-of-the-already-created-destinations-via-api/2048/2 "2020-01-07T16:22:39Z")

</div>

Hi,  
I’ve found this workaround that can list all of the destinations available with their IDs:

Do a POST call to .opendistro-alerting-config/\_search endpoint with the following query:  
{ ‘size’: 10000, ‘query’: { ‘bool’: { ‘must’: { ‘exists’: { ‘field’: ‘destination’ } } } } }

---

<div class="post-metadata">

**Author:** ![pveerapa](https://avatars.discourse-cdn.com/v4/letter/p/e0b2c6/32.png) [@pveerapa](https://forum.opensearch.org/u/pveerapa)\
**Post date:** [January 9, 2020, 4:10am UTC](https://forum.opensearch.org/t/how-to-do-we-retrieve-the-destination-id-of-the-already-created-destinations-via-api/2048/3 "2020-01-09T04:10:34Z")

</div>

Hello,

Thanks. It worked

---

<div class="post-metadata">

**Author:** ![skkosuri-amzn](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/skkosuri-amzn/32/935_2.png) [@skkosuri-amzn](https://forum.opensearch.org/u/skkosuri-amzn)\
**Post date:** [August 31, 2020, 10:57pm UTC](https://forum.opensearch.org/t/how-to-do-we-retrieve-the-destination-id-of-the-already-created-destinations-via-api/2048/4 "2020-08-31T22:57:14Z")

</div>


