-
Notifications
You must be signed in to change notification settings - Fork 0
/
rest-api-queries.http
79 lines (69 loc) · 1.35 KB
/
rest-api-queries.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
73
74
75
76
77
78
79
@baseurl = http://localhost:8080/api/v1
### POST Person A
POST {{baseurl}}/people
Content-Type: application/json
{
"firstName":"Person",
"lastName":"Name A",
"cpf":"920.986.426-36",
"birthDate": "15-06-1933",
"phones":[
{
"type":"MOBILE",
"number":"(01)999999999"
}
]
}
### POST Person B
POST {{baseurl}}/people
Content-Type: application/json
{
"firstName":"Person",
"lastName":"Name B",
"cpf":"992.437.384-70",
"birthDate": "25-03-1693",
"phones":[
{
"type":"HOME",
"number":"(02)123456789"
}
]
}
### POST Person C
POST {{baseurl}}/people
Content-Type: application/json
{
"firstName":"Person",
"lastName":"Name C",
"cpf":"624.113.847-26",
"birthDate": "28-08-1850",
"phones":[
{
"type":"COMMERCIAL",
"number":"(03)999999999"
}
]
}
### PUT Person
PUT {{baseurl}}/people/1
Content-Type: application/json
{
"id":1,
"firstName":"Person",
"lastName":"Updated",
"cpf":"992.437.384-70",
"birthDate": "25-03-1993",
"phones":[
{
"id": 1,
"type":"MOBILE",
"number":"(04)999999999"
}
]
}
### GET ListAll
GET {{baseurl}}/people
### GET byId 1
GET {{baseurl}}/people/1
### DELETE id 1
DELETE {{baseurl}}/people/1