September 6, 2017 | Written by: Piotr Pawlak
Categorized: How-tos | Mobile | What's New
Share this post:
Kinetise has added a new feature to its platform for the ultra-fast development of native mobile apps called Embedded API Adapter.
To refresh your memory – Kinetise is a Rapid Mobile Apps Development Platform that enables you to develop custom, API-driven apps in just a few minutes. Imagine having a short workshop with a business owner who has an app idea and being able to complete the app ready for production deployment. That’s the power of using Kinetise!
Moreover, Kinetise produces native apps for iOS and Android and generates Objective-C and Java source code for those platforms. In short, Kinetise is the “Holy Grail” of drag & drop development!
From this short post, you will learn:
- How to develop a custom mobile app in no time.
- Have it securely connected to your corporate API without modifying this API even a bit.
- Where to find tutorials on connecting mobile apps to popular data services like Cloudant, Watson and others.
Sending mobile-collected data to a corporate backend
Whenever a Kinetise-developed mobile app sends data out to the API endpoint, usually using POST method, it sends JSON in a particular, pre-defined structure. For example, submitting a form with two TextInput fields would make an API-call with a body like this:
If you have full control over your backend to adjust or prepare API endpoints to receive exactly such structure, then you can stop reading this post right now. Specification on how to prepare your backend API can be found at http://backend-developers.kinetise.com.
If the API for receiving data already exists and you cannot change it, but still need to deliver data to it (a very common situation in the enterprise space) the chances that existing API endpoint perfectly matches data coming from Kinetise mobile app are close to zero. Something must be adjusted, and since it cannot be API endpoint, then it must be within the Kinetise-developed app.
That’s where Embedded API Adapter comes in handy. With a simple transformation of submitted data structure, you can make it match existing API requirements and have the data fly into your backend database smoothly. Here’s an example!
Embedded API Adapter example
A mobile app needs to send data collected with two TextInputs and attach authToken, as required by the backend Web service. By default, Kinetise passes collected data in request Body, under “form” node, while security token is called “sessionId” and it is passed in “params” node. But the backend expects all the data in Body in much simpler structure (as shown below).
So the request structure must be transformed BEFORE it is submitted over the API-call.
Embedded API Adapter is a part of Kinetise RequestSettings popup. It is a textarea field, enabling to define structure of the request, using available parameters.
Embedded API Adapter uses JQ Syntax, which is an easy-to-use command-line JSON processor, which allows you to specify exactly how to transform pre-defined structure into required output. Have a look at our definition and how it uses data from Original Body Request to build Transformed Body Request in the screen shot below.
Thanks to Embedded API Adapter, it is easy to achieve request structure required by the backend and smoothly deliver collected data.
Advanced reference: Exchange data with Cloudant database
There is a detailed tutorial and use case in our Help Center covering a Kinetise-developed mobile app with IBM Cloudant, CloudantDB as you data backend. Cloudant is a NoSQL database service, exposing RESTful APIs by default. Cloudant’s API endpoints require certain data structure and – yes, you’ve guessed it – they don’t match the structure, which is a Kinetise default. So this is where Embedded API Adapter comes into play.
Security and zero installation
Important SECURITY note: Embedded API Adapter is completely non-invasive. There is no need to install anything on existing backends, no need to configure or modify anything server-side. Embedded API Adapter transforms data structure on the mobile app.
As a result, you have a mobile app, which connects to your existing, secure backend. And you have built that app from scratch in just a few minutes.
Now it’s your turn to try Kinetise on Bluemix and develop a mobile app in minutes! Or gain an unfair advantage for your next hackathon!