Is there an API to search through all comments ?
I am looking for files that have comments containing a certain string.
It is easy to do directly in the database but I would like to do this from an external app using an API.
I’ve had a quick look through the available APIs:
But unfortunately I didn’t find anything that could help you, so I would guess this API does not exist. Perhaps @jvillafanez knows more?
There is no API to search for comments.
You could try to implement a search provider in the comments app and create an API over the ownCloud’s search providers.
Basically, the comments app would register a search provider (you’ll have to implement it) to search for comments. You could use the ownCloud’s search to ask for results from a different ownCloud app.
If you want to access from somewhere outside the ownCloud environment, you’ll also need to create an API to expose the results.
You can check https://github.com/owncloud/core/blob/master/lib/private/Search.php and https://github.com/owncloud/core/blob/754e66a799dc045d81fbe8281dd8d8065a0d1e6e/lib/public/Search/PagedProvider.php#L30 as starting points.
Thanks a lot for your feedbacks. I am trying to extend the provisioning_api app. This is very similar as searching for users or for groups.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.