A coursework to complete the architecture and infrastructure final project. This work would be deployed in one of deployment sites such as Microsoft Azure, Google Cloud Platform, and AWS
There are 5 API in total,
POST /api/user/new
This API is used for new user registration.
{
"username": "refoo",
"password" : "aaaaaaaaaa"
}
{
"account": {
"ID": 3,
"CreatedAt": "2019-12-04T17:06:41.641046+07:00",
"UpdatedAt": "2019-12-04T17:06:41.641046+07:00",
"DeletedAt": null,
"username": "refoo",
"password": "",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVc2VySWQiOjN9.g_tVFfrVjTDWM_XcBtcwVX9-tDtJumHVqKNIJ9lIF4k"
},
"message": "Account has been created",
"status": true
}
POST /api/user/login
This api is for user to login and get the token for authorization..
{
"username": "refoo",
"password" : "aaaaaaaaaa"
}
{
"account": {
"ID": 3,
"CreatedAt": "2019-12-04T17:06:41.641046+07:00",
"UpdatedAt": "2019-12-04T17:06:41.641046+07:00",
"DeletedAt": null,
"username": "refoo",
"password": "",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVc2VySWQiOjN9.g_tVFfrVjTDWM_XcBtcwVX9-tDtJumHVqKNIJ9lIF4k"
},
"message": "Logged In",
"status": true
}
POST /api/circle/area
This api is to create new circle object, the result will be saved into the database and can be used to calculate tube and ball objects.
Key | Value | Description |
---|---|---|
Authorization |
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVc2VySWQiOjJ9.DzOJ7GHkPwiDE3T78dFMriY96VwzytQSBV7-c64dxx8 |
Required. Your Token from login or registration |
{
"radius" : 10
}
{
"circle": {
"ID": 6,
"CreatedAt": "2019-12-04T16:58:21.298678+07:00",
"UpdatedAt": "2019-12-04T16:58:21.298678+07:00",
"DeletedAt": null,
"radius": 10,
"area": 314.15927,
"owner": "refo"
},
"message": "success",
"status": true
}
POST /api/tube/volume
This api is to create new tube object, the result will be saved into the database. This API require the circle object id created from the above circle API.
Key | Value | Description |
---|---|---|
Authorization |
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVc2VySWQiOjJ9.DzOJ7GHkPwiDE3T78dFMriY96VwzytQSBV7-c64dxx8 |
Required. Your Token from login or registration |
{
"circleId" : 6,
"height" : 10
}
{
"message": "success",
"status": true,
"tube": {
"ID": 1,
"CreatedAt": "2019-12-04T16:59:11.346943+07:00",
"UpdatedAt": "2019-12-04T16:59:11.346943+07:00",
"DeletedAt": null,
"circleId": 6,
"height": 10,
"volume": 3141.5928,
"owner": "refo"
}
}
POST /api/ball/volume
This api is to create new ball object, the result will be saved into the database. This API require the circle object id created from the above circle API.
Key | Value | Description |
---|---|---|
Authorization |
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJVc2VySWQiOjJ9.DzOJ7GHkPwiDE3T78dFMriY96VwzytQSBV7-c64dxx8 |
Required. Your Token from login or registration |
{
"circleId" : 6
}
{
{
"ball": {
"ID": 2,
"CreatedAt": "2019-12-04T17:01:01.690954+07:00",
"UpdatedAt": "2019-12-04T17:01:01.690954+07:00",
"DeletedAt": null,
"circleId": 6,
"volume": 4188.79,
"owner": "refo"
},
"message": "success",
"status": true
}
}