Workspaces
🏢 Workspaces
Workspaces are the primary units of organization in DataGOL. They allow you to group related workbooks and manage team access. Inside Workspaces, you can create, edit, and share workbooks.
👥 Roles and permissions
Each user in a workspace is assigned a specific role that determines their level of access.
| Role | Permissions | Use Case |
|---|---|---|
| ADMIN | Full control over workspace, users, and all workbooks. | System administrators and IT managers. |
| CREATOR | Can create/delete workbooks and tables. Can edit any data. | Department leads and data architects. |
| EDITOR | Can add/edit/delete rows in existing tables. Cannot delete tables. | Operations team and data entry staff. |
| VIEWER | Strictly read-only access to all data and schemas. | External auditors and executive reviewers. |
Create Workspace
This endpoint creates a new workspace in the DataGOL Platform. Workspaces help organize users, resources, and configurations within the platform.
Request Info
- Auth Required: Yes (
x-auth-token)
Request Body (JSON)
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
name | string | Yes | The display name of the workspace. | "My Team Workspace" |
description | string | No | A brief description of the workspace. | "Project management area" |
Try it out
POST
https://be.datagol.ai/noCo/api/v2/workspacesRequest Body (JSON)
Add Users to Workspace (Bulk)
This endpoint allows you to add multiple users to a specific workspace in a single request. Each user is assigned a role within the workspace.
Request Info
- Auth Required: Yes (
x-auth-token)
Request Body (JSON)
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
workSpaceUsers | array | Yes | List of users to be added to the workspace | [...] |
workSpaceUsers.email | string | Yes | Email ID of the user (e.g., service account email) | "datagol-sa@example.com" |
workSpaceUsers.role | string | Yes | Role assigned to the user | "EDITOR" |
message | string | No | Optional message sent along with the invite | "Join our project" |
Example Request
{
"workSpaceUsers": [
{
"email": "datagol-bd4ffdd8@inncretech.iam.serviceaccount.com",
"role": "CREATOR"
}
],
"message": ""
}
💻 Workspace Management Examples
- cURL
- Python
- JavaScript
# Create Workspace
curl -X POST https://{base_url}/noCo/api/v2/workspaces \
-H "x-auth-token: YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Project Alpha",
"description": "Main workspace for Alpha project"
}'
# Add User to Workspace
curl -X POST https://{base_url}/noCo/api/v2/workspaces/{workspaceId}/bulkUsers \
-H "x-auth-token: YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"workSpaceUsers": [
{
"email": "user@example.com",
"role": "EDITOR"
}
],
"message": "Welcome to the workspace!"
}'
import requests
base_url = "your-api-base-url"
headers = {
"x-auth-token": "YOUR_TOKEN",
"Content-Type": "application/json"
}
# Create a new workspace
def create_workspace(name, description=""):
url = f"https://{base_url}/noCo/api/v2/workspaces"
payload = {"name": name, "description": description}
response = requests.post(url, headers=headers, json=payload)
return response.json()
# Add users to workspace
def add_users(workspace_id, users, message=""):
url = f"https://{base_url}/noCo/api/v2/workspaces/{workspace_id}/bulkUsers"
payload = {"workSpaceUsers": users, "message": message}
response = requests.post(url, headers=headers, json=payload)
return response.json()
# Usage
new_ws = create_workspace("Demo Workspace")
ws_id = new_ws.get("id")
if ws_id:
add_users(ws_id, [{"email": "service-account@datagol.com", "role": "CREATOR"}])
const baseUrl = "your-api-base-url";
const token = "YOUR_TOKEN";
// Create Workspace
async function createWorkspace(name, description = "") {
const response = await fetch(`https://${baseUrl}/noCo/api/v2/workspaces`, {
method: "POST",
headers: {
"x-auth-token": token,
"Content-Type": "application/json",
},
body: JSON.stringify({ name, description }),
});
return response.json();
}
// Add Users
async function addUsers(workspaceId, users, message = "") {
const response = await fetch(
`https://${baseUrl}/noCo/api/v2/workspaces/${workspaceId}/bulkUsers`,
{
method: "POST",
headers: {
"x-auth-token": token,
"Content-Type": "application/json",
},
body: JSON.stringify({ workSpaceUsers: users, message }),
},
);
return response.json();
}
Was this helpful?