Update dokumentasi

This commit is contained in:
Dita Aji Pratama 2025-07-10 06:27:37 +07:00
parent 0a4c936f7f
commit aa8736b83b
26 changed files with 580 additions and 2 deletions

View File

@ -47,13 +47,14 @@ Contoh penggunaan:
https://uas.ditaajipratama.net/api/checkcare/bmi/list
```
Untuk `remove` cukup memberikan `id` dari data yang ingin dihapus. Contoh: <br>
Untuk `list` cukup dengan memanggil End-Point tanpa Body Content. <br>
Untuk `remove` cukup memberikan `id` pada Body (JSON) dari data yang ingin dihapus. Contoh: <br>
```json
{"id":1}
```
(Contoh jika `id` dari data adalah `1`)
Berikut adalah parameter untuk Add:
Berikut adalah parameter pada Body untuk `add`:
### `bmi`

18
bruno/Auth/Login.bru Normal file
View File

@ -0,0 +1,18 @@
meta {
name: Login
type: http
seq: 5
}
post {
url: https://uas.ditaajipratama.net/api/auth/login
body: json
auth: none
}
body:json {
{
"username":"su",
"password":"su"
}
}

15
bruno/Auth/Logout.bru Normal file
View File

@ -0,0 +1,15 @@
meta {
name: Logout
type: http
seq: 7
}
post {
url: https://uas.ditaajipratama.net/api/auth/logout
body: none
auth: none
}
headers {
Authorization: Bearer xx.xx.xx
}

15
bruno/Auth/Notme.bru Normal file
View File

@ -0,0 +1,15 @@
meta {
name: Notme
type: http
seq: 3
}
get {
url: https://uas.ditaajipratama.net/api/auth/notme?token=xx.xx.xx
body: none
auth: none
}
params:query {
token: xx.xx.xx
}

28
bruno/Auth/Register.bru Normal file
View File

@ -0,0 +1,28 @@
meta {
name: Register
type: http
seq: 1
}
post {
url: https://uas.ditaajipratama.net/api/auth/register/:roles
body: json
auth: none
}
params:path {
roles: member
}
body:json {
{
"captcha":"test",
"username":"member",
"email":"user@domain.com",
"password":"member",
"id":"20250429",
"name":"User Full Name",
"dob":"1999-09-19",
"sex":"Male"
}
}

15
bruno/Auth/Resend.bru Normal file
View File

@ -0,0 +1,15 @@
meta {
name: Resend
type: http
seq: 2
}
get {
url: https://uas.ditaajipratama.net/api/auth/resend?email=user@domain.com
body: none
auth: none
}
params:query {
email: user@domain.com
}

30
bruno/Auth/Session.bru Normal file
View File

@ -0,0 +1,30 @@
meta {
name: Session
type: http
seq: 6
}
post {
url: https://uas.ditaajipratama.net/api/auth/session/:type
body: none
auth: none
}
params:path {
type: check
}
headers {
Authorization: Bearer xx.xx.xx
}
docs {
This API only used when you use CostaPy as your main client.
Session have a 3 type:
- `set` for set the Bearer inside the Authorization. Need to declare a `jwt` on JSON Body.
- `check` for check the Bearer is still valid or not.
- `out` for remove the Bearer inside of Authorization.
The `set`, `out`, and some part of `check` is still not tested yet. Need the interface to test it.
}

15
bruno/Auth/Verify.bru Normal file
View File

@ -0,0 +1,15 @@
meta {
name: Verify
type: http
seq: 4
}
get {
url: https://uas.ditaajipratama.net/api/auth/verify?token=xx.xx.xx
body: none
auth: none
}
params:query {
token: xx.xx.xx
}

View File

@ -0,0 +1,26 @@
meta {
name: BMI Add
type: http
seq: 1
}
post {
url: https://uas.ditaajipratama.net/api/checkcare/bmi/:alder
body: json
auth: none
}
params:path {
alder: add
}
headers {
Authorization: Bearer xx.xx.xx
}
body:json {
{
"weight":88,
"height":175
}
}

View File

@ -0,0 +1,26 @@
meta {
name: BMI List
type: http
seq: 2
}
post {
url: https://uas.ditaajipratama.net/api/checkcare/bmi/:alder
body: none
auth: none
}
params:path {
alder: list
}
headers {
Authorization: Bearer xx.xx.xx
}
body:json {
{
"weight":88,
"height":175
}
}

View File

@ -0,0 +1,25 @@
meta {
name: BMI Remove
type: http
seq: 3
}
post {
url: https://uas.ditaajipratama.net/api/checkcare/bmi/:alder
body: json
auth: none
}
params:path {
alder: remove
}
headers {
Authorization: Bearer xx.xx.xx
}
body:json {
{
"id":1
}
}

View File

@ -0,0 +1,26 @@
meta {
name: Fasting Add
type: http
seq: 1
}
post {
url: https://uas.ditaajipratama.net/api/checkcare/fasting/:alder
body: json
auth: none
}
params:path {
alder: add
}
headers {
Authorization: Bearer xx.xx.xx
}
body:json {
{
"when_last_eat":"2025-04-28 14:48:00",
"when_last_drink":"2025-04-28 14:48:00"
}
}

View File

@ -0,0 +1,26 @@
meta {
name: Fasting List
type: http
seq: 2
}
post {
url: https://uas.ditaajipratama.net/api/checkcare/fasting/:alder
body: none
auth: none
}
params:path {
alder: list
}
headers {
Authorization: Bearer xx.xx.xx
}
body:json {
{
"weight":88,
"height":175
}
}

View File

@ -0,0 +1,25 @@
meta {
name: Fasting Remove
type: http
seq: 3
}
post {
url: https://uas.ditaajipratama.net/api/checkcare/fasting/:alder
body: json
auth: none
}
params:path {
alder: remove
}
headers {
Authorization: Bearer xx.xx.xx
}
body:json {
{
"id":1
}
}

View File

@ -0,0 +1,29 @@
meta {
name: Glucose Add
type: http
seq: 1
}
post {
url: https://uas.ditaajipratama.net/api/checkcare/glucose/:alder
body: json
auth: none
}
params:path {
alder: add
}
headers {
Authorization: Bearer xx.xx.xx
}
body:json {
{
"result":"88",
"unit":"mg/dL",
"method":"CBG",
"location":"Right Hand",
"tool":"Alat Doraemon"
}
}

View File

@ -0,0 +1,26 @@
meta {
name: Glucose List
type: http
seq: 2
}
post {
url: https://uas.ditaajipratama.net/api/checkcare/glucose/:alder
body: none
auth: none
}
params:path {
alder: list
}
headers {
Authorization: Bearer xx.xx.xx
}
body:json {
{
"weight":88,
"height":175
}
}

View File

@ -0,0 +1,25 @@
meta {
name: Glucose Remove
type: http
seq: 3
}
post {
url: https://uas.ditaajipratama.net/api/checkcare/glucose/:alder
body: json
auth: none
}
params:path {
alder: remove
}
headers {
Authorization: Bearer xx.xx.xx
}
body:json {
{
"id":1
}
}

View File

@ -0,0 +1,19 @@
meta {
name: Profile Detail
type: http
seq: 1
}
post {
url: https://uas.ditaajipratama.net/api/checkcare/profile/:alder
body: json
auth: none
}
params:path {
alder: detail
}
headers {
Authorization: Bearer xx.xx.xx
}

View File

@ -0,0 +1,27 @@
meta {
name: Profile Edit
type: http
seq: 2
}
post {
url: https://uas.ditaajipratama.net/api/checkcare/profile/:alder
body: json
auth: none
}
params:path {
alder: edit
}
headers {
Authorization: Bearer xx.xx.xx
}
body:json {
{
"name": "Dita Aji Pratama",
"dob": "1999-09-09",
"sex": "Male"
}
}

View File

@ -0,0 +1,26 @@
meta {
name: Temp Add
type: http
seq: 1
}
post {
url: https://uas.ditaajipratama.net/api/checkcare/temp/:alder
body: json
auth: none
}
params:path {
alder: add
}
headers {
Authorization: Bearer xx.xx.xx
}
body:json {
{
"temperature":75,
"unit":"C"
}
}

View File

@ -0,0 +1,26 @@
meta {
name: Temp List
type: http
seq: 2
}
post {
url: https://uas.ditaajipratama.net/api/checkcare/temp/:alder
body: none
auth: none
}
params:path {
alder: list
}
headers {
Authorization: Bearer xx.xx.xx
}
body:json {
{
"weight":88,
"height":175
}
}

View File

@ -0,0 +1,25 @@
meta {
name: Temp Remove
type: http
seq: 3
}
post {
url: https://uas.ditaajipratama.net/api/checkcare/temp/:alder
body: json
auth: none
}
params:path {
alder: remove
}
headers {
Authorization: Bearer xx.xx.xx
}
body:json {
{
"id":1
}
}

View File

@ -0,0 +1,28 @@
meta {
name: Tension Add
type: http
seq: 1
}
post {
url: https://uas.ditaajipratama.net/api/checkcare/tension/:alder
body: json
auth: none
}
params:path {
alder: add
}
headers {
Authorization: Bearer xx.xx.xx
}
body:json {
{
"sys":88,
"dia":88,
"pulse":88,
"note":"175"
}
}

View File

@ -0,0 +1,26 @@
meta {
name: Tension List
type: http
seq: 2
}
post {
url: https://uas.ditaajipratama.net/api/checkcare/tension/:alder
body: none
auth: none
}
params:path {
alder: list
}
headers {
Authorization: Bearer xx.xx.xx
}
body:json {
{
"weight":88,
"height":175
}
}

View File

@ -0,0 +1,25 @@
meta {
name: Tension Remove
type: http
seq: 3
}
post {
url: https://uas.ditaajipratama.net/api/checkcare/tension/:alder
body: json
auth: none
}
params:path {
alder: remove
}
headers {
Authorization: Bearer xx.xx.xx
}
body:json {
{
"id":1
}
}

5
bruno/bruno.json Normal file
View File

@ -0,0 +1,5 @@
{
"version": "1",
"name": "UAS API",
"type": "collection"
}