API queries as I stumble over them

On first pass at using API, I like the use of headers more than the URL. There does seem to be rather a mix of URL and headers in places; given others apparent liking of URL fields, perhaps both can be made available? - though I do wonder for some fields only headers are appropriate and perhaps URL with data offers less privacy??

Headers
Connection: close
headers make no mention of
post_headers.insert("Connection".to_string(), "close".to_string());
which appears to be needed, so that request doesn’t just hang… or is that just a rust related issue?

Overwrite file?
What option for direct overwrite of files?.. I was expecting perhaps NFS File PUT for that.

Metadata
Is there a size limit on file metadata?

Drive structure
Could be made more obvious in docs - perhaps in Create Directory.
From what I can see it seems top of drive is /SAFEDrive/ and top of app is /appName-Root-Dir/
Does SAFEDrive then contain the /public/ and /private/ that are seen in the DemoApp?

and following my confusion of drive structures then:
NFS list directories?
What option is there to list private directories?
Is there an option to list app directories? Obviously drive and current app directory are apparent to an app but what option is there for a user to see what directories have been created? Also, will users have write control over the app directories to delete them?.. expecting perhaps user control is preferred - that needs to be understood by app developers.

NFS Create directory
docs example tempts creation of parent and subdirectory as one action
= http://localhost:8100/nfs/directory/drive/websites/www-example
so perhaps should be suggested as two steps possible
= http://localhost:8100/nfs/directory/drive/websites
then
= http://localhost:8100/nfs/directory/drive/websites/www-example

NFS Update directory

  • Perhaps should include an option to update isPrivate?
  • Trivially ‘name’ field would be better as ‘newName’

isPrivate
dir isPrivate could do with fuller explaination
→ Is that private to the user and the app… or private to the app and not accessible/?visible to user.

Permissions
Drive permissions to an app appear as null=“” but does that necessarily always allow app to write to its own directory… is that obvious enough to user? What with cookies and tracking being contentious, perhaps needs to be made clear. Otherwise app will know more that the user expects they allowed.

Cost of writing app data
Who pays for app write to its own directory and how much might that be?.. Are we expecting use of micropayments for such trivial writes??

1 Like