Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 33 Next »

Mobile Backend Services (MBS) admin access allows application admin users to execute some batch operations and make MBS API calls on behalf of another user.

Create an admin user

Before creating an admin user, log in to the Dashboard and select your application.

  1. Log into the Platform.
  2. Select Dashboard on the Dashboard tile.
  3. Select an application from the Projects tab.

Then, either create a new admin user or add admin access to an existing user.

Create a new admin user

  1. In the left navigation bar, click Manage Data.
  2. In the main pane, click Users.
  3. Click + Create User. A dialog appears.
  4. Under the Admin section, click the Yes radio button.
  5. At a minimum, enter a username, email, and password.
  6. Click Save Changes.

Mobile Backend Services creates a new user with admin access.

Add admin access to an existing user

  1. In the left navigation bar, click Manage Data.
  2. In the main pane, click Users.
  3. Locate the user you want to give admin access to and click the username to edit the user.
  4. Locate the Admin section and click the Yes radio button.
  5. Scroll down and click Save Changes.

This user now has admin access. To disable access, follow the same steps except click the No radio button.

Perform Mobile Backend Services API calls on behalf of another user

An admin user can perform MBS API calls on behalf of another user. For example, when you specify the su_id parameter to an ID of another user as part of the create method, the admin user creates an object on behalf of that user. The user parameter for the object will be reported as the other user, not the admin user.

This admin operation is supported by any create, update and delete method, as well as the following methods:

For example, the following curl command creates a new status for the specified user:

 Expand source

To verify that the other user created this status and not the admin user, run the following curl command and compare the user IDs:

 Expand source

Batch delete

Mobile Backend Services provides an API endpoint named batch_delete that allows application admins to delete multiple MBS objects in one operation. The method takes a where parameter that constrains the selection of objects to delete. If the where parameter is omitted, all objects are deleted. For performance reasons, the number of objects that can be deleted in a single batch delete operation is limited to 100,000. Objects are deleted asynchronously in a separate process, not immediately upon method invocation.


If the where parameter is omitted, all objects are deleted. For example, if the where parameter is omitted from a batch delete of User objects, all users will be deleted.

Certain MBS objects can have dependencies on other objects. For example, when you create a Checkins object you can specify a Places or Events object to associate with it. In this case, the Checkins object is a dependency of the Places or Events object. If you delete the Places or Events object, the dependent Checkins object is not deleted.

For example, the following deletes all Users objects whose favorite_color custom field is 'blue'.

Note that the method returns an HTTP 200 code (success) even if the query matched no objects.

The following MBS objects support batch delete operations:

Admin drop custom collection

An application admin user can also drop a Custom Object collection using the admin_drop_collection method. When calling the admin_drop_collection method, the admin user must specify a class name to indicate which custom collection to drop.

For example, the following drops the car collection:

Only Custom Objects support the drop custom collection method.

  • No labels