This project is a REST API built using Kotlin and Ktor that allows users to perform basic CRUD (Create, Read, Update, Delete) operations on tasks. The API enables you to add, remove, and view tasks easily. The project is designed with simplicity and efficiency in mind, using Kotlin's concise syntax and Ktor's powerful features.
- Add Task: Create a new task with a title, description, and priority.
- Read Tasks: View the list of all tasks.
- Update Task: Modify an existing task's details.
- Delete Task: Remove a task from the list.
- Kotlin installed
- IntelliJ IDEA or Android Studio
- Clone the Repository
- Open the Project
- Open the cloned project in IntelliJ IDEA or Android Studio.
- Run the Application
- Run the project using the main class configured in your IDE.
- URL:
/tasks - Method:
GET - Description: Retrieves a list of all tasks.
-
URL:
/tasks -
Method:
POST -
Body:
{ "title": "Task Title", "description": "Task Description", "priority": "Low | Medium | High" }
- URL:
/tasks/{id} - Method:
DELETE - Description: Deletes a task by ID.
You can test the API using tools like Postman or local browser. Each endpoint allows for testing CRUD operations with appropriate request types and payloads.
For detailed step-by-step guidance on how to create a REST API using Ktor, you can check out my Medium article. This article will guide you through the process, from setting up your environment to implementing CRUD operations.
Contributions are welcome! If you have any suggestions, bug fixes, or feature implementations, please submit a pull request.


