Hi, I’ve got an Yii REST web service working by creating an ApiController. The following works and loads the Item db record in JSON format by ItemId:
My question is how do I provide an alternate method for loading an Item record, other than ItemId. For example, I would like to be able to load the Item record by UPC Code. Something like this:
I tried adding a custom Action function to the ApiController, but I’m missing something as the URL request generates a 404 error: The system is unable to find the requested action “items”.
public function actionUpc()
Any idea how I can make this work?