Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

docs: swagger docs update

Raju Udava78c754556ddb
diff --git a/packages/nocodb/src/schema/swagger-v3.json b/packages/nocodb/src/schema/swagger-v3.json
index 8ccfc68a65..2f0c3e5705 100644
--- a/packages/nocodb/src/schema/swagger-v3.json
+++ b/packages/nocodb/src/schema/swagger-v3.json
@@ -12,6 +12,7 @@
{
"name": "Meta APIs",
"tags": [
+ "Workspaces",
"Bases",
"Tables",
"Views",
@@ -35,6 +36,270 @@
}
],
"paths": {
+ "/api/v3/meta/workspaces": {
+ "get": {
+ "summary": "List workspaces",
+ "operationId": "workspace-list",
+ "description": "Retrieve a list of all workspaces accessible to the user.\n\n**Note**: Workspace APIs are available only with self-hosted **Enterprise** plans and cloud-hosted **Enterprise** plans.",
+ "tags": [
+ "Workspaces"
+ ],
+ "responses": {
+ "200": {
+ "description": "Workspaces retrieved successfully.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/WorkspaceV3ListResponse"
+ },
+ "examples": {
+ "Workspaces List": {
+ "value": {
+ "list": [
+ {
+ "id": "w6dw3fo0",
+ "title": "My Workspace",
+ "org_id": "org123",
+ "created_at": "2025-01-16T06:04:18.000Z",
+ "updated_at": "2025-01-16T06:04:18.000Z"
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Bad request."
+ },
+ "500": {
+ "description": "The server encountered an unexpected error while processing the request."
+ }
+ }
+ },
+ "post": {
+ "summary": "Create workspace",
+ "operationId": "workspace-create",
+ "description": "Create a new workspace with the specified title and optional organization ID.\n\n**Note**: Workspace APIs are available only with self-hosted **Enterprise** plans and cloud-hosted **Enterprise** plans.",
+ "tags": [
+ "Workspaces"
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/WorkspaceV3Create"
+ },
+ "examples": {
+ "Create Workspace": {
+ "value": {
+ "title": "New Workspace",
+ "org_id": "org123"
+ }
+ },
+ "Create Workspace (On-prem)": {
+ "value": {
+ "title": "New Workspace"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Workspace created successfully.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/WorkspaceV3"
+ },
+ "examples": {
+ "Created Workspace": {
+ "value": {
+ "id": "w7xyz123",
+ "title": "New Workspace",
+ "org_id": "org123",
+ "created_at": "2025-01-16T06:04:18.000Z",
+ "updated_at": "2025-01-16T06:04:18.000Z"
+ }
+ }
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Bad request."
+ },
+ "500": {
+ "description": "The server encountered an unexpected error while processing the request."
+ }
+ }
+ }
+ },
+ "/api/v3/meta/workspaces/{workspaceId}": {
+ "get": {
+ "summary": "Get workspace",
+ "operationId": "workspace-read",
+ "description": "Retrieve details of a specific workspace.\n\n**Note**: Workspace APIs are available only with self-hosted **Enterprise** plans and cloud-hosted **Enterprise** plans.",
+ "tags": [
+ "Workspaces"
+ ],
+ "parameters": [
+ {
+ "name": "workspaceId",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "description": "Unique identifier for the workspace."
+ },
+ {
+ "name": "include",
+ "in": "query",
+ "required": false,
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "description": "Include additional data. Use 'members' to include workspace member information.",
+ "example": "members"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Workspace retrieved successfully.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/WorkspaceV3"
+ },
+ "examples": {
+ "Workspace": {
+ "value": {
+ "id": "w6dw3fo0",
+ "title": "My Workspace",
+ "org_id": "org123",
+ "created_at": "2025-01-16T06:04:18.000Z",
+ "updated_at": "2025-01-16T06:04:18.000Z"
+ }
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Workspace not found."
+ },
+ "500": {
+ "description": "The server encountered an unexpected error while processing the request."
+ }
+ }
+ },
+ "patch": {
+ "summary": "Update workspace",
+ "operationId": "workspace-update",
+ "description": "Update workspace details.\n\n**Note**: Workspace APIs are available only with self-hosted **Enterprise** plans and cloud-hosted **Enterprise** plans.",
+ "tags": [
+ "Workspaces"
+ ],
+ "parameters": [
+ {
+ "name": "workspaceId",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "description": "Unique identifier for the workspace."
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/WorkspaceV3Update"
+ },
+ "examples": {
+ "Update Workspace": {
+ "value": {
+ "title": "Updated Workspace Title"
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Workspace updated successfully.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/WorkspaceV3"
+ },
+ "examples": {
+ "Updated Workspace": {
+ "value": {
+ "id": "w6dw3fo0",
+ "title": "Updated Workspace Title",
+ "org_id": "org123",
+ "created_at": "2025-01-16T06:04:18.000Z",
+ "updated_at": "2025-01-17T06:04:18.000Z"
+ }
+ }
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Bad request."
+ },
+ "404": {
+ "description": "Workspace not found."
+ },
+ "500": {
+ "description": "The server encountered an unexpected error while processing the request."
+ }
+ }
+ },
+ "delete": {
+ "summary": "Delete workspace",
+ "operationId": "workspace-delete",
+ "description": "Delete a workspace.\n\n**Note**: Workspace APIs are available only with self-hosted **Enterprise** plans and cloud-hosted **Enterprise** plans.",
+ "tags": [
+ "Workspaces"
+ ],
+ "parameters": [
+ {
+ "name": "workspaceId",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "description": "Unique identifier for the workspace."
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Workspace deleted successfully."
+ },
+ "404": {
+ "description": "Workspace not found."
+ },
+ "500": {
+ "description": "The server encountered an unexpected error while processing the request."
+ }
+ }
+ }
+ },
"/api/v3/meta/workspaces/{workspaceId}/bases": {
"get": {
"summary": "List bases",
@@ -193,7 +458,7 @@
"get": {
"summary": "List workspace members",
"operationId": "workspace-members-read",
- "description": "Retrieve details of a specific workspace, including its members.\n\nNotes:\n- To include member details, use the query parameter `include[]=members`.\n- Workspace collaboration APIs are available only with self-hosted Enterprise plans and cloud-hosted Business+ plans.",
+ "description": "Retrieve details of a specific workspace, including its members.\n\nNotes:\n- To include member details, use the query parameter `include[]=members`.\n- Workspace collaboration APIs are available only with self-hosted Enterprise plans and cloud-hosted Enterprise plans.",
"tags": [
"Workspace Members"
],
@@ -278,7 +543,7 @@
"/api/v3/meta/workspaces/{workspaceId}/members": {
"post": {
"summary": "Add workspace members",
- "description": "Add new members to a workspace. The request requires the workspace identifier in the path and member details in the request body.\n\nNotes: Workspace collaboration APIs are available only with self-hosted Enterprise plans and cloud-hosted Business+ plans.",
+ "description": "Add new members to a workspace. The request requires the workspace identifier in the path and member details in the request body.\n\nNotes: Workspace collaboration APIs are available only with self-hosted Enterprise plans and cloud-hosted Enterprise plans.",
"operationId": "workspace-members-invite",
"tags": [
"Workspace Members"
@@ -350,7 +615,7 @@
},
"patch": {
"summary": "Update workspace members",
- "description": "Update roles of existing workspace members. The request requires the workspace identifier in the path and member update details in the request body.\n\nNotes: Workspace collaboration APIs are available only with self-hosted Enterprise plans and cloud-hosted Business+ plans.",
+ "description": "Update roles of existing workspace members. The request requires the workspace identifier in the path and member update details in the request body.\n\nNotes: Workspace collaboration APIs are available only with self-hosted Enterprise plans and cloud-hosted Enterprise plans.",
"operationId": "workspace-members-update",
"tags": [
"Workspace Members"
@@ -422,7 +687,7 @@
},
"delete": {
"summary": "Delete workspace members",
- "description": "Remove members from a workspace. The request requires the workspace identifier in the path and member details in the request body.\n\nNotes: Workspace collaboration APIs are available only with self-hosted Enterprise plans and cloud-hosted Business+ plans.",
+ "description": "Remove members from a workspace. The request requires the workspace identifier in the path and member details in the request body.\n\nNotes: Workspace collaboration APIs are available only with self-hosted Enterprise plans and cloud-hosted Enterprise plans.",
"operationId": "workspace-members-delete",
"tags": [
"Workspace Members"
@@ -767,6 +1032,11 @@
"rich_text": true
}
},
+ {
+ "title": "UniqueEmail",
+ "type": "Email",
+ "unique": true
+ },
{
"title": "Email",
"type": "Email",
@@ -1945,6 +2215,15 @@
"precision": "4"
}
}
+ },
+ "Unique Constraint": {
+ "value": {
+ "title": "Unique Email",
+ "type": "Email",
+ "unique": true,
+ "description": "Email field with unique constraint - no duplicate values allowed"
+ },
+ "summary": "Example of creating a field with unique constraint"
}
}
}
@@ -2961,7 +3240,7 @@
"/api/v3/meta/bases/{baseId}?include[]=members": {
"get": {
"summary": "List base members",
- "description": "Retrieve all details of a specific base, including its members.\n\nNotes: Base collaboration APIs are available only with self-hosted Enterprise plans and cloud-hosted Business+ plans.",
+ "description": "Retrieve all details of a specific base, including its members.\n\nNotes: Base collaboration APIs are available only with self-hosted Enterprise plans and cloud-hosted Enterprise plans.",
"operationId": "base-members-list",
"tags": [
"Base Members"
@@ -3036,7 +3315,7 @@
"/api/v3/meta/bases/{base_id}/members": {
"post": {
"summary": "Invite base members",
- "description": "Invite new members to a specific base using their User ID or Email address.\n\nNotes: Base collaboration APIs are available only with self-hosted Enterprise plans and cloud-hosted Business+ plans.",
+ "description": "Invite new members to a specific base using their User ID or Email address.\n\nNotes: Base collaboration APIs are available only with self-hosted Enterprise plans and cloud-hosted Enterprise plans.",
"operationId": "base-members-invite",
"parameters": [
{
@@ -3090,7 +3369,7 @@
},
"patch": {
"summary": "Update base members",
- "description": "Update roles for existing members in a base.\n\nNotes: Base collaboration APIs are available only with self-hosted Enterprise plans and cloud-hosted Business+ plans.",
+ "description": "Update roles for existing members in a base.\n\nNotes: Base collaboration APIs are available only with self-hosted Enterprise plans and cloud-hosted Enterprise plans.",
"operationId": "base-members-update",
"parameters": [
{
@@ -3144,7 +3423,7 @@
},
"delete": {
"summary": "Delete base members",
- "description": "Remove members from a specific base using their IDs.\n\nNotes: Base collaboration APIs are available only with self-hosted Enterprise plans and cloud-hosted Business+ plans.",
+ "description": "Remove members from a specific base using their IDs.\n\nNotes: Base collaboration APIs are available only with self-hosted Enterprise plans and cloud-hosted Enterprise plans.",
"operationId": "base-members-delete",
"parameters": [
{
@@ -7504,6 +7783,10 @@
"number"
],
"description": "Default value for the field. Applicable for SingleLineText, LongText, PhoneNumber, URL, Email, Number, Decimal, Currency, Percent, Duration, Date, DateTime, Time, SingleSelect, MultiSelect, Rating, Checkbox, User and JSON fields."
+ },
+ "unique": {
+ "type": "boolean",
+ "description": "Enable unique constraint for the field. When enabled, the field will only accept unique values (no duplicates allowed). Note: Unique constraint is only supported for NC-DB (not external databases) and is mutually exclusive with default values. Supported field types: SingleLineText, PhoneNumber, URL, Email, Number, Decimal, Currency, Percent, Date, DateTime and Time"
}
},
"required": [
@@ -9247,6 +9530,86 @@
"updated_at"
]
},
+ "WorkspaceV3": {
+ "type": "object",
+ "description": "Workspace V3 information with meta data",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Unique identifier for the workspace"
+ },
+ "title": {
+ "type": "string",
+ "description": "Title of the workspace"
+ },
+ "org_id": {
+ "type": "string",
+ "description": "Organization identifier (required for cloud, absent for on-prem EE)"
+ },
+ "created_at": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Timestamp when the workspace was created"
+ },
+ "updated_at": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Timestamp when the workspace was last updated"
+ }
+ },
+ "required": [
+ "id",
+ "title",
+ "created_at",
+ "updated_at"
+ ]
+ },
+ "WorkspaceV3Create": {
+ "type": "object",
+ "description": "Workspace creation request",
+ "properties": {
+ "title": {
+ "type": "string",
+ "description": "Title of the workspace"
+ },
+ "org_id": {
+ "type": "string",
+ "description": "Organization identifier (required for cloud, absent for on-prem EE)"
+ }
+ },
+ "required": [
+ "title"
+ ]
+ },
+ "WorkspaceV3Update": {
+ "type": "object",
+ "description": "Workspace update request",
+ "properties": {
+ "title": {
+ "type": "string",
+ "description": "Title of the workspace"
+ }
+ },
+ "required": [
+ "title"
+ ]
+ },
+ "WorkspaceV3ListResponse": {
+ "type": "object",
+ "description": "Workspace list response",
+ "properties": {
+ "list": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/WorkspaceV3"
+ },
+ "description": "List of workspaces"
+ }
+ },
+ "required": [
+ "list"
+ ]
+ },
"WorkspaceWithMembers": {
"type": "object",
"description": "Workspace information including member details",
@@ -9824,6 +10187,246 @@
"workspace-level-no-access"
]
},
+ "WorkspaceTeamCreate": {
+ "type": "object",
+ "description": "Create workspace team request for v3 API",
+ "properties": {
+ "team_id": {
+ "type": "string",
+ "description": "Team ID to add to workspace",
+ "example": "team123"
+ },
+ "workspace_role": {
+ "type": "string",
+ "description": "Workspace role to assign to the team (creator or lower only)",
+ "enum": [
+ "workspace-level-creator",
+ "workspace-level-editor",
+ "workspace-level-viewer",
+ "workspace-level-commenter",
+ "workspace-level-no-access"
+ ],
+ "example": "workspace-level-editor"
+ }
+ },
+ "required": [
+ "team_id",
+ "workspace_role"
+ ]
+ },
+ "WorkspaceTeamCreateBulk": {
+ "type": "object",
+ "description": "Bulk create workspace team requests for v3 API",
+ "properties": {
+ "teams": {
+ "type": "array",
+ "description": "Array of teams to add to workspace",
+ "items": {
+ "$ref": "#/components/schemas/WorkspaceTeamCreate"
+ },
+ "minItems": 1,
+ "example": [
+ {
+ "team_id": "team123",
+ "workspace_role": "workspace-level-editor"
+ },
+ {
+ "team_id": "team456",
+ "workspace_role": "workspace-level-viewer"
+ }
+ ]
+ }
+ },
+ "required": [
+ "teams"
+ ]
+ },
+ "WorkspaceTeamUpdate": {
+ "type": "object",
+ "description": "Update workspace team request for v3 API",
+ "properties": {
+ "team_id": {
+ "type": "string",
+ "description": "Team ID to update in workspace",
+ "example": "team123"
+ },
+ "workspace_role": {
+ "type": "string",
+ "description": "New workspace role for the team (creator or lower only)",
+ "enum": [
+ "workspace-level-creator",
+ "workspace-level-editor",
+ "workspace-level-viewer",
+ "workspace-level-commenter",
+ "workspace-level-no-access"
+ ],
+ "example": "workspace-level-viewer"
+ }
+ },
+ "required": [
+ "team_id",
+ "workspace_role"
+ ]
+ },
+ "WorkspaceTeamDelete": {
+ "type": "object",
+ "description": "Delete workspace team request for v3 API",
+ "properties": {
+ "team_id": {
+ "type": "string",
+ "description": "Team ID to remove from workspace",
+ "example": "team123"
+ }
+ },
+ "required": [
+ "team_id"
+ ]
+ },
+ "WorkspaceTeamDeleteBulk": {
+ "type": "object",
+ "description": "Bulk delete workspace team requests for v3 API",
+ "properties": {
+ "teams": {
+ "type": "array",
+ "description": "Array of teams to remove from workspace",
+ "items": {
+ "$ref": "#/components/schemas/WorkspaceTeamDelete"
+ },
+ "minItems": 1,
+ "example": [
+ {
+ "team_id": "team123"
+ },
+ {
+ "team_id": "team456"
+ }
+ ]
+ }
+ },
+ "required": [
+ "teams"
+ ]
+ },
+ "BaseTeamCreate": {
+ "type": "object",
+ "description": "Create base team request for v3 API",
+ "properties": {
+ "team_id": {
+ "type": "string",
+ "description": "Team ID to add to base",
+ "example": "team123"
+ },
+ "base_role": {
+ "type": "string",
+ "description": "Base role to assign to the team (creator or lower only)",
+ "enum": [
+ "creator",
+ "editor",
+ "viewer",
+ "commenter",
+ "no-access"
+ ],
+ "example": "editor"
+ }
+ },
+ "required": [
+ "team_id",
+ "base_role"
+ ]
+ },
+ "BaseTeamCreateBulk": {
+ "type": "object",
+ "description": "Bulk create base team requests for v3 API",
+ "properties": {
+ "teams": {
+ "type": "array",
+ "description": "Array of teams to add to base",
+ "items": {
+ "$ref": "#/components/schemas/BaseTeamCreate"
+ },
+ "minItems": 1,
+ "example": [
+ {
+ "team_id": "team123",
+ "base_role": "editor"
+ },
+ {
+ "team_id": "team456",
+ "base_role": "viewer"
+ }
+ ]
+ }
+ },
+ "required": [
+ "teams"
+ ]
+ },
+ "BaseTeamUpdate": {
+ "type": "object",
+ "description": "Update base team request for v3 API",
+ "properties": {
+ "team_id": {
+ "type": "string",
+ "description": "Team ID to update in base",
+ "example": "team123"
+ },
+ "base_role": {
+ "type": "string",
+ "description": "New base role for the team (creator or lower only)",
+ "enum": [
+ "creator",
+ "editor",
+ "viewer",
+ "commenter",
+ "no-access"
+ ],
+ "example": "viewer"
+ }
+ },
+ "required": [
+ "team_id",
+ "base_role"
+ ]
+ },
+ "BaseTeamDelete": {
+ "type": "object",
+ "description": "Delete base team request for v3 API",
+ "properties": {
+ "team_id": {
+ "type": "string",
+ "description": "Team ID to remove from base",
+ "example": "team123"
+ }
+ },
+ "required": [
+ "team_id"
+ ]
+ },
+ "BaseTeamDeleteBulk": {
+ "type": "object",
+ "description": "Bulk delete base team requests for v3 API",
+ "properties": {
+ "teams": {
+ "type": "array",
+ "description": "Array of teams to remove from base",
+ "items": {
+ "$ref": "#/components/schemas/BaseTeamDelete"
+ },
+ "minItems": 1,
+ "example": [
+ {
+ "team_id": "team123"
+ },
+ {
+ "team_id": "team456"
+ }
+ ]
+ }
+ },
+ "required": [
+ "teams"
+ ]
+ },
"ScriptList": {
"type": "object",
"properties": {