Skip to content

gscott4/apex-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

apex-demo

This is a simple Spring project that represents an API for customers who have made transactions and how many reward points they have accumulated over the last three months.

The project has an embedded H2 database with an initial script that will run on startup that will populate a user with some transactions.

The main endpoints are:

  • "/customers" (GET) : Brings back the full list of customers
  • "/customers/{id}" (GET) : Brings back the customer with their transactions and points in a 3 month period
  • "/customers" (POST) : Creates the customer. Only need to pass in the "customerName" as the JSON request body for it to create new user.
  • "/transactions" (GET) & (POST) : Either shows all the transactions or creates a new transaction.

Here are samples of the Postman requests:

Create New User: "/customers"

image

Response will return a Http 201 Status Code for a created object.

Create New Transaction: "/transactions"

image

Get Customer By ID Response Sample: "/customers/1"

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages