Cells v1.6.1
I am attempting to use Postman to play with the API. I have successfully authenticated and can create a cell under a particular user. However, I’ve run into an odd problem. If I create two cells with the same title e.g. “testtitle” then the “Path” component necessary for creating folders will be “testtitle” and “testtitle-1”. In order to create folders in these separately I need to use the Path with the Tree API (e.g. testtitle/new folder or testtitle-1/new folder), which means I need to be able to get the Path in order to distinguish between two cells with the same title. In the API docs this appears to be done using GET “/a/share/cell/{{cell_uuid}}” which should return a “RootNodes” array. Unfortunately, for no apparent reason and only when using Postman, this API call is only returning a subset of the documented data and is not including “RootNodes”. This means I can’t get the path name and therefore I cannot distinguish between two cells with the same title.
(1) There’s something weird going on that only happens when I use Postman because if I watch what happens in the browser with the Pydio network calls then GET “/a/share/cell/{{uuid}}” will return RootNodes as expected. It’s just my API calls from Postman that seem to be returning a limited subset of the data. Could it be a security thing? I’m using the documented “cells-front” client user to do OAuth2, exactly as described in the API docs explaining how to use Postman for Cells v1.
(2) This is maybe a bit of a rant, but why does the Tree API use slug paths for the root instead of uuids? Speaking as a software engineer myself, it seems counter-intuitive to use a label that has the potential to be non-unique in a situation where the uuid would remove any chance of conflict. I’ve already run into issues where my API failures have resulted in incorrect slugs due to some faulty logic in the slug numbering (the wrong “name” was ending up in the idx_…_tree table somehow). I fixed these in the SQL manually and haven’t seen them again since fixing my API calls to work correctly though.