Skip to content

Dev-Yan/peak-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Peak API

A Peak API is an ASP.NET Core Web API that provides endpoints for calculating installments and get persons.

Environment Setup

  • .NET 8;
  • Visual Studio.

Installation

  1. Clone the repository;
  2. Navigate to the project directory;
  3. Run the application.

The application will be available at http://localhost:44322 | https://peakapi.azurewebsites.net/swagger/index.html.

Endpoints

Calculate Installments

Request

POST /calculate?installments={installments}&value={value}

Parameters:

  • installments (required): Number of desired installments.
  • value (required): Total value of the purchase.

Response

  • 200 OK if the request is successful. Returns the calculated installment value.
  • 400 Bad Request if there is an error in the request. Returns the error message.

Get person by Id

Request

GET /person/{id}

Parameters:

  • id (required): ID of the person to be queried.

Response

  • 200 OK if the request is successful. Returns the information about the queried person.
  • 404 Not Found if the person is not found. Returns the error message.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages