You are trying to implement a Resource Collection here.
As the documentation says:
In this case, your UsersController MUST always have a single resource get... action
class UsersController extends Controller
{
public function getUserAction($slug)
{} // "get_user" [GET] /users/{slug}
...
}
But the difference to the example is that your Organisation is the parent and NOT the User.
your MyProject\RestBundle\Controller\IrganizationsRestController has to provide something like a getOrganizationsRestAction(). OrganisationsRest ... is your parent.
I'm not sure what name FOSRestBundle expects when trying to access the singular form of UsersRest ...
As your Controller names are not providing any extra information being suffixed with "Rest" because your bundle is already named Rest Bundle ... you might consider changing the controller names to:
OrganisationsController
UsersController
and add the getOrganisationAction()
method to the OrganisationsController as in the example.