Skip to content

laxman-ch/vsr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vsr

VSR logistics

Requirement

  1. java 1.7
  2. maven
  3. mysql - configure correctly in application.properties

How to build

  1. mvn spring-boot:run

REST apis

  1. All apis are available at http://localhost:8080/alps

POST, PUT - Accepts json input

Stations

Fares

Departments

Invoices

Paginated GET Example

GET stations response

{
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/stations{?page,size,sort}",
      "templated" : true
    }
  },
  "_embedded" : {
    "stations" : [ {
      "id" : 4,
      "shortCode" : "HYD",
      "stationName" : "HYDERABAD",
      "district" : "HYDERABAD",
      "state" : "TG",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/stations/4"
        }
      }
    }, {
      "id" : 1,
      "shortCode" : "BZA",
      "stationName" : "VIJAYAWADA",
      "district" : "KRISHNA",
      "state" : "AP",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/stations/1"
        }
      }
    } ]
  },
  "page" : {
    "size" : 25,
    "totalElements" : 2,
    "totalPages" : 1,
    "number" : 0
  }
}