Grist workspace as subfolder in /docker/grist/persist/docs/as-workspace-name

Hello Grist team.
I try to connect FastReport report generator to .grist DB.
At the moment, we cannot get direct remote access to read the database via a link (it would be ideal)
Is possible set env variable to create subfolder in /docker/grist/persist/docs/workspace-name when create workspace, for restrict access for readed DB?

What kind of direct remote access via link are you looking for? If you want to download the .grist document, there is an endpoint for that: /download

For example, here is a download link for one of the public templates:

No, I haven’t seen anyone build something like that. One possibility might be to write a small script that periodically looks at the docs and workspaces tables of landing.db, and makes appropriate symbolic links for the documents? The part that looks at landing.db could be something like:

$ sqlite3 --json landing.db "select as docId, as workspaceId from docs \
  left join workspaces on = docs.workspace_id"

Sorry, I’m only figuring out self-hosted grist.
I have mapped docker container volume on my host /persist
If i set GRIST_ORG_IN_PATH=true
I expect that self-hosted grist for example implements team site (test) not as subdomain ( but as path
I was hoping that in this mode in volume on my host /persist creates folder test and I will be able to set access to document file permissions at /persist/test
But I can normaly use grist only with this variables:

I understand that maybe team site mode for self-hosted grist not available
Therefore, I hoped that in the GRIST_SINGLE_ORG=test mode when creating Workspaces (ws) grist can create folder on /persist/test/ws

Ah, I see. No, neither team names nor workspace names map onto directories on disk. They can both be retrieved from the database though. For example this query:

$ sqlite3 --json landing.db "select as docId, as workspace, as team from docs \
  left join workspaces on = docs.workspace_id \
left join orgs on = workspaces.org_id"

will report workspace names and team site names for all documents, which could then be soft-linked into directories as you wish by a small script:

 {"docId":"sample_20","workspace":"Tailor Made","team":"Shiny"},
1 Like