Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Step 3 - Creating Your API

edited December 2011 in Getting Started

Introduction

In order to access your database from your mobile app, you create a web-accessible API that performs actions on your data and returns the results.

Kumulos manages this for you so all you have to do is define the actions you want to perform on your data. To do so, we use the API method creator.

image

a - Choose title & table

The first thing to an API method is its title. This is the name of the method that you'll be calling from your mobile app. After giving your method a title, you select a table for it to work with from your list of previously created tables.

image

Here we're defining a method that will return all the book records from our "Books" table.

b - Choose method parameters

Next we select the parameters that we are going to pass to the API method. All of the fields in your table are available to select by default, and you can add custom parameters if you want. The selected parameters will be available to use in the actions you perform on your data.

image

In our example, we don't need any parameters as we're just going to select everything from the table and return it.

c - Drag in actions

To give our API method work to do, we drag and drop actions from the "Actions" list on the right into the actions panel.

image

Here we've dragged a "Select" action into the actions panel. The default options are fine this time, so we can save.

There are various options available for each different action which are covered in more detail in the Actions Reference.

Next Steps

Once you've defined some API methods to access your data, you're ready to continue with Step 4 - Deploying your API

image



Comments

Sign In or Register to comment.