Workspace API

The Workspace API allows you to manage workspace settings, RBAC status, and monitor background jobs.

Base Endpoint

All workspace endpoints use the base path:

/v1/workspaces/{workspaceId}

Authentication

All workspace API endpoints require API key authentication. See the Authentication guide for details on generating access tokens.

Available Endpoints

Workspace Management

Common Use Cases

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.

Enable RBAC for Your Workspace

curl -X PUT \
  "$SHARELY_API_URL/v1/workspaces/$SHARELY_WORKSPACE_ID/rbac-status" \
  -H "Authorization: Bearer $SHARELY_ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -H "organizationid: $SHARELY_ORGANIZATION_ID" \
  -d '{
    "rbacStatus": "ACTIVE"
  }'

Check Background Job Status

curl -X POST \
  "$SHARELY_API_URL/v1/workspaces/$SHARELY_WORKSPACE_ID/background-jobs" \
  -H "Authorization: Bearer $SHARELY_ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  -H "organizationid: $SHARELY_ORGANIZATION_ID" \
  -d '{
    "jobIds": ["job-uuid-1", "job-uuid-2"]
  }'

Next Steps