get__workspace
GET /workspace
Get All Workspaces
Retrieve all workspaces that the authenticated user can access. This includes workspaces where the user has READ, WRITE, or ADMIN access.
TypeScript Client Library
public getWorkspaces = async (): Promise<WorkspaceTypes.GetWorkspacesResponse> => {
return this.makeRequest<WorkspaceTypes.GetWorkspacesResponse>('workspace', 'GET', null);
};
Code Samples
# You can also use wget
curl -X GET https://backend.flashback.tech/workspace \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
Parameters
This endpoint does not require any parameters.
Example responses
200 Response
{
"success": true,
"workspaces": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Development Workspace",
"orgId": "987fcdeb-51a2-43d1-9f12-345678901234",
"users": [
{
"userId": "user-123",
"role": "ADMIN",
"user": {
"id": "user-123",
"name": "John",
"lastName": "Doe",
"email": "[email protected]",
"orgRole": 1
}
},
{
"userId": "user-456",
"role": "WRITE",
"user": {
"id": "user-456",
"name": "Jane",
"lastName": "Smith",
"email": "[email protected]",
"orgRole": 2
}
}
]
},
{
"id": "456e7890-e89b-12d3-a456-426614174001",
"name": "Production Workspace",
"orgId": "987fcdeb-51a2-43d1-9f12-345678901234",
"users": [
{
"userId": "user-123",
"role": "READ",
"user": {
"id": "user-123",
"name": "John",
"lastName": "Doe",
"email": "[email protected]",
"orgRole": 1
}
}
]
}
]
}
404 Response
{
"success": false,
"message": "User not found"
}
500 Response
{
"success": false,
"message": "Failed to fetch workspaces"
}
Responses
Response Schema
Status Code 200
» success
boolean
true
none
Operation success status
» workspaces
array
true
none
Array of accessible workspaces
»» id
string
true
none
Unique workspace identifier
»» name
string
true
none
Workspace name
»» orgId
string
true
none
Organization identifier
»» users
array
true
none
Array of users with access to the workspace
»»» userId
string
true
none
User identifier
»»» role
string
true
none
User's role in the workspace (READ, WRITE, ADMIN)
»»» user
object
true
none
User details
»»»» id
string
true
none
User identifier
»»»» name
string
true
none
User's first name
»»»» lastName
string
true
none
User's last name
string
true
none
User's email address
»»»» orgRole
integer
false
none
User's organization role
Status Code 404
» success
boolean
true
none
Operation success status
» message
string
true
none
Error message
Status Code 500
» success
boolean
true
none
Operation success status
» message
string
true
none
Error message
Notes
Authentication Required: User must be authenticated with a valid Bearer token
Access Control: Only returns workspaces where the user has access (READ, WRITE, or ADMIN role)
User Details: Includes detailed information about all users with access to each workspace
Role Information: Shows the specific role each user has within each workspace
Organization Scoped: Workspaces are scoped to the user's organization
Last updated
Was this helpful?