Hi,
Is there a way to list all the public workspaces for an organisation via the REST API?
Or, alternately, to list all the workspaces the current user has access to either by ownership, invitiation, or because they are public. I can list all the workspaces the user owns or is invited to but I can only get the public workspaces if I know the ID ahead of time.
Basically I’m looking for a way to get a list of all workspaces a user has access to. This means everything from /users/me/workspaces, but also other public workspaces that the user is not explicitly added to.
For example if there are three workspaces (A, B, and C), and two users (1, and 2).
User 1 owns workspace A
User 2 owns workspace B and user 1 has been invited to join
User 2 owns workspace C, no one has been invited to join the workspace but it is a public workspace
In the UI user 1 has access to all three of these workspaces, and, if they know the ID, they can access all three workspaces through the API – /workspaces/{workspaceID} will return any of these workspaces. However I can’t find any way to list workspaces like workspace C. /users/me/workspaces only includes workspace A and B.
I hope that makes sense.
Alternately, and honestly probably preferably, is there some set of permissions that we could give a user that would allow them to list other users workspaces? I can see API calls for this /users/{userID}/workspaces, but, even with admin access, these return permission errors.
You can also combine multiple filters to make more advanced queries. For example, if the user has access to multiple organizations we can use the organizationId filter for a particular organization in addition to the associatedWorkspaces filter:
https://api.apps.us.bluescape.com/v3/users/me/workspaces?includeCount=true&filterBy=organizationId eq "<ORGANIZATION-ID>" and associatedWorkspaces eq false&orderBy=createdAt desc
Make sure to update the query with the organization id you are interested in.