# Dashboards API call to set defaultIndex

**URL:** <https://forum.opensearch.org/t/dashboards-api-call-to-set-defaultindex/12447>\
**Category:** OpenSearch Dashboards\
**Tags:** troubleshoot, configure\
**Created:** [February 10, 2023, 4:16am UTC](https://forum.opensearch.org/t/dashboards-api-call-to-set-defaultindex/12447 "2023-02-10T04:16:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![theflakes](https://avatars.discourse-cdn.com/v4/letter/t/839c29/32.png) [@theflakes](https://forum.opensearch.org/u/theflakes)\
**Post date:** [February 10, 2023, 4:16am UTC](https://forum.opensearch.org/t/dashboards-api-call-to-set-defaultindex/12447/1 "2023-02-10T04:16:19Z")

</div>

**Versions** (relevant - OpenSearch/Dashboard/Server OS/Browser): 2.5.0

**Describe the issue** : Trying to figure out how to use the Dashboards API to set the default index pattern.

I can create an index pattern but can’t figure out how to set one of them to be the default via the Dashboard’s API. i.e. what is the URL and Json body to use.

thanks
