Workspaces
A Workspace is a lightweight way to organize related resources inside a single Files.com Site.
Customers commonly group resources by project, department, client, or region. Workspaces provide a built-in structure for that grouping, so the UI can operate within a clear “workspace context” and admins can delegate management for a subset of resources without requiring full site-level isolation.
Every Site has an implicit Default workspace (ID 0). Resources that are not explicitly assigned to a named workspace are considered part of the Default workspace.
Use the Workspaces guide for request scoping and delegated administration.
List Workspaces
SDK Method
workspace.List()
Return Values
Returns a *workspace.Iter and an error. Range over All() to receive files_sdk.Workspace values and errors.
Check each loop error before using its resource. Next() and Err() remain supported.
Authorization Requirement
Available to all authenticated keys or sessions.
Additional Arguments
Show Workspace
SDK Method
workspace.Find()
Return Values
Returns a files_sdk.Workspace value and an error.
Authorization Requirement
Requires a Site-Wide API key, or a User API key or session from a Site Administrator.
WorkspaceFindParams Fields
| Field | Description |
|---|---|
| Id int64 Required | Workspace ID. |
Create Workspace
SDK Method
workspace.Create()
Return Values
Returns a files_sdk.Workspace value and an error.
Authorization Requirement
Requires a Site-Wide API key, or a User API key or session from a Site Administrator.
WorkspaceCreateParams Fields
| Field | Description |
|---|---|
| Name string | Workspace name |
Update Workspace
SDK Method
workspace.Update()
Return Values
Returns a files_sdk.Workspace value and an error.
Authorization Requirement
Requires a Site-Wide API key, or a User API key or session from a Site Administrator.
WorkspaceUpdateParams Fields
| Field | Description |
|---|---|
| Id int64 Required | Workspace ID. |
| Name string | Workspace name |
Delete Workspace
SDK Method
workspace.Delete()
Return Values
Returns an error, or nil on success.
Authorization Requirement
Requires a Site-Wide API key, or a User API key or session from a Site Administrator.
WorkspaceDeleteParams Fields
| Field | Description |
|---|---|
| Id int64 Required | Workspace ID. |
The Workspace Object
Some of the methods above return a Workspace object. The attributes of this object are listed below.
| Attribute | Description |
|---|---|
| Id int64 | Workspace ID |
| Name string | Workspace name |