How to Expose a Database Stored Procedure and a Function as a REST API

Appery.io API Express makes it easy to expose a SQL query as a REST API. You can as easily expose a database stored procedure or a database function as a REST API. The following two blogs posts will teach you how to do that:

Want to learn more about API Express? Check our the Appery.io YouTube channel for videos on how to integrate with external data sources using API Express.

 

Video: How to Call WordPress REST API

Watch this short video to learn how to call the WordPress REST API from an Appery.io app. The video shows two approaches invoking the API.  First, it shows how to invoke an API using API Express. Second, it shows how to invoke an API from Server Code.

If you like this video, check the Appery.io YouTube channel for many more short videos to help you build apps faster.

Exposing a SQL Database via REST APIs: A Video Guide for Developers

Many organizations that are building mobile apps need to connect and reuse existing (internal) systems. One of the most common system is a relational (SQL) database. The question is — how to a relational database from a mobile app.

I have prepared two short videos that will show you how to do that using Appery.io API Express.

API Express connects to a relational database and exposes the database tables via REST APIs. Once the APIs are created, the mobile app can easily consume the APIs.

There are two approaches exposing a database:

The first approach automatically generates CRUD-like APIs to work with a database table. In many apps, this is close to 80% of what an app might need. This automatic approach also comes with very sophisticated offline support. In other words, you app can work offline and sync data with a remote database when a connection is reestablished.

With the second approach, you get full control as you write the actual SQL query (or Stored Procedure) that will be executed. With this approach, you can use a visual service editor to orchestrate the REST API. In addition to the SQL component (connector), you can use connectors such as Web Service (WSDL), REST  and others.

Check out the API Express video playlist to learn more.

How Appery.io Ensures API Express and Server Code On-demand Deployment

apperyio_ondemand_sc_aex_scheme

Appery.io had a strong 2016 and inches closer and closer to 400,000 developers. At the same time, the constant platform updates we roll out add more benefits, services, features, and options. Even without the constant updates, supporting a platform with so many developers would not be a simple task. Our platform has to be ready for continuous updates, increased load, and new user requests and requirements.

We want to provide high SLA level services and avoid unexpected slowdowns and downtimes for customers’ apps even during peak hours. To provide the required scalability and resilience, we rely on industry leader Amazon Web Services and its various features such as Auto Scaling, Launch Configurations, and CloudWatch.

In this blog post you will learn how exactly we ensure scalability and resilience for Appery.io API Express and Server Code services.

Continue reading on the Appery.io blog.

 

Video Tutorial: How to Build and Test a Complete Mobile App with API Backend

This video shows how to build and test a complete Ionic app with an API backend. The tutorial starts by showing how to create an app backend with API Express by connecting to an external REST API. Then, the tutorial shows how to build an Ionic app and import the backend service into the app. The tutorial also shows how to make a small change to the generated code. The tutorial then shows how to test the app in the browser and also on a device using the Appery.io Tester app. Lastly, the tutorial shows where to build a binary file for iOS or Android for submission to an app store.

Check out other videos on how to build mobile apps fast.

Video Tutorial: How to Build a REST API for a Custom SQL Query

This video shows how to use the SQL and Script components to build a Login service. The SQL component runs a custom SQL query to check if a user exists in a database. The Script component adds custom logic to check what the SQL component returned and defines the response (user found or user not found).

Looking for more videos on enterprise integration? Watch the API Express playlist.

Video: Learn How to Build a Mobile App with External REST API

This short video shows how to build a complete app with an external REST API. This video covers:

  • Using API Express to connect to an external REST API. https://randomuser.me/ is used for the API.
  • Importing API Express service into the app (App Builder).
  • Designing the app UI (1 page).
  • Binding and using the service from the page.
  • Testing the app.

Looking for more videos? Visit the Appery.io YouTube channel for many more short videos.

Learn How to Connect Your App to an API Backend

This short video shows how to import backend services APIs into your app. Appery.io services consist of a cloud database, Server Code for custom app logic, and API Express for enterprise integration and service orchestration.

Our YouTube channel has many more short videos where you can learn how to build apps fast with Appery.io.

Creating an Ionic App with a Backend and API

This 8-minute video shows who to build an Ionic app with a backend and external API. The app is then tested in the browser. https://randomuser.me/documentation is used for external API.

The app shows a list of people in a list. The final app looks like this:

Screen Shot 2016-04-28 at 4.35.30 PM
Ionic app

Watch the video:

Want to learn how to build business mobile apps fast – check our the Appery.io YouTube channel for many more videos.

What is Appery.io API Express?

API Express is one of the core components in Appery.io platform. API Express allows you to integrate with external enterprise data sources and expose them via REST APIs. API Express also allows to compose advanced services using a visual editor. The REST APIs are then used in a mobile app.

API Express supports connecting and exposing the following data sources via REST APIs:

  • Relational database – connect and expose any relational database via REST APIs (automatic CRUD generation)
    • SQL query – expose any custom SQL query via a REST API.
    • Stored Procedure – expose any store procedure via a REST API.
  • REST API – connect to any external REST API.
  • SOAP service – connect and expose any SOAP service via REST API.
  • Server Code script – invoke any existing Server Code script.

In addition to these services, the visual editor also supports the following components:

  • Fork – execute two more more services (from above) at the same time.
  • Condition – add if-then like function to the service flow.
  • Mapping – map data from one component to another component.
  • Script – write and execute short service logic using JavaScript.

The API Express visual service editor allows to create very advance service flow and logic. Here is one example:

  1. Start – entry into the service.
  2. Invoke the SOAP component.
  3. In parallel (Fork), invoke the REST API component and the SQL component.
  4. Take the result and process it with the Script component.
  5. End – set the service response

In the above flow, steps 1-4 are exposed via an API Express REST API. To the client (the mobile app), it is just a simple API. As you can see, the actual service logic can be very advanced.

A REST API can be quickly tested right in the developer console.

A REST API created can also be secured. A user has to login before invoking the service. For authentication, API Express supports LDAP and Appery.io Database.

Another big benefit that API Express provides is a special client SDK that allows to build offline apps. If the app you built with API Express APIs goes offline, you can use the app the same way. When the app (or device) goes back online, any changes will be automatically synced.

We have a number of short videos on using API Express on our YouTube channel here and here.

Happy coding.