lookup
Specific fields
Allows to pick which link to record fields to lookup.
- Javascript
- PHP
- API
const { data, error } = await kontenbase.service('posts').find({
lookup: ['categories'],
})
$res = $kontenbase->service('posts')->find([
'lookup' => ['categories']
]);
[GET]
https://api.kontenbase.com/query/api/v1/API_KEY/posts?$lookup[0]=categories
All fields
Lookup to all link to record fields.
- Javascript
- Go
- PHP
- API
const { data, error } = await kontenbase.service('posts').find({
lookup: '*',
})
resp, err := client.Service("posts").Find()
.SetLookup("*")
$res = $kontenbase->service('posts')->find([
'lookup' => '*'
]);
[GET]
https://api.kontenbase.com/query/api/v1/API_KEY/posts?$lookup=*
Show only id
Only show id in the lookup result.
- Javascript
- PHP
- API
const { data, error } = await kontenbase.service('posts').find({
lookup: { _id: '*' },
})
$res = $kontenbase->service('posts')->find([
'lookup' => ['_id' => '*']
]);
[GET]
https://api.kontenbase.com/query/api/v1/API_KEY/posts?$lookup[_id]=*