Default Data Entity Types

This following describes all of the default data entities available in API Services, and their default properties. Each entity can be accessed in a corresponding collection, named with the plural form of the entity name (see API BaaS Data model for more information on how data is stored in API Services).

Properties marked 'required' must be set for the entity to be successfully created. Properties marked 'optional' are reserved by the API but not required. All other properties are automatically set and returned by the API when the entity is created.

Required. Entity that performed the 'action' of the activity (see JSON Activity Streams 1.0 specification). By default, the UUID of the user who performed the action is recorded as the value of the 'uuid' property of this object.

verb

string

Required. The action performed by the user (for example, post)

published

long

Required.UTC timestamp in milliseconds of when the activity was published

A nested, JSON-formatted object that provides the relative path to the activity entity, as well as additional data entities associated with the activity. The following properties are included in metadata:

path: Path to retrieve the activity entity, including the UUID of the user entity associated with the activity and the UUID of the activity entity

Application

The application entity is the base entity for accessing your application data in API Services. Aside from creating the application entity, most apps using API Services will never need to access the application entity directly.

Optional. Time to live value for an access token obtained within the application

organizationName

string

Name of the organization the application belongs to

applicationName

string

Name of the application

title

string

Optional. Application title

description

string

Optional. Application description

activated

boolean

Optional. Whether application is activated

disabled

boolean

Optional. Whether application is administratively disabled

allowOpenRegistration

boolean

Optional. Whether application allows any user to register

registrationRequiresEmailConfirmation

boolean

Optional. Whether registration requires email confirmation

registrationRequiresAdminApproval

boolean

Optional. Whether registration requires admin approval

notify_admin_of_new_users

boolean

Optional. Whether application admins should be notified of new users

metadata

object

A nested, JSON-formatted object that provides a 'collections' object with the relative paths to all entity collections associated with the application. The following collections are included in metadata by default:

Asset

The asset entity represents a binary data object stored in API Services infrastructure, such as an image, video or audio file. The asset entity does not contain the binary data, but rather contains information about the data and points to the location where it can be accessed in API Services infrastructure.

Device

The device entity represents a unique device that is being used to access your app. Device entities should be associated with a user entity. The API Services push notification feature requires the device entity.

Event

The event entity is used to log application data, primarily for performance and error monitoring. Event entities can be also associated with users and groups. The event mechanism in API Services is optimized to handle large numbers of events, so it is an ideal mechanism for logging in your application.

Group

The group entity allows you to group users based on any criteria. Multiple group entities can be nested to create sub-groups. Users can also belong to multiple groups. Examples of uses for the group entity include grouping users by interest or location.

The look-up properties for the entities of type group are UUID and path, that is, you can use the uuid or path property to reference a group in an API call. However, you can search on a group using any property of the group entity. See Queries and parameters for details on searching.

A nested, JSON-formatted object that provides the relative path to the group entity, as well as additional data entities associated with the group. The following properties are included in metadata:

path: Path to retrieve the group entity, including the group UUID

sets: Nested object that contains the 'rolenames' and 'permissions' properties.

rolenames: Path to retrieve a list of roles associated with the group.

permissions: Path to retrieve a list of all permissions directly associated with the group. If the group is associated with a role, the list will not include permissions associated with the role entity.

Notification

The notification entity represents a push notification, including notification message and details. A notification entity is sent in conjunction with a notifier entity to a notification service, such as Apple Push Notification Service, to initiate a push notification.

Required. The push notifications to be delivered, formatted as key-value pairs of notifier entities and messages (<notifier_name1>:<message1>, <notifier_name2>:<message2>, ...)

errorMessage

string

Error message returned by the notification service (APNs or GCM) if the notification fails entirely

scheduled

bool

Whether the notification is currently scheduled for delivery

state

string

The current delivery status of the notification: "FINISHED", "SCHEDULED" or "CANCELED".

metadata

object

A nested, JSON-formatted object that provides the relative path to the notification entity, as well as additional data entities associated with the notification. The following properties are included in metadata:

Receipt

The receipt entity is created after a push notification has been sent using API Services. The receipt is a record of an attempted push notification, including if the notification was successful, and when it was sent.

Role

The role entity is used to define standard permission sets that can be assigned to user and groups entities. For example, you might create an Administrator role to easily grant certain users full access to all app features.

The amount of time, in milliseconds, that a user or group associated with the role can be inactive before they lose the permissions associated with that role. By default, 'inactivity' is set to 0 so that the user/group never loses the role.

metadata

object

A nested, JSON-formatted object that provides the relative path to the role entity, as well as additional data entities associated with the role. The following properties are included in metadata:

path: Path to retrieve the role entity

sets: Nested object that contains the 'permissions' property.

permissions: Path to retrieve a list of all permissions associated with the role.

Whether the user account is activated. Set to 'true' by default when the user is created.

metadata

object

A nested, JSON-formatted object that provides the relative path to the user entity, as well as additional data entities associated with the user. The following properties are included in metadata:

path: Path to retrieve the user entity

sets: Nested object that contains the 'rolenames' and 'permissions' properties.

rolenames: Deprecated. Use /users/\/roles instead. Path to retrieve a list of roles associated with the user.

permissions: Path to retrieve a list of all permissions directly associated with the user. If the user is associated with a role or group, the list will not include permissions associated with those entities.