[ACE-5554] Broken Get Sites REST API in 5.0 (cannot search by presets filter) Created: 10-Jul-14 Updated: 27-Feb-17 Resolved: 27-Jan-17
|Project:||Alfresco One Platform|
|Reporter:||Oksana Kurysheva (Inactive)||Assignee:||Closed Issues|
|Remaining Estimate:||0 minutes|
|Time Spent:||5 minutes|
|Original Estimate:||0 minutes|
org/alfresco/repository/site/sites.get API allows to get all sites using following filter parameters:
In 4.2 "sitePreset" filter works great, but it 5.0 it is broken.
The reason is that the filter has been removed from the findSites request in file http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/remote-api/config/alfresco/templates/webscripts/org/alfresco/repository/site/sites.get.js
Request in 4.2:
Request in 5.0:
Is it possible to repair it in the future versions?
|Comment by Kevin Roast [X] (Inactive) [ 01-Aug-14 ]|
getSites() uses the DB and has performance issues - this is why the sites API was switched to use findSites() (SOLR based) in 5.0.
However, there are two findSites() methods in the SiteService - one of which does support the sitePreset parameter but is not exposed to the sites.get API - HOWEVER they have different implementations even though they have very similar method signatures - I think this is a mistake and they should use a single implementation that can support both nameFilter and sitePreset options. These methods are currently a mess and could really do with resolving- which would also fix this issue.
|Comment by Richard Esplin [X] (Inactive) [ 13-Jul-15 ]|
Gab, Gav, and Richard: This is a valid use case that should be met. We need to verify that the V1 API provides a replacement for getSites (that it provides proper parameters to meet this need), and if it does not, we should fix the V1 API.
|Comment by Martin Bergljung [ 16-Nov-15 ]|
The new Alfresco REST API for this: /alfresco/api/
The v0 Web Script based API is deprecated, so I would focus on the new API and not fix anything in v0.
|Comment by Gavin Cornwell [ 11-Aug-16 ]|
I've moved this one to ACE and linked it to a story for the Platform team to address as part of the REST API hardening effort.
|Comment by Gavin Cornwell [ 27-Jan-17 ]|
Fixed as part of the 5.2 REST API effort, see