API creating resource for record not in database


I’m trying to create an API resource for a record that is not in the database, but generated with given Item and User (something like /api/recommendation?item=x&user=y).
Since apparently the default api controller requires that the record is in the database, i’ve added ‘controller’ => ‘recommendation’ to the api_resource filter, but the api request always returns “message”: “Invalid controller specified (recommendation)” . I’ve tried creating a controller (RecommendationController.php) with class called MyPlugin_RecommendationController and put in the myplugin/controllers folder or in a myplugin/controllers/api folder but neither of them work, always shows that message for invalid controller.

Does anyone know what I am doing wrong?

Thanks in advance!

Is this an Omeka S question or an Omeka “classic” (2.x) question?

You filed it under Omeka S, but it sounds like classic to me.

Hello John,

You’re right, it should be Omeka Classic, my mistake was because I saw “development” . It’s under Omeka Classic now, thank you.