Answer the question
In order to leave comments, you need to log in
How to pass fetch parameters to REST API?
Hello! I got up, now, in front of a problem that I don’t know how to solve, within the framework of REST.
Here, for example: there is a resource "voyages". Get all items - GET api/voyages/. But how can I get, say, all resources that have status = x, let's say? I'm using Yii2 and would normally do it with ActiveQuery by specifying the parameters. But here, in the REST API, there is no QueryBuilder. And how to be? Relatively speaking, I even need to limit the pool of resource objects available to the API user. Many thanks for any information, I hope I did not set it out too confusingly.
Answer the question
In order to leave comments, you need to log in
So there is REST in the documentation:
www.yiiframework.com/doc-2.0/guide-rest-quick-star... Everything
is described
there. Yii2 has everything you need for REST in 20 minutes.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question