-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.http
More file actions
60 lines (42 loc) · 1.04 KB
/
api.http
File metadata and controls
60 lines (42 loc) · 1.04 KB
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
# API List
# https://docs.feathersjs.com/api/databases/querying.html
# @baseUrl = https://wtgqgtivzc.execute-api.ap-southeast-1.amazonaws.com/dev
@baseUrl = http://localhost:3000/dev
### Create new contact
POST {{baseUrl}}/contact
Content-Type: application/json
{
"firstName": "Abu",
"lastName": "Jabbar",
"phoneNumber": "60123456441",
"email": "jabbar@gmail.com",
"address": "Melaka",
"birthDate": "10-06-1993"
}
### get all contact
GET {{baseUrl}}/contact
{
}
### sort contact based on createdAt (-1=descending, 1=acending)]
GET {{baseUrl}}/contact?[$sort][firstName]=1&[$sort][lastName]=1
{
}
### filter contact
GET {{baseUrl}}/contact?$or[0][lastName]=User&$or[1][firstName]=John
{
}
### Get specific contact
GET {{baseUrl}}/contact/61223baa61a88f9a00407358
{
}
### update contact
PATCH {{baseUrl}}/contact?_id=61223baa61a88f9a00407358
Content-Type: application/json
{
"address": "Cheras, Kuala Lumpur, Malaysia"
}
### remove contact
DELETE {{baseUrl}}/contact?_id=61229dc492257b0008a420b1
Content-Type: application/json
{
}