-
Notifications
You must be signed in to change notification settings - Fork 0
RentalTooService ‐ Get All Available tools
Dennis Chacko edited this page Jul 18, 2024
·
7 revisions
Table of Contents |
---|
The Get All Available tools operation fetches all tools available for rent in the system. Currently:
- The valid tools available for rent is loaded in the database during service startup
- Later revisions would have a CRUD API to add/remove tools at runtime
Request to fetch all tools available for rent
The below curl command can be used to fetch all available tools
curl --location 'http://localhost:3000/api/v1/tool' \ --header 'Accept: application/json'
Fetch All Available tools Response
The service should respond back with the below json:
[
{
"code": "CHNS",
"type": "Chainsaw",
"brand": "Stihl"
},
{
"code": "LADW",
"type": "Ladder",
"brand": "Werner"
},
{
"code": "JAKD",
"type": "Jackhammer",
"brand": "DeWalt"
},
{
"code": "JAKR",
"type": "Jackhammer",
"brand": "Ridgid"
}
]
sequenceDiagram
AbstractController->>+RentalAgreementService: Fetch all available tools
RentalAgreementService->>+ToolRepository: Fetch all available tools
ToolRepository-->>-RentalAgreementService: List of all available tools
RentalAgreementService-->>-AbstractController: List of all available tools