Dittofi
Search
K

API Generator

How to auto generate an API in Dittofi
Inside Dittofi you are able to auto generate API functionality for different data models using the API Generator feature. In this article we will cover how you can auto generate the following sets of functionality:
  • Create, read, update and delete (CRUD) functionality
  • Using your auto generated API

Create, read, update and delete (CRUD) functionality

The most common features that you need to develop when building an app are the ability to:
  • Create a new record
  • Read a collection of records
  • Read a single record
  • Update a record
  • Delete a record
This functionality is collectively known as CRUD, which stands for Create, Read, Update and Delete. Since these features are so common, Dittofi lets you automatically configure your apps with this functionality. Let's see how we can do this now.

Starting with Data Models

Let's first start with a Data Model that holds a collection of properties that we want to display.
To automatically generate CRUD functionality for this table, click on API Generator above the table.
API Generator
Next, select the list of functionality that you would like to auto generate from the popup.
This automatically installs the following features.
Endpoints, actions and events - visible in your endpoints actions and events tab
Endpoints
Actions
Workflows - visible in your frontend workflows tab
Workflows
Variables - visible in your frontend variables browser
Variables

Using our auto generated API

The examples in this section all use the Data Model "Properties" shown below.
Properties Data Model

Get and display all properties

The video below shows how we can leverage the API Generator that creates CRUD endpoints, actions, events, workflows and variables to fetch data from our Data Model and display this data on our frontend.