Data Entities

Similar to rows in a traditional relational database, entities in the API BaaS data store represent an individual database record, stored as a JSON object. Each entity contains a set of default properties, including uuid, created, etc. that are set by the API when the entity is created. Entities also allow for any number of custom properties, which are JSON-formatted key-value pairs. This allows entities to represent just about anything, and to store as much or as little contextual data as your app requires.

Default data entities

By default, the API BaaS reserves a set of default data entity types that are intended to support the primary features of the API BaaS. For example, a user entity type with a corresponding /users collection is reserved for modeling data related to app users, and includes properties to support special functionality, such as password authentication.

Learn more about:

Default data entities

Custom data entities

In addition to default data entities, the API BaaS data store also allows you to create custom data entities. To do this, simply create a new entity with a custom type property. No other properties are required when the entity is created.

Custom data entities can be used for any purpose and are an ideal way to organize data in a way that makes the most sense of your app.

Working with data entities

All default and custom data entities support standard create, read, update, and delete functionality via the API. This allows you to work with all your data at an atomic level, as well as performing batch operations on multiple entities.

Referencing data entities

In the API BaaS data store, all entities are uniquely identified by two properties for all API requests:

  • uuid: An alphanumeric universally unique identifier that is generated by the API BaaS when an entity is created
  • type: The singular form of the name of the collection that the entity belongs to

Learn more about:

Creating entities Retrieving entities Updating entities Deleting entities