Tushar`s blog

Monday, 23 December 2024

Elevate Employee Experiences with BMC Helix | Self-Service Portal | Heli...

- December 23, 2024 No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Wednesday, 25 August 2021

Download the IBM Watson Assistant Conversation Logs

Logs Python script

The export_logs.py file is a Python script that you can use to export logs from a workspace, and convert them into CSV format.

Steps before downloading the logs

  1. You must have the python install in your local machine.
  2. Once your python machine will get executed, you must have to download the python libraries to proceed further.
  3. The respective libraries are like pandas, Watson_devloper_cloud. 
  4. Install these libraries with the command of pip install pandas and pip install ibm-watson
  5. If you get any other error, just put it over google and follow the stack overflow for the workaround. The errors are usually related to module. Just simply install it to your machine by using install command.
  6. Command to execute the python script:  python export_logs.py <IBM Workspace SKILL ID> --apikey <IBM Workspace API KEY>
  7. In order to put the filter on IBM data you can use this argument under # Set up arguments section.

#parser.add_argument('--filter', help='Search filter to use.', type=str, default='response_timestamp>='+str(last_monday)+'T00:00:00.000Z'+',response_timestamp<='+str(today))

---------------------------------------------------------------------------

import pandas as pd

import argparse

import json

from datetime import date

import datetime

import watson_developer_cloud

from pandas.io.json import json_normalize

from watson_developer_cloud import AssistantV1 as WatsonAssistant

from urllib.parse import urlparse, parse_qs

from ibm_watson import AssistantV1

from ibm_cloud_sdk_core.authenticators import IAMAuthenticator

from ibm_watson import ApiException

import urllib3

urllib3.disable_warnings()


today = date.today()

print("Today's date:", today)

last_monday=today- datetime.timedelta(days=(7))

print('From: '+str(last_monday)+' To: '+str(today))


# Set up arguments. 

parser = argparse.ArgumentParser()

parser.add_argument('workspace_id', help='Watson Assistant workspace ID', type=str)

parser.add_argument('--userpass', help='Watson Assistant service username:password. Cannot be used with --apikey', type=str, default=None)

parser.add_argument('--apikey', help='Watson Assistant API Key. Cannot be used with --userpass', type=str, default='<IBM Workspaace Skill ID>')

parser.add_argument('--filename', help='Output file name.',type=str, default='Watson_Log_'+str(today)+'.csv')

parser.add_argument('--filetype', help='Output file type. Can be: CSV, TSV, XLSX, JSON (default)', type=str, default='CSV', choices=['CSV','TSV','XLSX','JSON'])

parser.add_argument('--url', help='Default is https://gateway-fra.watsonplatform.net/assistant/api', type=str, default='https://gateway-fra.watsonplatform.net/assistant/api')

parser.add_argument('--version', help='Default = 2018-09-20', type=str, default='2020-04-01')

parser.add_argument('--totalpages', help='Maximum number of pages to pull. Default is 999', type=int, default=999)

parser.add_argument('--pagelimit', help='Maximum number of records to a page. Default is 200.', type=int, default=200)

parser.add_argument('--filter', help='Search filter to use.', type=str, default='')

#parser.add_argument('--filter', help='Search filter to use.', type=str, default='response_timestamp>='+str(last_monday)+'T00:00:00.000Z'+',response_timestamp<='+str(today))

args = parser.parse_args()


#python export.py <IBM Workspace SKILL ID> --apikey <IBM Workspace API KEY>


## This part is used for saving dataframes. 

f_conversation_id = 'conversation_id'

f_request_timestamp = 'request_timestamp'

f_response_timestamp = 'response_timestamp'

f_user_input = 'User Input'

f_output = 'Output'

f_intent = 'Intent'

f_confidence = 'Confidence'

f_exit_reason = 'Exit Reason'

f_logging = 'Logging'

f_context = 'Context'

f_chatbot_name = 'chatbot_name'

f_sys_full_name = 'sys-full-name'

f_country = 'country'

f_locationName = 'locationName'

f_cityName= 'cityName'

f_loginName = 'loginName'

f_chatId= 'chatId'

f_sessionId= 'sessionId'


columns = [

    f_chatbot_name, f_conversation_id, f_chatId, f_sessionId, f_sys_full_name, f_loginName, f_country, f_cityName, f_locationName, f_request_timestamp, f_response_timestamp, 

    f_user_input, f_output, f_intent, f_confidence, f_exit_reason, f_logging, f_context

]


## Saving methods. 

def save_json(data=None,file_name=None):

    with open(file_name, 'w') as out:

        json.dump(data,out)


def save_xsv(data=None, sep=',', file_name=None):

    df = convert_json_to_dataframe(data)

    if df is not None:

        df.to_csv(args.filename,encoding='utf8',sep=sep,index=False)


def save_xlsx(data=None, file_name=None):

    df = convert_json_to_dataframe(data)

    if df is not None:

        df.to_excel(args.filename,index=False)


def convert_json_to_dataframe(data=None):

    rows = []


    if data == [[]]:

        print('No Logs found. :(')

        return None


    for data_records in data:

        for o in data_records:

            row = {}

            

            # Let's shorthand the response and system object.

            r = o['response']

            s = r['context']['system']

                

            row[f_conversation_id] = r['context'][f_conversation_id]

            row[f_request_timestamp] = o[f_request_timestamp]

            row[f_response_timestamp] = o[f_response_timestamp]

            row[f_chatbot_name] = r['context'][f_chatbot_name]

            row[f_sys_full_name] = r['context'][f_sys_full_name]

            row[f_loginName] = r['context'][f_loginName]

            # row[f_country] = r['context'][f_country]

            # row[f_cityName] = r['context'][f_cityName]

            # row[f_locationName] = r['context'][f_locationName]

            row[f_chatId] = r['context'][f_chatId]

            row[f_sessionId] = r['context'][f_sessionId]

            

            if 'text' in r['input']: row[f_user_input] = r['input']['text']

            if 'text' in r['output']:row[f_output] = ' '.join(r['output']['text'])

                

            if len(r['intents']) > 0:

                row[f_confidence] = r['intents'][0]['confidence']

                row[f_intent] = r['intents'][0]['intent']


           

            if 'branch_exited_reason' in s: row[f_exit_reason] = s['branch_exited_reason']

            

            if 'log_messaging' in r['output']: row[f_logging] = r['output']['log_messaging']

            

            row[f_context] = json.dumps(r['context'])

            

            rows.append(row)


    # Build the dataframe. 

    df = pd.DataFrame(rows,columns=columns)


    # cleaning up dataframe. Removing NaN and converting date fields. 

    df = df.fillna('')

    df[f_request_timestamp] = pd.to_datetime(df[f_request_timestamp])

    df[f_response_timestamp] = pd.to_datetime(df[f_response_timestamp])


    # Lastly sort by conversation ID, and then request, so that the logs become readable. 

    df = df.sort_values([f_conversation_id, f_request_timestamp], ascending=[True, True])


    return df


## Make connection to conversation. 

if args.userpass != None and args.apikey == None:

    up = args.userpass.split(':')

    username = up[0]

    password = up[1]

    c = WatsonAssistant(url=args.url, version=args.version, username=username, password=password)


elif args.apikey != None and args.userpass == None:

        

    authenticator = IAMAuthenticator(args.apikey)

    assistant = AssistantV1(

    version='2020-04-01',

    authenticator = authenticator

    )


    assistant.set_service_url('https://api.au-syd.assistant.watson.cloud.ibm.com')


    response=assistant.list_logs(

    workspace_id=args.workspace_id

    ).get_result()


    #print(json.dumps(response, indent=2))

    

else:

    print('You must set --userpass or --apikey to run. Exiting.')

    exit(1)




## Download the logs.

j = []

page_count = 1

cursor = None

count = 0


x = { 'pagination': 'DUMMY' }

while x['pagination']:

    if page_count > args.totalpages: 

        break


    print('Reading page {}.'.format(page_count))

    x = assistant.list_logs(workspace_id=args.workspace_id,cursor=cursor,page_limit=args.pagelimit, filter=args.filter)

    x = x.result  # Assistant V2 update.

    

    j.append(x['logs'])

    count = count + len(x['logs'])


    page_count = page_count + 1


    if 'pagination' in x and 'next_url' in x['pagination']:

        p = x['pagination']['next_url']

        u = urlparse(p)

        query = parse_qs(u.query)

        cursor = query['cursor'][0]

    

## Determine how the file should be saved. 

args.filetype = args.filetype.upper()

if args.filetype == 'CSV':

    save_xsv(data=j,sep=',',file_name=args.filename)

elif args.filetype == 'TSV':

    save_xsv(data=j,sep='\t',file_name=args.filename)

elif args.filetype == 'XLSX':

    save_xlsx(data=j, file_name=args.filename)

else:

    save_json(data=j,file_name=args.filename),

 

print('Writing {} records to: {} as file type: {}'.format(count, args.filename, args.filetype))


--------------------------------------------------

Code Execution





- August 25, 2021 No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: IBM Logs, IBM Watson Assistant, Tushar Blog, Varshney blog, Watson logs

Monday, 9 July 2018

Degrading android version to build the APK

To build an apk for android device, you need to first degrade your android version to 6.2.3.

Here is the command to remove the existing Android version.

Steps: You have to go to your Hybrid folder in your root directory.

command: cordova platform remove android

Example: D:\SVN Repo\07-06-2018\MOBILEAPP\hybrid>cordova platform remove android

Here is the command to add the Android version.

command: cordova platform add android@6.2.3

Example: D:\SVN Repo\07-06-2018\MOBILEAPP\hybrid>cordova platform add android@6.2.3

Once you have added the Android version then build your apk file to run on the mobile device.

Grunt command: 

Build project: build --platform=android
Run project: serve --platform=android --device=Nexus_6P_API_27

Ojet command to generate the debug- apk file

ojet build android

Note : Use ojet command to build the apk. This is more stable.

Your apk path:

 D:/SVN Repo/07-06-2018/MOBILEAPP/hybrid/platforms/android/build/outputs/apk/android-debug.apk


- July 09, 2018 No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Sunday, 8 July 2018

Code to retrieve an image from Oracle mobile cloud Storage collection

Calling the Storage API from Your App


Here’s code you can use to retrieve an image :

<html>
<body>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
<img id="img" width=100%>


<script>
jQuery.ajax({
async: true,
  crossDomain: true,
  cache:false,
        url:'https://Your IDCS domain/mobile/platform/storage/collections/Your Collection name/objects/Your image object Id',
        method: "GET",
  headers: {
    authorization: "Your Mobile backend Authorization token",
    
'oracle-mobile-backend-id': "Your Mobile Backend ID"
   
},
xhr:function(){
            var xhr = new XMLHttpRequest();
            xhr.responseType= 'blob'
            return xhr;
        },success: function(data){
            var img = document.getElementById('img');
            var url = window.URL || window.webkitURL;
            img.src = url.createObjectURL(data);
        },
        error:function(){
            
        }
    });
</script>
</body>
</html>

For more information Please refer this Oracle Mobile Cloud URL link.
- July 08, 2018 No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Wednesday, 4 July 2018

Get State,City name from a latitude and longitude

JavaScript and Geolocation

In our JavaScript, we can use getCurrentPosition() method to obtain user’s current location, but first, we need to know whether Geolocation API is available in the browser before we can continue.

Geolocation API is an important feature available in modern HTML5 web browsers, which allows us to request current location of the user using JavaScript, the location information is represented by latitude and longitude coordinates. For privacy reasons, the user permission is required to access its location information.



<p><button onclick="getLocation()">Get My Location</button></p>
<p id="demo"></p>
<script src="http://maps.google.com/maps/api/js?key=AIzaSyCiRgLZ_8pFomu9f-7TEzhsgQmY4Q-c11c"></script>

<script>
var x=document.getElementById("demo");
function getLocation(){
    if (navigator.geolocation){
        navigator.geolocation.getCurrentPosition(showPosition,showError);
    }
    else{
        x.innerHTML="Geolocation is not supported by this browser.";
    }
}

function showPosition(position){
    lat=position.coords.latitude;
    lon=position.coords.longitude;
    displayLocation(lat,lon);
}

function showError(error){
    switch(error.code){
        case error.PERMISSION_DENIED:
            x.innerHTML="User denied the request for Geolocation."
        break;
        case error.POSITION_UNAVAILABLE:
            x.innerHTML="Location information is unavailable."
        break;
        case error.TIMEOUT:
            x.innerHTML="The request to get user location timed out."
        break;
        case error.UNKNOWN_ERROR:
            x.innerHTML="An unknown error occurred."
        break;
    }
}

function displayLocation(latitude,longitude){
    var geocoder;
    geocoder = new google.maps.Geocoder();
    var latlng = new google.maps.LatLng(latitude, longitude);

    geocoder.geocode(
        {'latLng': latlng},
        function(results, status) {
            if (status == google.maps.GeocoderStatus.OK) {
                if (results[0]) {
                    var add= results[0].formatted_address ;
                    var  value=add.split(",");

                    count=value.length;
                    country=value[count-1];
                    state=value[count-2];
                    city=value[count-3];
                    x.innerHTML = "state name is: " + state ;

<!--Below method is used to remove PIN Code from the String using Regex method. You can use an online tool to customize your String. https://txt2re.com/index-javascript.php3?s=Uttar%20Pradesh%20201301&11&4-->

var txt=state;
      var re4='(\\s+)'; // White Space 1
      var re5='(\\d+)'; // Integer Number 1

      var p = new RegExp(re4+re5,["i"]);
      var m = p.exec(txt);
      if (m != null)
      {
          var ws1=m[1];
          var int1=m[2];

  var remove = ws1 + int1;

          <!-- document.write("("+ws1.replace(/</,"&lt;")+")"+"("+int1.replace(/</,"&lt;")+")"+"\n"); -->
    var res = txt.replace(remove, "");

x.innerHTML = "state name is: " + res ;

      }


                }
                else  {
                    x.innerHTML = "address not found";
                }
            }
            else {
                x.innerHTML = "Geocoder failed due to: " + status;
            }
        }
    );
}

</script>
- July 04, 2018 No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Monday, 25 June 2018

Create Oracle JET Hybrid Mobile Application

In this blog, I will explain the steps involved in creating a hybrid mobile app using Oracle JET

Follow the below steps to get started :

1) Install Node.js on your development machine. Download from here https://nodejs.org/en.After installation, you should be able to run npm commands.
2) Run cmd as Administrator and then run the below commands to install various modules via npm :

There are two ways to create Oracle JET Hybrid mobile application

(i) For ojet 4.1 or later use the below steps:

You can just install  oracle-jet cli and Cordova to get started

npm install -g @oracle/ojet-cli cordova

@oracle-jet cli contains the oraclejet generator, so there is no need to install it separately. Also to install a specific version of the oracle jet-cli use @version

eg.
npm install -g @oracle/ojet-cli@5.0.0 cordova

You can build and serve your app using ojet command-

Build JET  app for android:
ojet build android

Serve JET  app for android:
ojet serve android
  
    
(ii) For ojet 2.0 use the below steps: 

    a. Install Yeoman :  

        npm install -g yo

Enter npm list –g yo to verify that the command succeeded. If the package isn’t listed, scroll through the install command output to locate the source of the failure.

    b. Install Grunt :  

        npm install -g grunt-cli

    c. Install Bower :  

        npm install -g bower

           d. Install Cordova  :  

        npm install -g cordova

    e. Install generator-oraclejet


               npm install -g generator-oraclejet

Note:  you can check the above installed packages and their versions using  
                                                                

                                                                      npm list -g --depth=0



3) Install Mobile tooling to deploy, debug on devices

Install Android Tools
To develop applications for the Android platform, you must install the Android SDK and create Android Virtual Devices (AVDs) so that you can run your app in the Android emulator. 

Use Cordova’s Android Platform Guide to install the Android tools on your machine.

Install iOS Tools

Use Cordova’s iOS Platform Guide, install Xcode and the iOS Simulator on your IOS machine. This step is sufficient for developing iOS applications and testing it.

Create a simple hybrid mobile project using ojet command
ojet create myHybridApp --hybrid --appid="com.oracle.myApp" --appname="MyHybridApp" --platforms=ios,android --template=navdrawer

You can build and serve your app using ojet command-

Build JET  app for the Android platform:
ojet build android

Serve JET  app for android platform:
ojet serve android


- June 25, 2018 3 comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

Monday, 18 June 2018

Mobile Backends




Mobile Backends


Oracle Mobile Cloud Service (MCS) is built around the concept of mobile backends, which enables you, as a mobile app developer, to develop and deploy groupings of APIs that are designed to support a specific set of mobile apps. You can then associate one or more apps with the mobile backend to access those APIs.
Steps to access the Mobile Backend: 
  • Login to the IDCS account

  • Click on the Database

  • Click on the Instance


  • Click on the mobile Core Pod
  • Expand the Load balancer and there you will see the URL
  • Add /mobileui with your URL and then you will be able to redirect to your Mobile Backend.




Description of mbe_arch.png follows
Description of the illustration mbe_arch.png


What Is a Mobile Backend and How Can I Use It?

A mobile backend is a secure grouping of APIs and other resources for a set of mobile apps. Within a mobile backend, you select the APIs that you want available for those apps. For any apps that you want to receive notifications, you can also register the appropriate credentials for the given network (e.g. APNS, GCM, or WNS) in the mobile backend.
You can have multiple backends, each serving a set of applications. In addition, you can have APIs that are used by multiple backends.
When an app accesses APIs through MCS, it is always in the context of a mobile backend. The app authenticates with credentials (OAuth Consumer or HTTP Basic Authentication) specific to the mobile backend or through an identity store (or social login 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.
You don't have to start your work in MCS with a mobile backend (for example, you could start developing custom APIs or set up storage collections first without associating them with any mobile backends). But you may find it useful to do so. Working in mobile backends helps you visualize the resources available for the target apps and how they will work together. In addition, you can use the mobile backend's security context to test calls to your APIs, even in the earliest stages of development.


What's the Mobile Backend Development Process?

Generally speaking, using MCS entails developing APIs, grouping them in mobile backends, and developing mobile apps that use these mobile backends. The development model is flexible, allowing you to work on APIs, mobile backends, and mobile apps largely in parallel.
As shown in this figure, the general workflow includes steps both for creating and filling out the mobile backend and for setting up your app to work with the mobile backend.
Description of mbe-overall-process.png follows
Description of the illustration mbe-overall-process.png


Creating and Populating Mobile Backends

You create and populate mobile backends directly in Oracle Mobile Cloud Service. Once you have created a mobile backend, you can associate APIs and Storage collections with it, and register client apps that will use the mobile backend.
Description of mbe-user-process-grouped.png follows
Description of the illustration mbe-user-process-grouped.png


Creating a Mobile Backend

  1. Make sure you're in the environment where you want to create the mobile backend.
  2. Click icon to open the side menu to open the side menu and select Applications > Mobile Backends.
  3. Click New Mobile Backend.
  4. Enter a name for the mobile backend and a description.

Mobile Backend Authentication and Connection Info

The following authentication and connection details are generated when you create a mobile backend and are displayed on the mobile backend’s Settings page. Your apps use these details to connect to and authenticate with APIs associated with that mobile backend. These credentials can be used by every application associated with that mobile backend.
  • Environment URLs
    • The Base URL is needed for all API calls. This URL is distinct for each environment that you have provisioned.
    • The OAuth Token Endpoint is the URL that your app needs to use to make OAuth token requests.
    • A SSO Token Endpoint is also provided if you enable OAuth and then enable single sign-on (SSO) for your mobile backend. Your app would use this URL to obtain a single sign-on OAuth token in order to login through a remote identity provider.
  • A set of Authentication Keys, which your app needs to access APIs through the mobile backend. Keys are generated for both OAuth Consumer and HTTP Basic authentication. Use the toggle switch next to each to enable or disable access through that protocol.
    A set of Access Keys, which your app needs to access APIs through the mobile backend. Keys are generated for both OAuth Consumer and HTTP Basic authentication. Use the toggle switch next to each to enable or disable access through that protocol. For OAuth, you can also enable SSO in order to allow your company’s identity provider to be used authenticate users.
    OAuth Consumer keys are generated in the form of a client ID and a client secret. These two values are unique to this mobile backend.
    HTTP Basic Authentication keys are generated for you in the form of a mobile backend ID and an anonymous key.
    These keys are also unique by environment. When you deploy a mobile backend to a different environment, a new set of keys is generated for the copy of the mobile backend that is added to the target environment.
    If you suspect that these credentials have been compromised (such as by an application handling them insecurely), click Refresh to replace the credentials with new ones or click Revoke to cancel the existing credentials without generating replacements.
    Note:
    Think twice before refreshing or revoking credentials, since these actions will block any calls that any existing apps make through the mobile backend. To get the apps working properly again after credentials have been revoked or refreshed, you need to rebuild the apps with the new credentials and redeploy them.
For details on using the various authentication methods, see Authentication in MCS.
To make it easier to incorporate these details in your apps, use the MCS SDKs for your app platforms. See The SDKs.

Environments and Mobile Backends

All work on mobile backends takes place in the context of an environment. You can use a separate environment for each phase in the mobile backend lifecycle, such as development, testing, and production.
Typically you create a mobile backend in an environment that you have designated for development, publish that mobile backend, and then deploy it to another environment for testing. Once thoroughly tested, you would then deploy the mobile backend to your production environment.
For more on environments, see What is My Environment?.

Realms and Mobile Backends

A realm is the security context for a set of users that defines a set of properties that contain information on the user, such as user ID and user name as well as any custom information that is relevant to the purpose of the apps using that realm.
You can have different realms for different purposes. Each mobile backend in an environment can be associated with only one realm, but multiple mobile backends can be associated with the same realm, allowing them to use a shared set of users and data. When you create a mobile backend, it is assigned to the default realm for the environment.
You can change the realm associated with a mobile backend from the Users tab of the mobile backend. Realms are typically handled by users with the Oracle Cloud identity domain administrator role. If you don’t have that role and you need to change the mobile backend’s realm, contact someone who does have that role. For details on the default realm, see Setting the Default Realm for an Environment.
Even when a mobile backend is configured to allow login through enterprise SSO, it needs a realm that contains records for the users that log in through SSO. In this case, the realm would define only the properties needed to match the user records with those in the identity provider (such as user name or email address).
Note:
When you change the realm for a mobile backend, the user properties and user data also change. Make sure that the new realm includes all the properties required by any mobile apps in the mobile backend.

Changing a Mobile Backend's Realm
  1. Make sure you're in the environment where you want to change the realm.
  2. Click icon to open the side menu to open the side menu and select Applications > Mobile Backends.
  3. Open the mobile backend. (Select it and click Open.)
  4. Click the Users tab. This tab lets you search for and manage users, and change the realm for the mobile backend.

Getting Test Users for a Mobile Backend

You’ll probably find it useful to have one or more test users set up in the realm associated with your mobile backend. Among other things, this will make it easier to try out APIs in your mobile backend. As an app developer, you probably don’t have the permissions necessary to create test users, but a person on your team with the Oracle Cloud identity domain administrator role can.
To see if you have any test users:
  1. Make sure you're in the environment where you want to work with test users.
  2. Click icon to open the side menu to open the side menu and select Applications > Mobile Backends.
  3. Select your mobile backend and click Open.
  4. In the left navbar, click Users.
If you don’t have any test users, see Creating Individual Mobile Users for Testing for information on creating them.


Associating APIs with a Mobile Backend

Once you have a mobile backend, you can use the API Catalog to select the custom APIs you want to access through that mobile backend. The API Catalog provides detail on each API endpoint and its documentation, as well as an opportunity to test the endpoint with mock data to see what it does.
  1. Make sure you're in the environment containing the draft mobile backend.
  2. Click icon to open the side menu to open the side menu and select Applications > Mobile Backends.
  3. Select your mobile backend and click Open.
  4. In the left navbar, click APIs.
  5. Click Select APIs.
  6. Optionally, click an API’s name to view its endpoints.
    At this stage, you can click Test Endpoint to see how the API works with mock data. To do so, you also need to provide a user name and password. If you don’t yet have a test user, see Creating Test Users for info on creating one.
    For custom APIs, you can also specify that the API can be accessed without a user login. See Testing Your Custom API for more details.
  7. Click the + (Add) icon for each API that you want to include.
Note:
Platform APIs (for Storage, Mobile User Management, Analytics, etc.) are automatically available in your mobile backends. If an API with the functionality that you are looking for isn’t available, you can design such an API yourself. See Custom API Design.

Associating Storage Collections with a Mobile Backend

You can associate a mobile backend with collections so that your mobile apps can work with data in those collections using the MCS platform’s Storage API.
To associate your mobile backend with an existing collection:
  1. Make sure you're in the environment containing the draft mobile backend.
  2. Click icon to open the side menu to open the side menu and select Applications > Mobile Backends.
  3. Select your mobile backend and click Open.
  4. In the left navbar of the mobile backend, click Storage.
  5. Click Select Collections.
  6. Start typing the name of the collection that you want to add, select the collection from the drop-down list, and click Select.
For more on collections, including creating them, see Storage.

Clients and Mobile Backends

You can associate apps with a mobile backend by registering them as clients in MCS and then picking the mobile backend for them to use. In the process, you can also set up notifications profiles for the clients to use. See Client Management for information on registering clients.

What Can I Change in a Mobile Backend?

If you haven’t yet published your mobile backend, you can change the following things that are associated with the mobile backend at any time:
  • Registered clients
  • Notifications credentials
  • Custom APIs (and their implementations)
  • Any connector APIs that are called from custom API implementations
  • Storage collections
  • User realm
  • App policies
Once you have published a mobile backend, its content is frozen. At that point, you would need to create a new version of the mobile backend to make any changes. See Mobile Backend Lifecycle if you are interested in a rundown of publishing, deploying, and versioning mobile backends.
Note:
Though you can’t change the list of app policies in a published mobile backend, you can change their values.

Video: Mobile Backend Design Considerations

Before you start creating mobile backends, you should spend some time analyzing what your apps need from the mobile backends, what different apps will have in common, and what kind of approach will be easiest to maintain. To help you think about these questions, watch the following video on the Oracle Mobile Platform channel on YouTube:
https://youtu.be/2XHwEyldIPo 




- June 18, 2018 No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Older Posts Home
Subscribe to: Posts (Atom)

Elevate Employee Experiences with BMC Helix | Self-Service Portal | Heli...

  • Create a REST connection in Oracle ICS
    In this article, we will show you how to create REST connection that might be used to create REST service. This is very simple and fair...
  • Degrading android version to build the APK
    To build an apk for android device, you need to first degrade your android version to 6.2.3. Here is the command to remove the existing A...
  • Elevate Employee Experiences with BMC Helix | Self-Service Portal | Heli...

Search This Blog

  • Home

When you’ve know me longer, you’ll learn that I mean everything I say.” “Even the lies?

My photo
Tushar Varshney
View my complete profile

Blog Archive

  • ►  2017 (1)
    • ►  November 2017 (1)
  • ►  2018 (15)
    • ►  January 2018 (7)
    • ►  June 2018 (5)
    • ►  July 2018 (3)
  • ►  2021 (1)
    • ►  August 2021 (1)
  • ▼  2024 (1)
    • ▼  December 2024 (1)
      • Elevate Employee Experiences with BMC Helix | Self...

Labels

  • IBM Logs
  • IBM Watson Assistant
  • Tushar Blog
  • Varshney blog
  • Watson logs

Report Abuse

Labels

  • IBM Logs
  • IBM Watson Assistant
  • Tushar Blog
  • Varshney blog
  • Watson logs

Contact Form

Name

Email *

Message *

Translate

Simple theme. Powered by Blogger.