Skip to content

Latest commit

 

History

History
72 lines (55 loc) · 1.34 KB

Readme.md

File metadata and controls

72 lines (55 loc) · 1.34 KB

Instructies

Applicatie draaien

Default in-memory DB:

java -jar assignment-0.0.1-SNAPSHOT.jar

File-based DB ('./local-database'):

java -jar -Dspring.profiles.active=file-based-h2 assignment-0.0.1-SNAPSHOT.jar

Productie Installatie

Opslaan

curl --location --request POST 'localhost:8080/productie-installatie' \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "My installation",
  "contact": 123,
  "outputPower": 0.123
}
'

Alles opzoeken

curl --location --request GET 'localhost:8080/productie-installatie' 

Zoeken met naam

curl --location --request GET 'localhost:8080/productie-installatie?name=My%20installation'

Min / Max Output query

url --location --request GET 'localhost:8080/productie-installatie?minOutputPower=10.2225&maxOutputPower=5896.0001'

Contact Persoon

Opslaan

curl --location --request POST 'localhost:8080/contact-persoon' \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "My installation",
  "zipCode": "0000AA",
  "city": "Arnhem",
  "number": "12a"
}
'

Alles opzoeken

curl --location --request GET 'localhost:8080/contact-persoon'

Zoeken met naam

curl --location --request GET 'localhost:8080/contact-persoon?name=My%20installation'