@SneakyThrows
    public List<Service> listServices(final String layer, final String group) throws IOException {
        return this.combineServices(this.serviceCache.get(true).values().stream().flatMap(Collection::stream)
            .filter(svc -> {
                if (StringUtils.isNotEmpty(layer) && !svc.getLayers().contains(layer)) {
                    return false;
                }
                return StringUtils.isEmpty(group) || Objects.equals(svc.getGroup(), group);
            }).collect(Collectors.toList()));
    }
@return all services, key is service id, value is services with different layers.
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/MetadataQueryService.java