To access remote data through an app scope running on the Akula Server, you make a HTTP request to an endpoint URL associated with the data source. The specific endpoint URL is based on the configuration of the Akula Server, the app scope controlling access to the data source, and the configuration of the data source itself. 

This document contain the following sections:

Making a request to the data source

A data source can be configured to let you make the following types of HTTP requests: POST, GET, PUT, and DELETE. Not all data sources support all types of requests. For example, you can configure a data source to be read only, so that it supports only GET requests, or to support read and write requests (such as GET, POST, and PUT), but not delete requests.

To request data from a remote data source:

  1. Configure the connection from an app scope to the data source.

    This configuration includes defining the REST endpoints used to access the data source, the methods (or request types) supported by the data source, and the permissions on the data source. Only users in a role with the correct permissions can access the data source.

    For more information on configuring a data source, see Using Endpoints.

  2. From a client app (Android, iOS, JavaScript) use the Akula client APIs to make requests to the endpoints that correspond to the data source.

    As part of making the request, you handle any data returned from the data source, and handle any errors generated by the request.

Client APIs for accessing a data source

Each of the Akula client APIs (Android, iOS, JavaScript) defines the classes and interfaces that you use to access a data source from a client app. The Akula APIs are designed to simplify the process of building the request and handling the response. By using these APIs, you can focus your development resources on other areas of your app.

You can bypass the Akula client APIs and access a data source by making direct HTTP requests to data source endpoints. In that case, you are completely responsible for constructing the request, handling response data, and handling any errors.

Authentication and data access

Along with controlling access to a remote data source, the Akula Server also supports an authentication and authorization mechanism. That mechanism validates a user's credentials and controls user access to the resources controlled by the server, including data sources.

As part of configuring a remote data source, you define the permissions required by a user to access the data source. The authentication mechanism handles user log in to validate the user's credentials. The authorization mechanism then confirms that a user has the proper permissions before access to the data source is allowed.  

For more information, see Authentication and Authorization.