Drone - A service via REST API that allows clients to communicate with drones

Overview

Drones

Introduction

This is a service delivered via REST API that allows clients to communicate with the drones. It is initialized by some data on the data.sql file.

Build commands:

  • Build:
  • Run: ./mvnw spring-boot:run
  • Test: ./mvnw test

Documentation:

Content-type: application.json.

Link to postman json API tests:

  1. localhost:8080/drone
  • register drone (POST): Request body is given below:
    {
    "model": {
        "id": 4,
        "value": 500,
        "name": "HEAVY_WEIGHT"
    }
}
  • find drone by id(GET): localhost:8080/drone/{id}
  • update drone (PUT): Request body is given below:

    {
    "id": 5,
    "serialNumber": {
        "id": 5,
        "value": "PEGEN-BEU3S-OSO0A-2W1ZX-YRGYK-ULCLG"
    },
    "batteryCapacity": 100,
    "model": {
        "id": 5,
        "value": 500,
        "name": "MIDDLE_WEIGHT"
    },
    "state": "IDLE",
    "medications": []
}

  • Delete drone (DELETE): localhost:8080/drone/{id}
  • Load Medications from drone(GET): localhost:8080/drone/load?droneId=3&medicationIds=1,2,3. It accepts drone id and list of medication ids
  • Get drone from loaded medications: localhost:8080/drone/fromLoadedMedications/{droneId}. It checks loaded medications for a given drone.
  • Find available drones(GET): localhost:8080/drone/available/{totalMedicationWeight}. It returns a list of drones that are available, given the total medication weight to be loaded.
  • Get Battery level: localhost:8080/batteryLevel/{id}. Get drone battery level
  1. localhost:8080/med
  • register medication(POST): Request body given:
    {
    "name": "paracetamol",
    "weight": 250
}
  • Upload medication image(PUT): localhost:8080/med/{id} Content-type: multipart/form-data. It accepts a request param of type file

  • Get Medication (GET): localhost:8080/med/{id}

  • Update Medication (PUT): localhost:8080/med. Request body given:

    {
    "id": 2,
    "name": "ibuprofen",
    "weight": 70
}
  • Delete medication (DELETE): localhost:8080/med/{id};
You might also like...

Spring Boot Login and Registration example with MySQL, JWT, Rest Api - Spring Boot Spring Security Login example

Spring Boot Login and Registration example with MySQL, JWT, Rest Api - Spring Boot Spring Security Login example

Spring Boot Login example with Spring Security, MySQL and JWT Appropriate Flow for User Login and Registration with JWT Spring Boot Rest Api Architect

Jan 5, 2023

Desafio Alura Challenge para backend. Criando uma API REST de controle de orçamento utilizando JAVA.

Desafio Alura Challenge para backend. Criando uma API REST de controle de orçamento utilizando JAVA.

Jun 16, 2022

Spring Boot REST API authentication best practices using JWT

 Spring Boot REST API authentication best practices using JWT

Spring Boot REST API authentication best practices using JWT Token based API authentication with Spring Security and JWT (JSON web Token) Overview Thi

Dec 22, 2022

See how simple it is to build a REST API with a database using Java and Spring Boot

See how simple it is to build a REST API with a database using Java and Spring Boot

Seu primeiro projeto Java Web no Spring Boot 2022 Veja como é simples construir uma API REST com banco de dados usando Java e Spring Boot Realização D

Dec 26, 2022

Currency Exchange Rate Rest Api

Spring Boot Currency Exchange Project This is a currency exchange Rest Api application which is developed using Spring Boot Framework. How to Run This

Jan 21, 2022

Simple springboot API for addressBook. Supports all REST controllers and have custom error handling for every specific case, also supports redis caching.

Simple springboot API for addressBook. Supports all REST controllers and have custom error handling for every specific case, also supports redis caching.

AddressBook-SpringBoot-API Simple Springboot API for addressBook with redis cache. Supports all REST controllers and have custom error handling for ev

Jan 21, 2022

API Rest do projeto SISSA

API REST do projeto SISSA Introdução Olá, tenho pouca criatividade, então criei mais um modo de colocar na prática o projeto SISSA (Sistema de Suporte

Jan 24, 2022

This project shows how to configure basic auth to secure our rest API and basic transaction on Data JPA

This project shows how to configure basic auth to secure our rest API and basic transaction on Data JPA

Basic Atuthentication Spring Boot Data JPA, MySQL This project shows how to configure basic auth to secure our rest API and basic transaction on Data

Feb 10, 2022

Spring REST API for financial management, developed with Java 11, JWT for authentication, JUnit for unit testing and Oracle Database

Spring REST API for financial management, developed with Java 11, JWT for authentication, JUnit for unit testing and Oracle Database

control_financial Spring REST API for financial management, developed with Java 11, JWT for authentication, JUnit for unit testing and Oracle Database

May 27, 2022
Owner
Obinna Ogbonna
I am passionate about using software engineering principles to solve problems
Obinna Ogbonna
A platform that links service providers with clients using Angular & Springboot

Bricoly : Engineer Your Life The Way It Should Be... ?? Description This project's aims to connect people who are able to grant services with clients

Yasser Douslimi 9 May 28, 2022
Scripting language written in, and, designed to communicate with, java

mi-lang Scripting language designed to communicate with java, to allow for easy plugins, addons, etc in any project, all without having to create an e

null 7 Dec 17, 2022
SpringBoot service to pick up CAN messages retransmitted by CANBridge and extract certain values for reporting/monitoring/alerting via DataDog

SpringBoot service to pick up CAN messages retransmitted by CANBridge and extract certain values for reporting/monitoring/alerting via DataDog

Grumpy Cricket 2 Mar 12, 2022
Java framework for making REST clients

Pocolifo's REST Client Framework Java framework for making REST clients Here's how easy it is Here's an example for a GET request in the context of a

null 3 Jun 19, 2022
This is simple REST API developed with Spring Boot which allows transactions on taboo cards.

Taboo Cards REST API with Spring Boot Summary: This is simple REST API developed with Spring Boot which allows transactions on taboo cards. Requiremen

Alperen Çubuk 2 Sep 16, 2022
Spring REST service built with Spring initializr and Spring Data.

Spring REST Service Generated with start.spring.io, using Spring Data. Documented using Spring REST Docs. Spring Initializr - Generate new Spring Rest

null 1 Jan 28, 2022
Spring MSA api gateway & service discovery with consul & Jaeger & Cassandra

Spring-Cloud-MSA 준비 Cassandra 서버를 준비한다 table.sql 파일로 keyspace와 테이블을 만들어 둔다 Consul 1.11.1버전 기준 https://www.consul.io/downloads 에서 1.11.1 버전 운영체제 맞게 다운

INSUNG CHOI 2 Nov 22, 2022
The Quotation Management application is a API REST created using Spring Boot framework.

✅ Quotation Management API - Done ✅ About • Features • Setup • Technologies • Author • License ?? About The Quotation Management application is a API

Vanessa Swerts 6 Apr 29, 2022
Spring Boot JdbcTemplate example with SQL Server: CRUD Rest API using Spring Data JDBC, Spring Web MVC

Spring Boot JdbcTemplate example with SQL Server: Build CRUD Rest API Build a Spring Boot CRUD Rest API example that uses Spring Data Jdbc to make CRU

null 7 Dec 20, 2022
Uma API REST com funcionalidades de CRUD que simula um sistema de leilão 💰.

Leilão API REST Essa aplicação foi feita para ajudar aqueles que ainda estão com alguma dúvida, sobre o funcionamento de um API REST em Spring. Já que

Fábio Henrique 4 Feb 23, 2022