Would you like to contribute to the Titanium docs? To get started, sign up for an account on the Appcelerator Wiki and sign our CLA.

Skip to end of metadata
Go to start of metadata

Mobile Backend Services (MBS) provides a set of REST APIs for creating, managing, and accessing different types of data in your cloud datasoucrce, such as Users, Places, and Photos over HTTP or HTTPS. You can integrate MBS into your application using the TitaniumiOSAndroid or Node.js SDKs, or by calling the REST APIs directly.

To manage your application and its data—for example, to create or edit Users or manage Photos—you use Dashboard.

This guide explains how to create a standalone MBS datasource and make API calls to the datasource using the REST APIs. For integrating MBS with a specific platform, see the following SDK guides:

Create an Mobile Backend Services datasource

You can create either a standalone MBS datasource or create an MBS datasource associated with a Titanium, Android or iOS application.

Standalone Mobile Backend Services datasource

A standalone MBS datasource does not have a specific client application associated with it. Use a standalone MBS source if you want multiple applications to access the same datasource, or if your client application is not Titanium, Android or iOS.

  1. Log into Dashboard.
  2. Click the Add menu (+) in the top navigation bar.
  3. Select Create Mobile Backend Services Datasource.
  4. Enter a name for the datasource.
  5. If you have multiple environments, select the environments to enable for the datasource.
  6. Click OK.

    To make calls to MBS, you will need your MBS applications key. After Dashboard creates the datasource, click Configuration in the left navigation, then click the Show link next to App Key. Use the MBS application key to make requests to MBS. Note that you have a key for each deployment environment. 

Mobile Backend Services with Titanium

Use Studio or the CLI to enable platform services and create an MBS datasource associated with a Titanium application. After creating the application, load the ti.cloud module to make requests to MBS.

For directions, see the Titanium SDK Guide.

Mobile Backend Services with Android or iOS

Use Dashboard to register an Android application built with Java or iOS application built with Objective-C or Swift. The registration process creates a new MBS datasource associated with the application. Then, use the APS SDKs to integrate MBS services with the application.

For directions, see:

Make calls to Mobile Backend Services

You can make calls to MBS using the following SDKs and modules, or by making HTTP requests directly to MBS.

To make MBS calls from other applications, you need to use the platform's native HTTP client to make HTTP requests directly. You will need to pass the MBS application key in the URL as the key parameter with each request.

For example, the following Ruby code uses the Net::HTTP library to make an MBS request:

For requests that require a user to be logged in, you will need to retrieve the session_id from the meta header of the response from either the users/login.json or users/create.json method, then pass the session_id in the URL as the _session_id parameter with the request.

The SDKs and modules provided by Appcelerator abstract the HTTP request and will automatically handle passing the application key and session ID between the client application and MBS datasource. For example, the following is an equivalent call using the Titanium Cloud module:

Next steps

Review the REST Guide if you are making HTTP requests directly to MBS, and the Mobile Backend Services API reference, which contains Titanium, REST, Android, iOS and Node.js examples. To setup a specific type of client application, see the following SDK guides: