AppsDB
AppsDB is a key / value store that allows you to enrich your Showpad App with the following key features:
- Offline Storage
- Cross Platform
- Data Protection
You can access the AppsDB by leveraging the Experience App SDK during the development phase.
AppsDB concepts
While AppsDB is used after you've completed developing your Showpad App, it's a good idea to start getting familiar with some important concepts.
Store
A store is the top-level object which groups multiple store entries together. A store must be registered before it can
be used. This is done by defining the store in the manifest or by using a POST
request to the store
endpoint.
Store entry
A store entry
is the actual object that holds your data. A store entry is identified by an ID and holds a string as
value. Each store entry sits in a Store and has an associated scope.
Scope
A scope
is the permission boundary from which an entry is accessible. Currently, there are two scopes. USER
and
GLOBAL
.
User Scope
When an entry is created in the USER
scope that entry is associated with the Showpad user that has created that entry.
This means that each user can have its own set of entries within the same store, without colliding with entries from
another user. Even though user entries are scoped to a single user it's possible to retrieve all store entries
cross-user by using the store entries call. Note that this call requires an additional OAuth2 scope
appsdb_online_integrations
which can be set to your OAuth2 client or by creating a personal access token.
You can retrieve all cross-user Store entries by using a store entry
call.
Global Scope
Entries created within the GLOBAL
scope can be retrieved by all users but can only be created when the requester has
the "appsdbonlineintegrations" OAuth2 Scope.
Pagination
AppsDB uses cursor-based pagination with an optional limit. When retrieving a large list of user or global scoped entries, we limit the number of entries returned (see API documentation). Whenever one of these limits is hit, we return a cursor-string that can be passed to a subsequent request to receive the next page of entries. When no cursor is returned all entries have been retrieved.
Data Storage
When offline use cases matter for the Showpad App integrating with AppsDB, we recommend that you store data that will not change in one store entry or as few possible store entries.