Manage your OAC instance from mobile

Eloi Lopes
2 min readJun 3, 2020

Oracle Analytics Cloud has several API’s available that help us to manage our instance through external applications(Web, scripts) or even an iOS/android app.

So, I built this android application using Oracle Visual Builder and OAC API’s. The application enables an OCI Administrator to Start/Stop/Scale Up/Scale down OAC instance from their mobile without enter in OCI console.

The main goal is show how customers can use OAC API’s capabilities and Oracle Visual Builder together.

How can we build this in Oracle Visual Builder?

The first step and the most important is to know what is needed to authenticate and manage your instance. We need to create the API Key in Oracle Visual Builder that is built by:

  • OCID User
  • OCID Tenant
  • Fingerprint
  • Private key

If you don’t know how to get this information, please check the links in the bottom of this article.

Your API key should have this structure:

<OCID Tenant>/<OCID User>/<Fingerprint>

For example : ocid1.tenancy.oc1..aaxxxxxxxxxxxxxxxxxxxxxxmzzzzzzzzzzzzzzzzz/ocid1.user.oc1..xxxxxxxxxxxxzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz/Af:1A:A1:11:11:11:11:11:a0:1a:A1:02:93:1A:11:7A

The private key must be the same that you have used to generate the fingerprint. Once we have this information, we can create the EndPoint in Oracle Visual Builder that will allow us to connect to our instance.

Configuring the OAC Endpoint

My instance is in Frankfurt so, I’m using the API endpoint for that location:

https://analytics.eu-frankfurt-1.ocp.oraclecloud.com/20190331/analyticsInstances/<YOUR ANALYTICS INSTANCE ID

Open the Oracle Visual Builder and create a new APP. Now, we have to configure our endpoints.

  • Click on Service Connections;
  • Choose Define by Endpoint (For example, “Get”);
  • After, create a server connection;
  • Make sure the instance URL is correct;
  • Choose the authentication -> Oracle Cloud Infrastructure API Signature 1.0;
  • Click on “pencil” in API key to edit and paste the String that you built in the beginning of this article and paste your private key. Click save and create;
  • In Endpoint tab you should see you “Get Endpoint”, click on it and After test and Send, now you should see the response of your endpoint.

Now you can use all OAC API’s as you want. Not only in Oracle Visual Builder but also using programing languages as Python, NodeJS, GO, Java, Shell Script, Bash etc.

You can find an example in my GitLab for NodeJS:

If you have any doubts, please let me know.

Documentation

--

--

Eloi Lopes
Eloi Lopes

Written by Eloi Lopes

Opinions expressed are solely my own and do not express the views or opinions of my employer Oracle. https://www.linkedin.com/in/eloilopes/

No responses yet