Skip to content

JPetta/springboot-library-app-be

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xtramile-backend

Getting Started

1. Please insert your own database credentials in resources/application.properties

spring.datasource.username={your_database_username}
spring.datasource.password={your_database_password}

2. Build and run the XtramilePatientApplication.java

Endpoints

[GET] Patients

url : /

response :

{
  "patients": [
    {
      "id": 2,
      "firstName": "Jovi",
      "lastName": "Petra",
      "dateOfBirth": "1997-01-01",
      "gender": "MALE",
      "address": {
        "address": "123 Main St",
        "suburb": "Suburb",
        "state": "Tangerang",
        "postcode": "12345"
      },
      "phoneNumber": "123-456-555"
    },
    {
      "id": 3,
      "firstName": "Abraham",
      "lastName": "Alexander Mannuel",
      "dateOfBirth": "1990-12-01",
      "gender": "MALE",
      "address": {
        "address": "123 Main St",
        "suburb": "BSD",
        "state": "Tangerang",
        "postcode": "150150"
      },
      "phoneNumber": "0896-288-100"
    },
    {
      "id": 6,
      "firstName": "Abraham",
      "lastName": "Alexander",
      "dateOfBirth": "1990-12-01",
      "gender": "MALE",
      "address": {
        "address": "123 Main St",
        "suburb": "BSD",
        "state": "Tangerang",
        "postcode": "150150"
      },
      "phoneNumber": "0896-288-100"
    }
  ],
  "totalPages": 2
}

[GET] One Patient

url : /:id

response :

{
      "id": 2,
      "firstName": "Jovi",
      "lastName": "Petra",
      "dateOfBirth": "1997-01-01",
      "gender": "MALE",
      "address": {
        "address": "123 Main St",
        "suburb": "Suburb",
        "state": "Tangerang",
        "postcode": "12345"
      },
      "phoneNumber": "123-456-555"
    }

[POST] One Patient

url : /

request body :

{
    "firstName": "Jovi",
    "lastName": "Petra",
    "dateOfBirth": "1997-01-01",
    "gender": "MALE",
    "address": {
      "address": "123 Main St",
      "suburb": "Suburb",
      "state": "Tangerang",
      "postcode": "12345"
    },
    "phoneNumber": "123-456-555"
  }

response :

{
      "id": 2,
      "firstName": "Jovi",
      "lastName": "Petra",
      "dateOfBirth": "1997-01-01",
      "gender": "MALE",
      "address": {
        "address": "123 Main St",
        "suburb": "Suburb",
        "state": "Tangerang",
        "postcode": "12345"
      },
      "phoneNumber": "123-456-555"
    }

[DELETE] Edit Patient

url : /:id

response : 204 No Content

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages