Skip to content

chandimasi/drone-service-main

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Drones Service API

Run the application

Run DroneServiceMainApplication class or mvn spring-boot:run

Limitation

Drone can be carried only one medication

Usage

Registering a drone

<IP:PORT>/drones

curl -X POST http://localhost:8080/drones 
    -H "Content-Type: application/json" 
    -d '{   "serialNumber": "sss900",
            "model":"Cruiserweight",
            "weightLimit":690,
            "batteryCapacity":100,
            "state":"IDLE"}' 
   

Loading a drone with medication items

<IP:PORT>/drones/{droneId}/load/{medicationId}

curl -X GET http://localhost:8080/drones/100/load/1
   

Checking loaded medication items for a given drone

<IP:PORT>/drones/{droneId}/medicationItems

curl -X GET http://localhost:8080/drones/100/medicationItems
   

Checking available drones for loading

<IP:PORT>/availabledrones

curl -X GET http://localhost:8080/availabledrones
   

check drone battery level for a given drone

<IP:PORT>/batterylevel/{droneId}

curl -X GET http://localhost:8080/batterylevel/100
   

END

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages