Add some docs

This commit is contained in:
Kamal Bennani 2018-09-14 00:23:40 +02:00
parent f8d844a48a
commit 3593046c41
No known key found for this signature in database
GPG Key ID: 4513063CDB1A1C25

View File

@ -37,6 +37,16 @@ Find products having a price equal or greater than `3`.
`GET /products?price_gte=3`
#### Relations
You can also use filters into a relation attribute which will be applied to the first level of the request.
Find users having written a post named `Title`.
`GET /user?posts.name=Title`
Find posts written by a user having more than 12 years old.
`GET /post?author.age_gt=12`
> Note: You can't use filter to have specific results inside relation, like "Find users and only their posts older than yesterday" as example. If you need it, you can modify or create your own service ou use [GraphQL](./graphql.md#query-api).
> Warning: this filter isn't available for `upload` plugin
### Sort
Sort according to a specific field.