The Manage Data tab in Appcelerator Dashboard provides a visual interface to the various Mobile Backend Services APIs for creating, updating, deleting and querying your application's Mobile Backend Services (MBS) objects – Photos and Chats, for example – on behalf of its users. You can also create and edit administrative MBS objects, like access control lists and email templates.
To manage MBS objects of specific type, select the API from the APIs menu whose data objects you want to manage. Then click Manage Data in the secondary navigation, as shown below. The main screen displays a table listing all MBS object types and the total number of each type.
Click an MBS type to view a paginated table that lists all the objects of that type. The column headers displayed depend on the type of object being listed. Click the Load More and Previous buttons at the bottom of the table to paginate forward and back through the list.
To filter the list of objects displayed in the table, click Filter. Select a field to filter on, a filter operand (for example, "Equals" or "Starts With"), and the value to filter on. The fields you can filter on vary according to the type of object. See Filtering Mobile Backend Services object data for more information.
To quickly switch to another object type, click the Type drop-down menu and select the desired MBS type.
Click a row to expand it and view additional fields. To edit an object, either click its name in the row heading, or, click the Edit button (blue pencil icon) in the expanded row. To delete an object, click the Delete button (blue trash can icon). See Editing and Deleting objects.
Editing and Deleting objects
To edit an object, either click its name in the table row header, or click the Edit button to open the object in an edit form. To delete an object, click its table row to expand it, then click the Delete button.
Filtering Mobile Backend Services object data
Some MBS object tables can be filtered according to one or more queries that you define. To filter a table, click the Filter button in the table header. Clicking this button display the filter controls, which let you define filter rules.
- To add a new filter rule, click the add ( + ) button.
- To apply new or modified filters, click Apply Filters.
- To remove all filters, click Clear Filter.
Each rule consists of three parts:
- Field name – The name of the field to filter on. The list of filterable fields varies by object type.
- Operation – The operation to perform on the specified field (described in the table below).
- Value – The value to apply to the operation. This can either be a simple string value, regular expression, or a complex value specified in multiple form fields.
|Contained in||Number||Displays objects where the field value is within the range of the inputted values. The range is inclusive.|
Boolean, Date, Number, String
|Displays objects where the field value is the same as the inputted value.|
|Greater than||Date||Displays objects where the field value is greater than the inputted value.|
|Less than||Date||Displays objects where the field value is less than the inputted value.|
|Not equal to||Number, String||Displays objects where the field value is not the same as the inputted value.|
|Regular expression||String||Displays objects where the field value matches the regular expression.|
Note: Currently, only prefix matches are supported, that is, the regular expression must begin with an anchor (^) followed by a letter or digit. For example, '^a', '^a.*', and '^a.*$' are allowed, but not '^.*a*'.
|Starts with||String||Displays objects where the field value starts with the inputted value.|
For example, the Users table below has been filtered to display only those users who are application administrators, and whose username starts with the letter "S".
Deleting application data
You can delete all the MBS objects created by your application.
To delete all application data:
- Click Delete in the Manage Data Objects table.
- Click Continue or Cancel to stop the operation.
Exporting application data
You can export the data from your application to a JSON format, either for a specific time period or all MBS data. The export creates a JSON file for each MBS object type with a non-zero object count. Each object is output one per-line in the JSON file.
The following types of data objects are included by the export feature: ACLs, Chat Groups, Chatsd, Checkins, PhotoCollections, Custom Objects, Files, Email Templates, Events, Event Occurrences, GeoFences, Key Values, Likes, Messages, Photos, Places, Posts, Push Schedules, Push Notifications Subscriptions, Reviews, Statuses, and Users.
The following limitation apply to exported data:
- A maximum of 700,000 objects per MBS data type can be exported.
- A total of 9,800,000 (9.8 million) objects per applications can be exported.
For a given export, if the total number of objects of a specific MBS type data is over 700,000, or if the total number of objects being exported is over 9,800,000, the export will stop.
To export an application's data:
- On the Manage Data > Cloud screen, select the application whose data you want to export.
- Click Export.
- In the Export App Data dialog box, select All to export all application data, or to export data created during certain period of time, select Between and select a date range.
- Click Export App Data. When the export package is ready to download, an email will be sent to your Dashboard user's registered email address.
Creating Mobile Backend Services objects
Common object fields
Each MBS object has fields unique to its purpose and function. Several types of fields, listed below, are common to all object types.
- Owner/User – The MBS user on whose behalf the object was created.
- Created – Date the object was created.
- Updated – Date the object was last updated.
- ID – Object GUID.
- Custom Fields – One more name/value pairs you can define on an object. See Creating custom fields.
- Geo Coordinates – One or more geographic coordinates. See Creating Geo Coordinate.
- Tags – Comma-delimited list of strings to tag the object with.
- Access Control List – An ACL to restrict read or write access to the object.
Creating custom fields
Most all MBS object creation forms have a Custom Fields field you use to attach custom fields to the object. This allows you to annotate pre-built MBS objects, such as Photos or Chats, with custom data fields. In the screenshot below a custom fields named isNew has been added to a File object.
A custom field can be one of the following data types:
|Boolean||true or false|
|Number||23 or 1.234|
"2011-11-02 17:07:37 -0700".
If a string value matches date format "
To add a custom field to an object:
- In the Name field enter the custom field name.
- Select the field's data type from the Field Type menu.
- In the Value field, enter the custom field's value, or select it from the provided control (Boolean or Date fields, only).
- Click the create ( + ) button to create the custom field.
To delete a custom field from an object, hover your mouse over an existing custom field and click the blue X to delete it.
Creating Geo Coordinates
You can attach one or more latitude/longitude pairs to most MBS objects. For example, in the following screenshot the coordinate pair [22, 125] has been added as a Geo Coordinate.
When present on an object, the geo-coordinates field enables your application to query it by location. See Geographic Coordinates in the MBS Guide.