Skip to content

Workspaces

Workspaces allow you to subdivide the virtual volumes in a storage group to accommodate projects and users.

The workspace API allows user to perform CRUD operation. A session token and existing storage group is required for most of the endpoints.

Retrieve all workspaces

GET /workspaces Get all the workspaces in the system.

Request Example:

bash
curl --location '{{url}}/workspaces' \
--header 'token;'

Retrieve a workspace by Id

GET /workspaces/workspaceId Get a workspaces by Id.

Request Example:

bash
curl --location '{{url}}/workspaces/{{id}}' \
--header 'token;'

Create a workspace

POST /workspaces Create a workspaces.

Required parameters for creating a workspace are name, storageGroup, capacity, engineProtectionMode, and mediapackProtectionMode.

  • The engineProtectionMode parameter can have values of Mirrored or Unprotected.
  • The mediapackProtectionMode parameter can have values of OneDisk or TwoDisk.

Request Example:

bash
curl --location '{{url}}/workspaces' \
--header 'token;' \
--header 'Content-Type: application/json' \
--data '{
  "name": "workspace1",
  "storageGroup": "sg1",
  "capacity": 400,
  "engineProtectionMode": "Unprotected",
  "mediapackProtectionMode": "OneDisk",
  "warningEventTriggerType": "used%",
  "warningEventTriggerValue": 80,
  "errorEventTriggerType": "unusedGB",
  "errorEventTriggerValue": 140,
  "userAccess": [
    {
        "name": "Guest",
        "access": "read",
        "type": "user"
    }
  ]
}'

Update a workspace by Id

PUT /workspaces/workspaceId Update a workspaces.

Request Example:

bash
curl --location --request PUT '{{url}}/workspaces/{{id}}' \
--header 'token;' \
--header 'Content-Type: application/json' \
--data '{
    "name": "workspace1"
}'

Delete a workspace

DELETE /workspaces/workspaceId Delete a workspaces.

Request Example:

bash
curl --location --request DELETE '{{url}}/workspaces/{{id}}' \
--header 'token;'