-
Notifications
You must be signed in to change notification settings - Fork 0
/
testing.http
72 lines (58 loc) · 1.66 KB
/
testing.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
### LIST persons with size and page parameter
GET http://localhost:8080/api/v1/person?size=5&page=0
Authorization: Bearer {{auth_token}}
Accept: application/json
### GET person by id
GET http://localhost:8080/api/v1/person/1207232810950003
Authorization: Bearer {{auth_token}}
Accept: application/json
### Create Person (success)
POST http://localhost:8080/api/v1/person
Authorization: Bearer {{auth_token}}
Content-Type: application/json
Accept: application/json
{
"idNumber": "1207230406920002",
"fullName": "Marco Silaban",
"placeOfBirth": "Medan",
"dateOfBirth": "1994-04-05",
"gender": 1,
"bloodGroup": "AB",
"address": "Jl. Karya I No. 2",
"religion": "Buddha",
"maritalStatus": "Belum Kawin",
"profession": "Karyawan Swasta",
"citizenship": "WNI",
"phoneNumber": "+6282276037485"
}
### Update Person (success)
PUT http://localhost:8080/api/v1/person/1207230406920002
Authorization: Bearer {{auth_token}}
Content-Type: application/json
Accept: application/json
{
"fullName": "Marco Domu Silaban",
"placeOfBirth": "Medan",
"dateOfBirth": "1994-04-10",
"gender": 1,
"bloodGroup": "A",
"address": "Jl. Karya I No. 3",
"religion": "Hindu",
"maritalStatus": "Belum Kawin",
"profession": "Karyawan BUMN",
"citizenship": "WNI",
"phoneNumber": "+6282276037485"
}
### Delete person
DELETE http://localhost:8080/api/v1/person/1207230406920002
Authorization: Bearer {{auth_token}}
Accept: application/json
### Login
POST http://localhost:8080/api/v1/auth/login
Content-Type: application/json
Accept: application/json
{
"email": "[email protected]",
"password": "admin"
}
> {% client.global.set("auth_token", response.body.data.accessToken); %}