Skip to content

Get project sharing

GET
/projects/{projectId}/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);

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.

projectId
required

Project identifier

string
/^prj_\S+$/

Project identifier

Sharing state returned.

Media type application/json
object
project_id
required

Project identifier

string
/^prj_\S+$/
workspace_id
required

Workspace identifier

string
/^ws_\S+$/
sharing_mode
required

Link sharing mode: restricted (no links; members only), view (anyone with the link can view), edit (anyone with the link can edit)

string
Allowed values: restricted view edit
is_private
required

True when only the owner and the people it was shared with can see the project, rather than the whole workspace

boolean
can_manage_sharing
required

Whether the authenticated user may change this project’s sharing

boolean
link
required
Any of:
object
url
required

Link into the project. Anyone who has it gets the link’s role, so treat it as a secret.

string format: uri
role
required

What the link grants: guest can view (and comment when allowed), editor can edit

string
Allowed values: guest editor
allow_comments
required

Whether visitors arriving through the link may leave comments

boolean
passphrase_protected
required

Whether visitors must enter a passphrase before the link resolves. The passphrase itself is never returned.

boolean
owner
required

Project owner

object
name
required

Display name

string
email
required

Email address

string
members
required

People with a seat on the project besides the owner

Array<object>
object
name
required

Display name

string
email
required

Email address

string
role
required

Role on the project

string
canvas_url
required

Project canvas URL

string format: uri
Example
{
"project_id": "prj_abc123",
"workspace_id": "ws_abc123",
"sharing_mode": "restricted",
"link": {
"role": "guest"
},
"owner": {
"name": "Ada Lovelace",
"email": "[email protected]"
},
"members": [
{
"name": "Ada Lovelace",
"email": "[email protected]",
"role": "editor"
}
]
}