Commit 89cb69b0 authored by Sakuna Yashara's avatar Sakuna Yashara

3rd commit

parent 54b0dbd0
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Follwoing figure discussed the architecture of the informatZen platfrom. Follwoing figure discussed the architecture of the informatZen platfrom.
![Alt text](informatzen-architecture.png?raw=true "informatZen platfrom architecture") ![Alt text](subi-architecture.jpg?raw=true "informatZen platfrom architecture")
## Services ## Services
...@@ -48,45 +48,44 @@ gateway service will start a REST api on `7654` port. For an example if your mac ...@@ -48,45 +48,44 @@ gateway service will start a REST api on `7654` port. For an example if your mac
** Open `7654` and `4300` port on VM for public ** Open `7654` and `4300` port on VM for public
#### 1. put Vaccine #### 1. put customer details
``` ```
# request # request
curl -XPOST "http://localhost:7654/api/vaccines" \ curl -XPOST "http://localhost:7654/api/customers" \
--header "Content-Type: application/json" \ --header "Content-Type: application/json" \
--header "Bearer: eyJkaWdzaWciOiJORWpYZnIwQjJMZG4ySGxPb2t5blp0dkNzSFVqMGFoVTVZd1F5TmJSVCtOYjlwTnBXcEsvUi9UbDZpanhPVVJiVlJHc2NHaFIrcWVCbkZhK09YYjBmMGlacVh0WHBDVXV6bnJOcTFKRmpGZC8zSU80L1o4SXl3WG1EdWFGcUg5Njc5VE9neVRkcU1nT01VeWNNWTF0bmtIUStWVUtUN0JTV0NWMEM3ZmNXbEE9IiwiaWQiOiJlcmFuZ2FlYkBnbWFpbC5jb20iLCJpc3N1ZVRpbWUiOjE1NTg0ODk4ODksInJvbGVzIjoiIiwidHRsIjo2MH0=" \ --header "Bearer: eyJkaWdzaWciOiJORWpYZnIwQjJMZG4ySGxPb2t5blp0dkNzSFVqMGFoVTVZd1F5TmJSVCtOYjlwTnBXcEsvUi9UbDZpanhPVVJiVlJHc2NHaFIrcWVCbkZhK09YYjBmMGlacVh0WHBDVXV6bnJOcTFKRmpGZC8zSU80L1o4SXl3WG1EdWFGcUg5Njc5VE9neVRkcU1nT01VeWNNWTF0bmtIUStWVUtUN0JTV0NWMEM3ZmNXbEE9IiwiaWQiOiJlcmFuZ2FlYkBnbWFpbC5jb20iLCJpc3N1ZVRpbWUiOjE1NTg0ODk4ODksInJvbGVzIjoiIiwidHRsIjo2MH0=" \
--data ' --data '
{ {
"id": "111110", "id": "11",
"execer": "admin:admin", "username": "admin:admin",
"messageType": "addVaccine", "mobile_no": "addVaccine",
"userMobile": "0715422017", "email": "0715422017"
"userName": "test user",
"vaccineStatus": "done"
} }
' '
# reply # reply
{"code":201,"msg":"vaccine added"} {"code":201,"msg":"customer added"}
``` ```
#### 2. get Vaccine #### 2. get customer details
``` ```
# request # request
curl -XPOST "http://localhost:7654/api/vaccines" \ curl -XPOST "http://localhost:7654/api/customers" \
--header "Content-Type: application/json" \ --header "Content-Type: application/json" \
--header "Bearer: eyJkaWdzaWciOiJORWpYZnIwQjJMZG4ySGxPb2t5blp0dkNzSFVqMGFoVTVZd1F5TmJSVCtOYjlwTnBXcEsvUi9UbDZpanhPVVJiVlJHc2NHaFIrcWVCbkZhK09YYjBmMGlacVh0WHBDVXV6bnJOcTFKRmpGZC8zSU80L1o4SXl3WG1EdWFGcUg5Njc5VE9neVRkcU1nT01VeWNNWTF0bmtIUStWVUtUN0JTV0NWMEM3ZmNXbEE9IiwiaWQiOiJlcmFuZ2FlYkBnbWFpbC5jb20iLCJpc3N1ZVRpbWUiOjE1NTg0ODk4ODksInJvbGVzIjoiIiwidHRsIjo2MH0=" \ --header "Bearer: eyJkaWdzaWciOiJORWpYZnIwQjJMZG4ySGxPb2t5blp0dkNzSFVqMGFoVTVZd1F5TmJSVCtOYjlwTnBXcEsvUi9UbDZpanhPVVJiVlJHc2NHaFIrcWVCbkZhK09YYjBmMGlacVh0WHBDVXV6bnJOcTFKRmpGZC8zSU80L1o4SXl3WG1EdWFGcUg5Njc5VE9neVRkcU1nT01VeWNNWTF0bmtIUStWVUtUN0JTV0NWMEM3ZmNXbEE9IiwiaWQiOiJlcmFuZ2FlYkBnbWFpbC5jb20iLCJpc3N1ZVRpbWUiOjE1NTg0ODk4ODksInJvbGVzIjoiIiwidHRsIjo2MH0=" \
--data ' --data '
{ {
"id": "1111xx", "id": "11",
"execer": "admin:admin", "username": "admin:admin",
"messageType": "getVaccine", "mobile_no": "addVaccine",
"userMobile": "0715422017", "email": "0715422017"
} }
' '
# reply # reply
{"userMobile":"0775321290","userName":"test user","vaccineStatus": "done", "timestamp":"2021-07-12 20:55:21.308"} {"customerMobile":"0771045099","customerName":"test user", "timestamp":"2021-11-05 20:55:21.308"}
``` ```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment