private static Publication.Resource createResourceForFileInFolder(ResourceDescriptor sourceFileDescriptor,
                                                                      ResourceDescriptor sourceFolderDescriptor,
                                                                      String targetFolderUrl,
                                                                      Publication.ResourceAction action) {
        String relativeFilePath = sourceFolderDescriptor.getRelativePath(sourceFileDescriptor);
        String targetUrl = targetFolderUrl + ResourceDescriptor.PATH_SEPARATOR + relativeFilePath;
        return new Publication.Resource()
                .setAction(action)
                .setSourceUrl(sourceFileDescriptor.getUrl())
                .setTargetUrl(targetUrl);
    }
Leaves only required fields for listing.
server/src/main/java/com/epam/aidial/core/server/service/PublicationService.java