get__workspace_{workspaceId}
GET /workspace/{id}
Get Workspace by ID
Retrieve a specific workspace by its ID. The user must have access to the workspace (READ, WRITE, or ADMIN role) to retrieve its details.
TypeScript Client Library
public getWorkspace = async (id: string): Promise<WorkspaceTypes.GetWorkspaceResponse> => {
return this.makeRequest<WorkspaceTypes.GetWorkspaceResponse>(`workspace/${id}`, 'GET', null);
};
Code Samples
# You can also use wget
curl -X GET https://backend.flashback.tech/workspace/123e4567-e89b-12d3-a456-426614174000 \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
Parameters
id
path
string
true
The unique identifier of the workspace
Path Parameters
id
string
true
none
The unique identifier of the workspace
Example responses
200 Response
{
"success": true,
"workspace": {
"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
}
}
]
}
}
404 Response
{
"success": false,
"message": "User not found"
}
404 Response
{
"success": false,
"message": "Workspace not found or access denied"
}
500 Response
{
"success": false,
"message": "Failed to fetch workspace"
}
Responses
Response Schema
Status Code 200
» success
boolean
true
none
Operation success status
» workspace
object
true
none
Workspace details
»» 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: User must have access to the workspace (READ, WRITE, or ADMIN role)
User Details: Includes detailed information about all users with access to the workspace
Role Information: Shows the specific role each user has within the workspace
Organization Scoped: Workspaces are scoped to the user's organization
Error Handling: Returns 404 if the workspace doesn't exist or if the user doesn't have access
Last updated
Was this helpful?