Use the get
endpoint to fetch multiple records matching the criteria in your Jory Query.
Fetch all musicians.
Get the id
and last_name
of the first 10 musicians with first_name
like John
ordered by last_name
.
To fetch a single record by it's primary key use the find
endpoint by adding the id to the url.
Fetch the musician having id 4.
Fetch the the last_name
of the musician having id 4.
To fetch a single record use the first
endpoint.
Fetch the first musician.
Fetch the first musician ordered by last_name
.
Simple count
and exists
endpoints are available to do a record count or check if any record matches your criteria.
Count the musicians having a first_name
like John
.
Check if there is a musician having a first_name
like John
.
Use the root endpoint to fetch multiple unrelated resources at once. When using this endpoint the jory
parameter must hold key/value pairs, the key being the resource
and the value being the Jory Query.
Fetch all musicians and bands at once.
The data will be returned matching the same keys.
Fetch the first 10 musicians and all bands ordered by name.
The first
, find
, count
and exists
functions are available when fetching multiple resources by using a colon.
Fetch the first_name
of musician having id 4 and the total number of bands.
The keys may be post-fixed with as {alias}
to return the data on a custom key, which allows to fetch a single resource multiple times.
Fetch the first_name
of musicians being born after the sixties, all musicians with a first_name
like John
and a total musician count.