algoliasearch/src/offline/java/com/algolia/search/saas/OfflineClient.java
private JSONObject listIndexesOfflineSync() throws AlgoliaException {
        try {
            final String rootDataPath = getRootDataDir().getAbsolutePath();
            final File appDir = getAppDir();
            final File[] directories = appDir.listFiles(new FileFilter() {
                @Override
                public boolean accept(File pathname) {
                    return pathname.isDirectory();
                }
            });
            JSONObject response = new JSONObject();
            JSONArray items = new JSONArray();
            if (directories != null) {
                for (File directory : directories) {
                    final String name = directory.getName();
                    if (hasOfflineData(name)) {
                        items.put(new JSONObject()
                            .put("name", name)
                        );
                        // TODO: Do we need other data as in the online API?
                    }
                }
            }
            response.put("items", items);
            return response;
        } catch (JSONException e) {
            throw new RuntimeException(e); // should never happen
        }
    }
private JSONObject listIndexesOfflineSync() throws AlgoliaException {
        try {
            final String rootDataPath = getRootDataDir().getAbsolutePath();
            final File appDir = getAppDir();
            final File[] directories = appDir.listFiles(new FileFilter() {
                @Override
                public boolean accept(File pathname) {
                    return pathname.isDirectory();
                }
            });
            JSONObject response = new JSONObject();
            JSONArray items = new JSONArray();
            if (directories != null) {
                for (File directory : directories) {
                    final String name = directory.getName();
                    if (hasOfflineData(name)) {
                        items.put(new JSONObject()
                            .put("name", name)
                        );
                        // TODO: Do we need other data as in the online API?
                    }
                }
            }
            response.put("items", items);
            return response;
        } catch (JSONException e) {
            throw new RuntimeException(e); // should never happen
        }
    }
List existing offline indices.

**Note:** This applies both to {@link MirroredIndex} and {@link OfflineIndex} instances. Only indices that
*actually exist* on disk are listed. If an instance was created but never synced or written to, it will not
appear in the list.

@return A JSON object with an `items` attribute containing the indices details as JSON objects.