At our Axway API Workshops, we use an example of a mobile app using the API Gateway as a mobile backend. It happens that Thursday's API Workshop in San Francisco coincides with the Scottish independence vote, so the app we're using will have a Scottish theme...
In an instance of the Axway API Portal, I've configured a Scottish Voting API which simulates a voting API. The options, as in the real vote, are "Yes" and "No".
As you can see in the screenshot below, I've configured API Key authentication for my Scottish Voting API. The API Portal has a handy "Try It" feature so that I can make test calls to the API, right from the API Portal (it's the "Try It" button on the right).
I've also registered an app at the API Portal, which will consume my Scottish Independence Vote API. Because the API is protected using API Keys, you can see that the API Portal issues an API Key to my app. In the API Workshop, we show how the mobile app makes use of this API Key to call the API, and how the Axway API Gateway enforces the API Key authentication. In the screenshot below, I've scribbled out the API Key in red:
There is also a quota applied to my app - it can send 100 messages every 1 second. When we look at the API traffic at the API Gateway later, we'll see that the remaining quota count is returned as a header to the app which calls the API.
Now let's look at the main app configuration. You can see its icon, plus the fact that it will access the Scottish Independence Vote API.
Here's the app itself in action, on Android. You can see that I'm using the text from the vote itself ("Should Scotland be an independent country?"). The app calls the API which I've registered at the API Portal. It uses API Keys to authenticate.
The API Gateway shows the votes rolling in - as you can see below. It also shows any requests which are blocked for security or other reasons:
We can also see the API calling info over time, and zoom in on particular times to see more info:
And remember that quota I mentioned above? Here you can see the remaining quota information returned in a header, which is helpful information for the calling application:
That's how easy it is to use the API Gateway and API Portal as a mobile backend. Whatever the outcome of the Scottish vote on Thursday, I'm looking forward to walking through the Axway API Portal and API Gateway at the API Workshop in San Francisco this Thursday. Sign-up is free, hope to see you there.