Showing posts with label mcs. Show all posts
Showing posts with label mcs. Show all posts

Sunday, October 11, 2015

Designing Custom APIs for Oracle Mobile Cloud Service (MCS) right from the Browser

One of the powerful and cool new features in Oracle Mobile Cloud Service is the hub for Custom APIs. From the architectural perspective Custom APIs are consisting of two parts: The „Design“ and „Implementation“ Part. In this post I am going to focus on the first part.

Within MCS it is possible to create the API interface right in the browser or by uploading a so called RAML document that describes the API resources. Having done this you can provide some sample data being able to test and implement against the newly created API.

Focus of this post is to show how to design an API right in MCS UI and test it.

How to do it

Goto Development > APIs

Click „New API"


If you have a RAML document at this point in time you can upload it to define the Resources for your API. If not it is possible to create it on the fly (as shown in this post).

Next: Click „Create“. It will take you to the „Designer“ View. You will see the general configuration of your Custom API.

Next Step is to create a new REST Resource which is done in the „Endpoints“ section

Clicking on „New Resources“ creates a new form entry to fill in the „path“ and a Resource „Display Name".

Having done this the desired methods (GET, PUT, POST, etc) should be defined. Click „Methods“ for that and take action form the select list of possible methods.

-

As seen from the screenshot above you can further refine the GET method with parameters etc.
In order to get a specific employee record you may want to create a „sub-resource“ wich is also supported by the MCS API Designer. Click on the ‚+‘ therefore

The nested resource is dynamic (employee_id in this case)

And of course same procedure to add methods to a nested resource

See result after adding the GET method to a nested resource.

Because the app developer might want to be able to implement against the new API early in development (without fully functional API service backend) you can provide some testdata in the „Responses“ tab.

Choose „Add Media Type“ -  application/json - and paste your example/test response.

Save your work. Click on the „Test“ Button on top-right.

Choose the desired resource to test. You will be prompted to fill in a sample id for „employee id“ - path parameter and associate with some mobile backend. Provide Username/Password except you configured the API for anonymous access (security tab, not covered here)

Click on „Test Endpoint“ to see the HTTP Status code + body result.


That concludes the basic steps needed to design and test a Custom API in MCS. 
Cool stuff!

Further Information


Thursday, July 23, 2015

Getting Started with Oracle Mobile Cloud Service (MCS)

Mobile Application Development is often reduced to the tasks needed for implementing an app using some mobile framework like iOS, Android, Oracle MAF or some other hybrid framework. In reality there is a lot more work to do for making a mobile to work: manage user access, creating services, handle push notifications, monitor usage, etc etc.

Oracle Mobile Cloud Service (MCS) provides a central cloud service for developing, deploying, maintaining, monitoring, and analyzing your mobile apps. From the architecture perspective it looks like the following


To get started check out the MCS Introduction video from the Oracle Mobile Youtube Channel.

In the next posts I am going to show some of the features and how to work with Oracle Mobile Cloud Service. Stay tuned!

To get started smoothly I have put together the most useful content around Mobile Cloud Service.

Useful Learning Resources



Documentation



Tutorial