Create a Mobile Backend in Oracle Mobile Hub

With Oracle Mobile Hub, you can develop mobile client-server applications and deploy several APIs designed to support tasks like user management, database access, location services, analytics, etc. These APIs make integrations with other Oracle Cloud solutions, REST Services, and mobile client applications possible.

About Mobile Backends

A mobile backend within Oracle Mobile Hub is a group of secure APIs and other resources used for developing client-server mobile applications.

You can use Oracle Mobile Hub to group and manage different APIs that together define a mobile backend.

In Oracle Mobile Hub, you can have multiple backends, each serving different client mobile applications. However, you can also have multiple APIs shared among different backends. The following image shows a typical mobile backend architecture in Oracle Mobile Hub:

Description of mobile-backend-architecture.jpg follows
Description of the illustration mobile-backend-architecture.jpg

When a client mobile application accesses an API through Oracle Mobile Hub, it's always within the context of a mobile backend. The application can authenticate using credentials defined within Oracle Mobile Hub (OAuth or basic HTTP authentication) specific to the mobile backend or through an identity store (or social log-in provider) that is mediated by your mobile backend. If the called API includes calls to other APIs within the backend, the identity and credentials of the original caller are propagated through the chain of calls.

Working in mobile backends helps you to visualize the resources available for the target apps and how they will work together. In addition, you can use the mobile backend security context to test calls to your APIs, even in the earliest stages of development.

Create a Mobile Backend in Oracle Mobile Hub

In Oracle Mobile Hub, you can create mobile back-ends to associate APIs, and storage collections, and then integrate them with your client-side mobile applications.

To create a mobile backend in Oracle Mobile Hub:
  1. Sign in to Oracle Mobile Hub.
  2. Click the menu icon, and then select Development, and then Backends.
  3. Click New Backend.
  4. Enter a name and a description for the mobile backend.
  5. Click Create.
    The mobile backend is created and its Settings page opens.
  6. Under the Settings page, enable the option for OAuth Consumer.
  7. Click the Enable Single Sign-On checkbox.
After you create your backend, it should appear in the Applications section of Oracle Mobile Hub under Mobile Backends.

Associate an API with an Oracle Mobile Hub Mobile Backend

Before using your mobile backend, you need to associate an API. You can use theOracle Mobile Hub API Catalog to select the custom APIs you want to access with your mobile backend. This catalog provides details about each API endpoint and documentation. It also lets you test your endpoints with sample data.

To associate APIs with your mobile backend make sure you are in the environment that contains the draft mobile backend.
  1. Sign in to Oracle Mobile Hub.
  2. Click the menu icon, and then expand Development and click Backends.
  3. Select your mobile backend and click Open.
  4. Click APIs.
  5. Click Select APIs.
  6. Click the add icon for each API that you want to include in your mobile backend.

Create a Storage Collection

Oracle Mobile Hub provides a storage API for storing media in the cloud. As a mobile application developer, you can use this API in your mobile application to store and retrieve objects, such as files, text, images, and JSON objects.

  1. Open the Storage page either from a mobile backend or by clicking Storage in the side menu, and click New Collection.
  2. Enter a name for your collection. This name is used to form the Universal Resource Identifier (URI) for the collection. Within the context of the API call, the collection name is referred to as the collection ID.
  3. Choose the collection type: Shared or User Isolated. You can’t change the scope of the collection after is set.
  4. If needed, enter a short description for the purpose of the collection, to be displayed in the list of collections, and then click Create.