Key-Value Store
Custom Entity Store

In 2024, Forge hosted storage will automatically include data residency. This means that all app data in Forge hosted storage will inherit data residency, in all current and future Atlassian-supported regions.

This implementation will provide your customers with greater control over their app data’s location. For more information, read this announcement.

Forge hosted storage

Forge has two hosted storage capabilities: the Key-Value Store and Custom Entity Store. Both store app data alongside their Forge app installations.

Each installation of your app is subject to the Storage API's quotas and limits. See Storage quotas and limits for more details.

Key-Value Store

The Key-Value Store allows you to store data by key, and is available through the storage API. You can easily store and retrieve data using simple methods like storage.set and storage.get.

For example:

1
2
import { storage } from '@forge/api';

await storage.set('foo', 'bar');
await storage.get('foo');

To safeguard sensitive data in a more secure manner, the Key-Value Store allows for storing encrypted data via the Secret store.

For detailed documentation, see Key-Value Store.

Custom Entity Store

Custom entities are data structures that you can define based on your app's specific needs. After defining a custom entity, you can use the Custom Entity Store to store assign multiple attributes to a single entity and define indexes to optimize queries against these values.

For example:

1
2
import { storage, WhereConditions, SortOrder } from '@forge/api';

await storage
  .entity('employee')
  .query()
  .index('by-age')
  .where(WhereConditions.isGreaterThan(30))
  .sort(SortOrder.DESC)
  .getMany()

For detailed documentation, see entity storage - basic usage.

Rate this page: