# 获取 restaurants 所有内容
GET http://localhost:1337/restaurants
# 获取 restaurants 中 id = 1 的内容
GET http://localhost:1337/restaurants/1
# 获取 restaurants 中内容的数量
GET http://localhost:1337/restaurants/count
2、过滤
# 获取 firstName 等于 John 的内容
GET /users?firstName=John
or
GET /users?firstName_eq=John
# 获取 price ≥ 3 的餐馆
GET /restaurants?price_gte=3# 获取 id 为 3 或 6 或 8 的餐馆
GET /restaurants?id_in=3&id_in=6&id_in=8
Filter
Description
No suffix or eq
Equal
ne
Not equal
lt
Less than
gt
Greater than
lte
Less than or equal to
gte
Greater than or equal to
in
Included in an array
nin
Not included in an array
contains
Contains
ncontains
Doesn’t contain
containss
Contains, case sensitive
ncontainss
Doesn’t contain, case sensitive
null
Is null or not null
3、where
GET /restaurants?_where[price_gte]=3
GET /restaurants?_where[0][price_gte]=3&[0][price_lte]=7
<