diff --git a/README.md b/README.md index 8de29de..276c28f 100644 --- a/README.md +++ b/README.md @@ -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:
+Untuk `list` cukup dengan memanggil End-Point tanpa Body Content.
+Untuk `remove` cukup memberikan `id` pada Body (JSON) dari data yang ingin dihapus. Contoh:
```json {"id":1} ``` (Contoh jika `id` dari data adalah `1`) -Berikut adalah parameter untuk Add: +Berikut adalah parameter pada Body untuk `add`: ### `bmi` diff --git a/bruno/Auth/Login.bru b/bruno/Auth/Login.bru new file mode 100644 index 0000000..ca69eb1 --- /dev/null +++ b/bruno/Auth/Login.bru @@ -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" + } +} diff --git a/bruno/Auth/Logout.bru b/bruno/Auth/Logout.bru new file mode 100644 index 0000000..accd5f6 --- /dev/null +++ b/bruno/Auth/Logout.bru @@ -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 +} diff --git a/bruno/Auth/Notme.bru b/bruno/Auth/Notme.bru new file mode 100644 index 0000000..22e9629 --- /dev/null +++ b/bruno/Auth/Notme.bru @@ -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 +} diff --git a/bruno/Auth/Register.bru b/bruno/Auth/Register.bru new file mode 100644 index 0000000..81abd54 --- /dev/null +++ b/bruno/Auth/Register.bru @@ -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" + } +} diff --git a/bruno/Auth/Resend.bru b/bruno/Auth/Resend.bru new file mode 100644 index 0000000..e06d0d9 --- /dev/null +++ b/bruno/Auth/Resend.bru @@ -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 +} diff --git a/bruno/Auth/Session.bru b/bruno/Auth/Session.bru new file mode 100644 index 0000000..088a7c4 --- /dev/null +++ b/bruno/Auth/Session.bru @@ -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. +} diff --git a/bruno/Auth/Verify.bru b/bruno/Auth/Verify.bru new file mode 100644 index 0000000..589050d --- /dev/null +++ b/bruno/Auth/Verify.bru @@ -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 +} diff --git a/bruno/Checkcare/BMI/BMI Add.bru b/bruno/Checkcare/BMI/BMI Add.bru new file mode 100644 index 0000000..bb2b1fc --- /dev/null +++ b/bruno/Checkcare/BMI/BMI Add.bru @@ -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 + } +} diff --git a/bruno/Checkcare/BMI/BMI List.bru b/bruno/Checkcare/BMI/BMI List.bru new file mode 100644 index 0000000..e273591 --- /dev/null +++ b/bruno/Checkcare/BMI/BMI List.bru @@ -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 + } +} diff --git a/bruno/Checkcare/BMI/BMI Remove.bru b/bruno/Checkcare/BMI/BMI Remove.bru new file mode 100644 index 0000000..c0c061c --- /dev/null +++ b/bruno/Checkcare/BMI/BMI Remove.bru @@ -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 + } +} diff --git a/bruno/Checkcare/Fasting/Fasting Add.bru b/bruno/Checkcare/Fasting/Fasting Add.bru new file mode 100644 index 0000000..569562c --- /dev/null +++ b/bruno/Checkcare/Fasting/Fasting Add.bru @@ -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" + } +} diff --git a/bruno/Checkcare/Fasting/Fasting List.bru b/bruno/Checkcare/Fasting/Fasting List.bru new file mode 100644 index 0000000..006e5f4 --- /dev/null +++ b/bruno/Checkcare/Fasting/Fasting List.bru @@ -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 + } +} diff --git a/bruno/Checkcare/Fasting/Fasting Remove.bru b/bruno/Checkcare/Fasting/Fasting Remove.bru new file mode 100644 index 0000000..5cfeb41 --- /dev/null +++ b/bruno/Checkcare/Fasting/Fasting Remove.bru @@ -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 + } +} diff --git a/bruno/Checkcare/Glucose/Glucose Add.bru b/bruno/Checkcare/Glucose/Glucose Add.bru new file mode 100644 index 0000000..d88e4be --- /dev/null +++ b/bruno/Checkcare/Glucose/Glucose Add.bru @@ -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" + } +} diff --git a/bruno/Checkcare/Glucose/Glucose List.bru b/bruno/Checkcare/Glucose/Glucose List.bru new file mode 100644 index 0000000..ed85927 --- /dev/null +++ b/bruno/Checkcare/Glucose/Glucose List.bru @@ -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 + } +} diff --git a/bruno/Checkcare/Glucose/Glucose Remove.bru b/bruno/Checkcare/Glucose/Glucose Remove.bru new file mode 100644 index 0000000..ac95d08 --- /dev/null +++ b/bruno/Checkcare/Glucose/Glucose Remove.bru @@ -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 + } +} diff --git a/bruno/Checkcare/Profile/Profile Detail.bru b/bruno/Checkcare/Profile/Profile Detail.bru new file mode 100644 index 0000000..fd4ae12 --- /dev/null +++ b/bruno/Checkcare/Profile/Profile Detail.bru @@ -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 +} diff --git a/bruno/Checkcare/Profile/Profile Edit.bru b/bruno/Checkcare/Profile/Profile Edit.bru new file mode 100644 index 0000000..2163979 --- /dev/null +++ b/bruno/Checkcare/Profile/Profile Edit.bru @@ -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" + } +} diff --git a/bruno/Checkcare/Temp/Temp Add.bru b/bruno/Checkcare/Temp/Temp Add.bru new file mode 100644 index 0000000..e43e44e --- /dev/null +++ b/bruno/Checkcare/Temp/Temp Add.bru @@ -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" + } +} diff --git a/bruno/Checkcare/Temp/Temp List.bru b/bruno/Checkcare/Temp/Temp List.bru new file mode 100644 index 0000000..aa48d30 --- /dev/null +++ b/bruno/Checkcare/Temp/Temp List.bru @@ -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 + } +} diff --git a/bruno/Checkcare/Temp/Temp Remove.bru b/bruno/Checkcare/Temp/Temp Remove.bru new file mode 100644 index 0000000..9559c03 --- /dev/null +++ b/bruno/Checkcare/Temp/Temp Remove.bru @@ -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 + } +} diff --git a/bruno/Checkcare/Tension/Tension Add.bru b/bruno/Checkcare/Tension/Tension Add.bru new file mode 100644 index 0000000..534d596 --- /dev/null +++ b/bruno/Checkcare/Tension/Tension Add.bru @@ -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" + } +} diff --git a/bruno/Checkcare/Tension/Tension List.bru b/bruno/Checkcare/Tension/Tension List.bru new file mode 100644 index 0000000..24b10c4 --- /dev/null +++ b/bruno/Checkcare/Tension/Tension List.bru @@ -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 + } +} diff --git a/bruno/Checkcare/Tension/Tension Remove.bru b/bruno/Checkcare/Tension/Tension Remove.bru new file mode 100644 index 0000000..2a4d142 --- /dev/null +++ b/bruno/Checkcare/Tension/Tension Remove.bru @@ -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 + } +} diff --git a/bruno/bruno.json b/bruno/bruno.json new file mode 100644 index 0000000..45fd654 --- /dev/null +++ b/bruno/bruno.json @@ -0,0 +1,5 @@ +{ + "version": "1", + "name": "UAS API", + "type": "collection" +}