Public Repository

Last pushed: 4 months ago
Short Description
Short description is empty for this repo.
Full Description

How to run it.

Norint paleisti servisą reikia paleisiti komandas:

docker build -t ccteam/rest:latest .

docker run -d -p 80:8080 ccteam/rest:latest

Rest servisas pasiekiamas lokaliai: localhost:8080/
arba išorėje: 193.219.91.103:3329/

Endpoints:

Get:

 /person                  - draudimo kompanijos vartotoja 
 /person/:id              - vartotojas pagal id
 /person/search/:name     - vartotojo paieška pagal vardą
 /vehicle                 - draudimo kompanijos masinos
 /vehicle/:id             - mašina pagal id
 /insurance               - sukurti draudimai
 /insurance/:id           - draudimas pagal id

Post:

 /insurance               - sukurti naują draudimą
 /person                  - sukurti naują vartotoją
 /vehicle                 - sukurti naują mašiną

Put:

 /person/:id               - atnaujinti vartotoją

Delete:

 /insurance/:id          - ištrinti vartotoją

POST Examples:

/insurance

{
    "insuranceId": 1,
    "personId": 2,
    "vehicleId": 3,
    "price": 121,
    "startDate": "2017-01-03 00:00:00",
    "endDate": "2019-12-03 00:00:00"
}

/insurance (Invalid)

{
    "insuranceId": 1,
    "personId": 222,
    "vehicleId": 333,
    "price": 121,
    "startDate": "2017-01-03 00:00:00",
    "endDate": "2019-12-03 00:00:00"
}

/person

{
    "id": 1,
    "name": "Testukas",
    "surname": "Bandymauskas",
    "experience": 23,
    "birthday": "1977-02-05 00:00:00"
}

/vehicle

{
    "id": 1,
    "model": "Masina",
    "brand": "Markė",
    "productionDate": "2018-10-10 00:00:00"
}

PUT Examples:

/person/1

{
    "id": 1,
    "name": "Testukas",
    "surname": "Bandymauskas",
    "experience": 23,
    "birthday": "1977-02-05 00:00:00"
}

Notes:

No notes.

Docker Pull Command
Owner
ccteam

Comments (0)