- Grab Ubuntu 16.04 based VM
- Clone projects
> cd ~
> mkdir projects
> cd projects
> git clone https://github.com/swe-course/saas-template.git
- Install prerequisites, Prepare local env configuration files
> cd saas-template
> sudo ./prereq.sh
> cp .env.template .env
> cp settings.xml.template settings.xml
- build & run
> ./build.sh
> sudo ./up.sh -d
Endpoint | Details |
---|---|
/application.wadl | Get XML based API description [GET]: curl http://<host>:<port>/application.wadl Not Allowed - OPTIONS, HEAD, POST, PUT, PATCH, DELETE, TRACE |
/healthcheck | Health check [GET]: curl http://<host>:<port>/healthcheck Not Allowed - OPTIONS, HEAD, POST, PUT, PATCH, DELETE, TRACE |
/contacts | Get/Find contacts [GET]: curl http://<host>:<port>/api/v1/contacts curl http://<host>:<port>/api/v1/contacts?firstName=John&email=.*unknown.com Not Allowed - OPTIONS, HEAD, POST, PUT, PATCH, DELETE, TRACE |
/contacts/{uuid} | Get contact by Id [GET]: curl http://<host>:<port>/api/v1/contacts/1 Create contact [POST]: curl -H "Content-Type: application/json" -d '{"email":"[email protected]","firstName":"first_name","lastName":"last_name"}' http://<host>:<port>/api/v1/contacts Update contact [PUT]: curl --request PUT -H "Content-Type: application/json" -d '{"email":"[email protected]","firstName":"Elon","lastName":"Musk"}' http://<host>:<port>/api/v1/contacts/2 Patch contact [PATCH]: curl --request PATCH -H "Content-Type: application/json" -d '{"email":"[email protected]"}' http://<host>:<port>/api/v1/contacts/2 Delete contact: curl --request DELETE http://<host>:<port>/api/v1/contacts/2 Not Allowed - OPTIONS, HEAD, TRACE |