The REST APIs allow to list Directories using the following URL:
http://localhost:8080/nuxeo/api/v1/directory/
Using the Java client, this is not possible:
Directory directory = nuxeoClient.getDirectoryManager().fetchDirectory(""); for (DirectoryEntry entry : directory.getDirectoryEntries()) { System.out.println("object -> " + entry.getDirectoryName()); System.out.println("name -> " + entry.getProperties()); }
This returns the correct number of objects but null names and properties because the returned objects are not DirectoryEntries, there are Directories.
A workaround is to manually parse the JSON response but this could be cleaner by handling the use case inside the Java Client.