Integrate Oracle Mobile Cloud Service with Oracle IoT Cloud Service

Integrating your Oracle IoT Cloud Service instance to Oracle Mobile Cloud Service allows you to process and analyze the data received from your mobile devices. The integration requires that you already have a subscription to Oracle Mobile Cloud Service.

To create the integration to Oracle Mobile Cloud Service:
  1. Create a Mobile Backend using the Developer Portal page of your Oracle Mobile Cloud Service instance.
  2. Select that Mobile Backend and click Settings on the left navigation area.
    The Settings page is displayed, similar to the image below.
  3. In the HTTP Basic Authentication section, copy and save the value that’s in the Mobile Backend ID text field, which is circled in the above image.
    You will need this value when you set up the integration.
  4. Create a mobile user whose credentials you will use when you configure your Mobile Cloud Service integration.
    1. Click Users in the left navigation area and then click New User on the right pane.
    2. In the New User dialog, enter the required values for Username, Email, First Name, and Last Name.
    3. In the Roles section, specify theIoT_Generic role for this new user, as shown in the image below.
      If the IoT_Generic isn’t defined in your backend yet, click Create role to create the IoT_Generic role, as illustrated below.
  5. Define a collection in your Oracle Mobile Cloud Service instance.
    This collection will provide a way to store the messages that will be received via the Oracle IoT Cloud Service integration.
    1. Click Storage in the left navigation area.
    2. Click New Collection on the right pane.
    3. Specify the required value for the Collection Name text field..
      For example, you can name it IoT_Messages.
  6. Specify the user role to use for the collection that you just created.
    1. In the Storage page, select the newly created collection and edit it by clicking the pencil icon on the right side.
    2. In the Permissions section, specify the IoT_Generic role in the Read-Write setting, as illustrated in the image below.
  7. Determine the REST URL and payload that will be used by Oracle IoT Cloud Service to send messages to the collection that was just created.
    1. Click APIs in the left navigation area.
    2. Click Storage on the bottom of the screen, as shown below.
      In the resulting page, you will see information on the REST URLs for connecting to the collection.
    3. Click the POST link in the left pane, as shown in the image below.
      The top portion of the right pane is updated with the POST URL, as circled at the top portion of the image below.
    4. Copy and save the POST URL value.
      You will use this value when you set up the integration between Oracle IoT Cloud Service and Oracle Mobile Cloud Service.
  8. In Management Console UI of your Oracle IoT Cloud Service instance, click Applications.
    Integrations are configured within the scope of an IoT Application.
  9. Click the name of the IoT Application that you want to integrate with Oracle Mobile Cloud Service or create a new one, if necessary and click Integration on the left navigation area
  10. Configure the integration with Oracle Mobile Cloud Service.
    1. Click Create Integration.
    2. Select Mobile Cloud Service, as shown in the image below.
    3. In the Mobile Cloud Service dialog, pictured below, enter all the required values.
      • Name - name of your choice for your integration

      • Description - optional value of your choice

      • URL - the POST URL you obtained in step 6c above.

      • Username and Password - the mobile user credentials you created in step 4 above.

      • MCS Backend ID - the Mobile Backend ID you obtained in step 3 above.

    4. (Optional) Click Verify Connectivity to test the connection between Oracle Internet of Things Cloud Service instance and the target service or application.
      The connectivity test can include:
      • DNS Resolution Test: Checks whether the server name resolves to an IP address.

      • Connectivity Test: Checks whether the IP address is reachable.

      • IP/Port test: Checks whether you can talk to the target URL on the specified port.

      • SSL Verification Test: Checks whether you have a secured, or trusted, connection to the target. Applies only if the target is an SSL endpoint.

      • Authentication Test: Checks whether you can exchange messages with the target.

    5. Click Create
  11. After you’ve completed the integration set up and your IoT application is completely configured, verify that the messages that originated from one of the registered devices was sent to your Oracle IoT Cloud Service instance, processed by an IoT Application containing an Oracle Mobile Cloud Service integration, and sent to the Oracle Mobile Cloud Service collection that you’ve set up above.
    The image below shows what a collection that was received from Oracle IoT Cloud Service instance would look like when viewed via the Storage page of an Oracle Mobile Cloud Service instance.
The integration with Oracle Mobile Cloud Service is now configured. If you run into issues, make sure that you’ve correctly entered the values you obtained from the set up steps you performed using the Oracle Mobile Cloud Service instance.