// Check the parameters
if (resourceId == null)
return Response.status(Status.BAD_REQUEST).build();
Site site = getSite(request);
SearchQuery q = new SearchQueryImpl(site);
q.withVersion(Resource.LIVE);
q.withTypes(Page.TYPE);
q.withProperty("resourceid", resourceId);
ContentRepository repository = getContentRepository(site, false);
SearchResult result = null;
try {
result = repository.find(q);