Get project sharing
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const sharing = await client.projects.sharing.get({ projectId: '<projectId>',});console.log(sharing);curl -X GET 'https://app.flora.ai/api/v1/projects/<projectId>/sharing' \ -H 'Authorization: Bearer $FLORA_API_KEY'Returns how the project is shared: the link sharing mode, the active share link (only when the authenticated user may manage sharing), the owner, and everyone with a seat on the project. Missing and inaccessible projects both return 404.
Error responses use the standard error body.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Project identifier
Project identifier
Responses
Section titled “ Responses ”Sharing state returned.
object
Project identifier
Workspace identifier
Link sharing mode: restricted (no links; members only), view (anyone with the link can view), edit (anyone with the link can edit)
True when only the owner and the people it was shared with can see the project, rather than the whole workspace
Whether the authenticated user may change this project’s sharing
object
Link into the project. Anyone who has it gets the link’s role, so treat it as a secret.
What the link grants: guest can view (and comment when allowed), editor can edit
Whether visitors arriving through the link may leave comments
Whether visitors must enter a passphrase before the link resolves. The passphrase itself is never returned.
Project owner
object
Display name
Email address
People with a seat on the project besides the owner
object
Display name
Email address
Role on the project
Project canvas URL
Example
{ "project_id": "prj_abc123", "workspace_id": "ws_abc123", "sharing_mode": "restricted", "link": { "role": "guest" }, "owner": { "name": "Ada Lovelace", }, "members": [ { "name": "Ada Lovelace", "role": "editor" } ]}