webknossos-libs icon indicating copy to clipboard operation
webknossos-libs copied to clipboard

Set folder for RemoteDataset

Open normanrz opened this issue 2 years ago • 2 comments

Detailed Description

  • Affected library: webknossos

webKnossos now supports dataset management in the form of folders. It would be great to be able to assign folders using the RemoteDataset class.

Use Cases & Context

  • Import scripts e.g. with PublishDataset in Voxelytics

normanrz avatar Nov 30 '22 14:11 normanrz

@fm3 is there already an API on the webKnossos side to support this. I think a good UX would be to have the user write the breadcrumb path, e.g. folder=/strokevision/a/b

normanrz avatar Nov 30 '22 15:11 normanrz

The datasetUpdate call now accepts an optional folderId parameter in the body.

With /folders/tree, the client could fetch the full tree to map from a path using folder names to the id. (That route has no swagger annotations yet, though).

Note that we decided that names don’t have to be unique per layer, so a path of folder names may be ambiguous.

As an additional feature, the client could also (attempt to) create the folder path if it does not yet exist, using POST /folders/create. Compare https://github.com/scalableminds/webknossos/blob/master/conf/webknossos.latest.routes#L84

fm3 avatar Dec 04 '22 18:12 fm3