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

ParameterTypeRequiredDescription
workspaceIdstring (UUID)YesThe unique identifier of the workspace

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token with access token
organizationidstring (UUID)YesYour organization ID
Content-TypestringYesMust 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

FieldTypeDescription
idstring (UUID)Workspace unique identifier
namestringWorkspace name
organizationIdstring (UUID)Parent organization ID
rbacStatusstringRBAC mode: ACTIVE or INACTIVE
createdAtstring (ISO 8601)Workspace creation timestamp
updatedAtstring (ISO 8601)Last update timestamp
settingsobjectWorkspace 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