Get Workspace
Retrieve workspace details including RBAC status and configuration.
Endpoint
GET /v1/workspaces/{workspaceId}Request
Before you run the following snippets, see the API Key Authentication section on the Authentication page. From there, follow Step 1: Generate Access Token to get an access token. Run that code first, in the same shell session or script as the following snippets. The snippets also rely on the environment variables SHARELY_API_URL, SHARELY_API_KEY, SHARELY_WORKSPACE_ID, and SHARELY_ORGANIZATION_ID, which are described in the Complete Authentication Example.
curl -X GET \
"$SHARELY_API_URL/v1/workspaces/$SHARELY_WORKSPACE_ID" \
-H "Authorization: Bearer $SHARELY_ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-H "organizationid: $SHARELY_ORGANIZATION_ID"Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string (UUID) | Yes | The unique identifier of the workspace |
Headers
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer token with access token |
organizationid | string (UUID) | Yes | Your organization ID |
Content-Type | string | Yes | Must be application/json |
Response
Success Response (200 OK)
{
"id": "264393d7-6379-453a-9535-e2452e972fdc",
"name": "My Workspace",
"organizationId": "org-uuid",
"rbacStatus": "ACTIVE",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-11-14T15:45:00Z",
"settings": {
"defaultLanguage": "en",
"features": ["rbac", "multilingual"]
}
}Response Fields
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Workspace unique identifier |
name | string | Workspace name |
organizationId | string (UUID) | Parent organization ID |
rbacStatus | string | RBAC mode: ACTIVE or INACTIVE |
createdAt | string (ISO 8601) | Workspace creation timestamp |
updatedAt | string (ISO 8601) | Last update timestamp |
settings | object | Workspace configuration settings |
Error Responses
401 Unauthorized
{
"error": "Unauthorized",
"message": "Invalid or missing access token"
}403 Forbidden
{
"error": "Forbidden",
"message": "Insufficient permissions for this workspace"
}404 Not Found
{
"error": "Not Found",
"message": "Workspace not found"
}Related Endpoints
- Update RBAC Status - Enable/disable RBAC
- Check Background Jobs - Monitor async operations