Explore Borrowing Capacity API
In your browser, navigate to the
Borrowing Capacity
API documentation:http://localhost:3000/hexyback-workshop/docs/hexy/get-an-estimate-of-your-borrowing-capacity
Modify the sample request parameters:
Copy the
curl
request, replacinghttp://localhost:3000
with the URL of your deployed API endpoint -apiEndpoint
:✔ Deployed:
ConfigStack
# Use the URL shown below
apiEndpoint: https://xxxxxxx.execute-api.ap-southeast-2.amazonaws.com/prod/Paste the
curl
request into your terminal and hitEnter
:curl -L -X GET 'https://xxxxxxx.execute-api.ap-southeast-2.amazonaws.com/prod/borrowingCapacity?borrowerEmail=rami@rolo.polo&grossAnnualIncome=50000&employmentStatus=SELF_EMPLOYED' \
-H 'Accept: application/json'Navigate to the AWS Lambda console and select the
CalculateBorrowingCapacity
lambdaNavigate to the
Monitor
tab:Click on the first entry in the
Traces
tab:Observe the traces shown. You'll notice two calls:
- A call to (attempt) to get the borrower profile
- A call to put the borrowing capacity calculation
Exercise:
- Attempt to calculate the borrowing capacity for a borrower that does not exist. What happens? Observe the traces to confirm your assumptions.