Morph automatically generates and provides an API based on the database schema created. This allows data integration and application building using Morph’s database through the API without the need to implement additional code.

The API is designed in a RESTful format and can be accessed securely using API keys created from within the Morph dashboard.

Features

The Morph database API is provided by PostgREST and offers the following benefits:

  • Efficient development and collaboration:
    • The API is generated directly from the database schema, significantly reducing back-end development time and costs.
  • Auto-update/Immediacy:
    • Changes to the database schema are immediately reflected in the API, eliminating the need for manual synchronisation and maintenance.
  • Performance:
    • The lightweight, stateless design allows direct execution of SQL queries for extremely fast data access.
  • Flexibility:
    • In addition to simple CRUD operations, complex operations such as query combination, filtering and sorting can be easily performed.
  • Security:
    • Strict type checking and automatic escaping of query parameters provide a high level of protection against attacks such as SQL injection.

RESTful architecture

The API employs standard HTTP methods and provides intuitive and easy-to-use CRUD operations based on a RESTful architecture. Its design allows for extensive integration with various programming languages and applications, making it easy for developers to integrate the system.

In addition, the following advanced features are also provided:

  • Filtering and searching:
    • Complex query parameters can be used to precisely extract only those records that match specific criteria.
  • Sorting and pagination:
    • Sort the result set and use pagination to provide the data in small chunks.
  • Relational query:
    • Data can be retrieved from multiple related tables in a single query. This allows data to be retrieved by utilising the relationships in the relational database without the need for multiple API calls.
  • Aggregation:
    • Aggregation features such as grouping, counting, averaging, maximum and minimum values can be included in queries.
  • Batch requests:
    • Multiple API calls can be executed in a single HTTP request, reducing network latency and ensuring efficient data processing.

In addition to these, various other functions are provided by PostgREST. For more information, please see the following reference documents:

Reference: