> For the complete documentation index, see [llms.txt](https://docs.bdb.ai/self-service-visualization/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bdb.ai/self-service-visualization/creating-a-new-story/create-new-story/creating-a-new-story-with-an-existing-data-store/creating-and-updating-instance.md).

# Creating and Updating Instance

## Creating Instance <a href="#creating-instance" id="creating-instance"></a>

{% hint style="info" %}
*Prerequisite: Please make sure that the **Data Store Settings** has been configured from the **Admin module** to **access the Instance functionality** for the* *Data Store inside a **Story.***
{% endhint %}

<details>

<summary>What is a Personalised Store?</summary>

The Data Store for which the user can set the TIme To Live (TTL) limit using the Story interface is considered a Personlised Data Store or Personalised Store.

</details>

<details>

<summary>What is the limit for TTL? What is the maximum limit for TTL?</summary>

The ***Time to Live (TTL)*** for the data will be of 1-30 days. The maximum limit provided for the ***TTL*** is ***30 days.***

</details>

The ***Create Instance*** option is used to load the data for the first time from the datastore into Elastic, MongoDB, ClickHouse server as the configuration done in the ***Admin Module*** for the Datastore Settings.&#x20;

* Navigate to the Data Store list inside a ***Create New Story*** dialog box.
* The ***Select Data Store*** page opens listing all the available Data Stores.
* Select the ***Personalized*** Data Store Category.
* Search for a Data Store in the given search bar.
* Select a Data Store from the Create New Story page.
* Click the ***Create Instance*** icon for the selected Data Store (The ***Create Instance*** option appears in case of the newly created ***Data Stores***).

<figure><img src="/files/CAaj9AP6lwSmu3akz3hE" alt=""><figcaption></figcaption></figure>

* Provide the ***Time to Live*** value in days. The **Maximum&#x20;*****allowed*** ***Time to Live limit*****&#x20;is&#x20;*****30 days***.
* Click the ***Refresh*** option.

<figure><img src="/files/9yVgGWgPVzs84nBIANhS" alt=""><figcaption></figcaption></figure>

* A confirmation message appears to update the Data Store details.

<figure><img src="/files/n2aK7kiil5UouKX3cTt2" alt=""><figcaption></figcaption></figure>

* The concerned Data Store starts displaying the Days Left option based on the provided no. of days while setting the TTL.
* Select the Data Store by using the check box.
* Click the ***Create Story*** option.

<figure><img src="/files/tBQZsCt9d5Ib9wvJDG0M" alt=""><figcaption></figcaption></figure>

## Updating Instance (Under Progress) <a href="#updating-instance" id="updating-instance"></a>

The permitted ***Time to Live*** limit for a Data Store is only 30 days (maximum). If it goes above that, data will not be there in the Story. Hence, the user can manually update the instance. The ***Days Left*** column will highlight such condition as flashing ***Expire*** status in the red color. Click the user gets redirected to update the instance for the selected Data Store so the data will be refreshed again in the ***ES*** or ***MongoDB***.

* Navigate to the ***Create New Story*** page.
* Select a Data Store from the ***Personalised*** category that has been expired.
* Click on the Data Store.
* The ***Time to Live*** (TTL) option appears. Mention no. of days (up to 30 days is allowed for TTL).
* Click the ***Refresh*** option.

<figure><img src="/files/HZ2ijkrvLbLjC7umOurQ" alt=""><figcaption></figcaption></figure>

* A notification message appears to inform about the successful update of the Data Store.
* Click the **Create Story** option.

<figure><img src="/files/vJfebFbzSqNydgAvsSsk" alt=""><figcaption></figcaption></figure>

* The Data Store gets refreshed, and the inserted no. of days get reflected under the Days Left column.

{% hint style="info" %}
*<mark style="color:green;">Please Note:</mark> The user can distinguish between Datastores:*

* *Distinguish between instances and scheduler-based data stores.*
* *Distinguish between the **Active** and **Expired** instances.*
  * *The Expired Data Stores are mentioned with the Expired Status.*
    {% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bdb.ai/self-service-visualization/creating-a-new-story/create-new-story/creating-a-new-story-with-an-existing-data-store/creating-and-updating-instance.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
