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 Titanium, iOS, Android or Node.js SDKs, or by calling the REST APIs directly.
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.
- Log into Dashboard.
- Click the Add menu (+) in the top navigation bar.
- Select Create Mobile Backend Services Datasource.
- Enter a name for the datasource.
- If you have multiple environments, select the environments to enable for the datasource.
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.
- Titanium Cloud Module
- Appcelerator Platform Services API Reference for Android
- Appcelerator Platform Services API Reference for iOS
- Node.js SDK
- Mobile Backend Services API docs
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/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:
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: