How to parse jsonapi-like query parameters in non-API requests (ie. by using the url field in a web browser)

Hi,

I use the crud-json-api plugin for my CakePHP 4 api responses. It works great and something I love is that I can manipulate the response by sending query parameters in my requests.

For example, I can do something like:

GET /api/orders?sort=-date&include=stores&fields[stores]=id,code,name

And it would respond with an appropriate response. I could also include pagination and filtering params.

WHAT DO I NEED HELP WITH?

I would like to achieve this same behavior by using these same query parameters in “regular” http requests (ie. non-API calls, but browser requests).

For instance, I would like to type this in my web browser:

/orders?sort=-date&include=stores&fields[stores]=id,code,name

And I would like to receive a response according to the query params I’m sending, but in regular entity objects and view variables to display the web view in my browser (ie. an HTML page).

NOTE: I’m also using crud and crud-view plugins. This combo works great!

MY QUESTIONS:

Is there a way to achieve this using a combo with crud, crud-view and crud-json-api plugins?

Is there any other plugin I can use to achieve this? Can that plugin be combined with crud and crud-view?

Should I implement this myself?

Thanks a lot in advance for your help!