Just Released: GeekChronicles | Feb 2025

Read Now
Feb 20, 2025

REST Assured: AI-Powered Schema and REST API Builder

Discover REST Assured, an AI-driven tool for automated REST API generation, schema creation, and deployment, built by Team Haarenge at Geekathon.
REST Assured: AI-Powered Schema and REST API Builder
Prince Kumar Thakur
Prince Kumar ThakurTechnical Content Writer

Editor's Note: Hackathons are about pushing the boundaries of innovation, and Team Haarenge did exactly that with REST Assured, an AI-powered schema and REST API builder. In this blog, Tanmay, a Software Engineer at GeekyAnts, takes us through their journey of building REST Assured at Geekathon, detailing the problem statement, solution, technical approach, and key features of the project. While the language has been refined for clarity, the content remains true to the original vision and enthusiasm of the team.


Team Composition: Tanmay jaiswal, Ajinkya Palaskar, Kandimalla Sai Kiran, Syed Yaseen

Hey everyone, Tanmay this side. I am currently working at GeekyAnts as a Software Engineer III. This blog is about our hackathon project REST Assured, which we recently delivered at Geekathon, an internal hackathon organized by GeekyAnts. Our team name was Haarenge, and with the help of my team members Ajinkya, Syed Yaseen, and Sai Kiran, we built REST Assured, an AI-based schema and REST API builder.

In this blog, I will take you through our thought process behind this project, the problem we aimed to solve, and the product we built. I will first talk about the challenges in API development, then show how REST Assured solves them, and finally walk through the implementation and features we developed.

Rest API Builder

Problem Statement

In modern API development, several challenges slow down the process. A significant amount of time is consumed in designing and implementing APIs, requiring expertise in backend development and database management. To build an API, developers must define a schema, follow a structured development process, set up migrations, manage user roles and permissions, and deal with limited tools for schema generation. Whenever there is a need to modify something, a new schema or migration file must be created, making the process cumbersome.

Our Solution: REST Assured

To tackle these challenges, we built REST Assured, which automates REST API generation based on user input. It provides a user-friendly interface, generates dynamic schema and migrations, offers extensive customization options, and supports deployment on any platform, whether it’s an on-premise server, AWS EC2 instance, or any cloud provider.

Inspiration Behind REST Assured

Our inspiration came from two existing tools. The first was ChatGPT, where we integrated a feedback-based system to improve response accuracy and user satisfaction using OpenAI’s API. This allows real-time AI-generated code for API logic. The second was Hasura, which allows users to connect a PostgreSQL database and serves a GraphQL API. While Hasura is focused on GraphQL, REST Assured focuses on REST API generation, making backend development more accessible and efficient.

How REST Assured Works

how Rest API Builder

The first step in our ideation process was designing a high-level system architecture. Our application is built using Docker containers to manage services, with PostgreSQL or Hasura as the database, Next.js for the frontend, and Node.js Express.js for the backend. The backend communicates with OpenAI’s API to generate API logic dynamically. When a user provides input, the system automatically generates schemas, migrations, and API endpoints.

A major challenge was setting up the template engine, which we solved by building a Node.js Express.js server that acts as the template engine. This engine dynamically injects generated code into a predefined structure that includes Prisma as an ORM for database management and a Docker file for deployment. This ensures that each generated API follows a consistent and scalable format.

User Workflow: Creating an API with REST Assured

The first step for the user is to log in or sign up and create a new application. The user enters an application name and a short description, which the AI uses to generate an initial set of features. For example, if a user wants to create a blog application, they might describe: "A blog application where users can post blogs, comment, and like posts." Based on this, REST Assured will generate essential features such as user authentication, blog post management, comments, and likes.

Once the features are generated, the next step is schema generation. The AI creates an ER diagram representing the database schema, showing how different entities relate to each other. For a blog application, this might include a User schema (username, password), Blog schema (title, content, author), Comment schema, and Like schema. If the user wants to modify any attributes, they can make changes at this stage before proceeding to endpoint selection.

After defining the schema, the user selects which CRUD operations (Create, Read, Update, Delete) they want to enable for each entity. For instance, users might be able to create, read, and update blog posts but not delete them. They simply select checkboxes to define the operations they need, making it an intuitive and easy-to-use system.

The final step is deployment. Once everything is set, the user clicks on "Initiate Deployment", and the system automatically generates backend logic in Node.js Express.js, integrates it with Prisma ORM, and deploys the API in a Dockerized environment. The entire process, from schema definition to a working API, takes only a few minutes, eliminating the need for manual backend development.

Live Demo: Testing the API

how Rest API Builder
how Rest API Builder

Once the API is deployed, users can test it using REST Assured’s built-in API testing tool. For example, they can send a GET request to retrieve a list of users or a POST request to create a new user. If everything works correctly, the new user will appear in the database. The system automatically validates schema definitions, ensuring that all data is structured correctly.

how Rest API Builder

Future Enhancements

While REST Assured already simplifies REST API generation, we have several plans for future improvements. We aim to integrate Swagger for API documentation and OpenAI’s CodeGen for SDK generation, allowing users to export client-side SDKs directly from REST Assured. We also plan to implement automated cloud deployment, making it possible to deploy APIs to AWS, GCP, and Azure with a single click. Additionally, we want to add support for third-party integrations, such as OAuth authentication, to provide more flexibility.

Lessons Learned

During development, we focused on solving problems from the user’s perspective, ensuring that REST Assured provides maximum flexibility. We also adopted an iterative development approach, breaking down the implementation into manageable tasks to improve efficiency and collaboration.

Reflections and Acknowledgments

Building REST Assured in such a short time was an exciting challenge. We tackled real-world API development issues and built a tool that significantly streamlines the process. A huge shoutout to GeekyAnts, Pratik, and Sanket for organizing this hackathon and allowing us to work on such an exciting project. Special thanks to my team members Ajinkya, Yasin, and Sai Kiran for their dedication and contributions.

What’s Next?

We are excited to refine and expand REST Assured. If you have any suggestions or feedback, we would love to hear from you. Let us know your thoughts, and we will continue working on making REST Assured an even more powerful tool for API development.

Book a Discovery Call.

SHARE ON

Articles

Dive deep into our research and insights. In our articles and blogs, we explore topics on design, how it relates to development, and impact of various trends to businesses.