You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JSON API comes with a helper Request class, `NilPortugues\Api\JsonApi\Http\Message\Request(ServerRequestInterface $request)`, implementing the PSR-7 Request Interface. Using this request object will provide you access to all the interactions expected in a JSON API:
381
+
JSON API comes with a helper Request class, `NilPortugues\Api\JsonApi\Http\Request\Request(ServerRequestInterface $request)`, implementing the PSR-7 Request Interface. Using this request object will provide you access to all the interactions expected in a JSON API:
382
382
383
383
##### JSON API Query Parameters:
384
384
385
-
- &filter[resource]=field1,field2
386
-
- &include[resource]
387
-
- &include[resource.field1]
388
-
- &sort=field1,-field2
389
-
- &sort=-field1,field2
390
-
- &page[number]
391
-
- &page[limit]
392
-
- &page[cursor]
393
-
- &page[offset]
394
-
- &page[size]
385
+
-**&fields[resource]=field1,field2** will only show the specified fields for a given resource.
386
+
-**&include=resource** show the relationship for a given resource.
387
+
-**&include=resource.resource2** show the relationship field for those depending on resource2.
388
+
-**&sort=field1,-field2** sort by field2 as DESC and field1 as ASC.
389
+
-**&sort=-field1,field2** sort by field1 as DESC and field2 as ASC.
390
+
-**&page[number]** will return the current page elements in a *page-based* pagination strategy.
391
+
-**&page[size]** will return the total amout of elements in a *page-based* pagination strategy.
392
+
-**&page[limit]** will return the limit in a *offset-based* pagination strategy.
393
+
-**&page[offset]** will return the offset value in a *offset-based* pagination strategy.
394
+
-**&page[cursor]** will return the cursor value in a *cursor-based* pagination strategy.
395
+
-**&filter** will return data passed in the filter param.
0 commit comments