{ "opencollection": "1.0.0", "info": { "name": "Baserow API spec Admin Workspaces API", "version": "2.2.2" }, "items": [ { "info": { "name": "Workspaces", "type": "folder" }, "items": [ { "info": { "name": "list_workspaces", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/workspaces/", "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Lists all the workspaces of the authorized user. A workspace can contain multiple applications like a database. Multiple users can have access to a workspace. For example each company could have their own workspace containing databases related to that company. The order of the workspaces are custom for each user. The order is configurable via the **order_workspaces** endpoint." }, { "info": { "name": "create_workspace", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/workspaces/", "headers": [ { "name": "ClientSessionId", "value": "" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Creates a new workspace where only the authorized user has access to. No initial data like database applications are added, they have to be created via other endpoints." }, { "info": { "name": "update_workspace", "type": "http" }, "http": { "method": "PATCH", "url": "{{baseUrl}}/api/workspaces/:workspace_id/", "headers": [ { "name": "ClientSessionId", "value": "" }, { "name": "ClientUndoRedoActionGroupId", "value": "" } ], "params": [ { "name": "workspace_id", "value": "", "type": "path", "description": "Updates the workspace related to the provided value." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Updates the existing workspace related to the provided `workspace_id` parameter if the authorized user belongs to the workspace. It is not yet possible to add additional users to a workspace." }, { "info": { "name": "delete_workspace", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/api/workspaces/:workspace_id/", "headers": [ { "name": "ClientSessionId", "value": "" }, { "name": "ClientUndoRedoActionGroupId", "value": "" } ], "params": [ { "name": "workspace_id", "value": "", "type": "path", "description": "Deletes the workspace related to the provided value." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Deletes an existing workspace if the authorized user belongs to the workspace. All the applications, databases, tables etc that were in the workspace are going to be deleted also." }, { "info": { "name": "list_workspace_exports", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/workspaces/:workspace_id/export/", "headers": [ { "name": "ClientSessionId", "value": "" } ], "params": [ { "name": "workspace_id", "value": "", "type": "path", "description": "The id of the workspace that is being exported." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Lists exports that were created for given workspace." }, { "info": { "name": "export_workspace_applications_async", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/workspaces/:workspace_id/export/async/", "headers": [ { "name": "ClientSessionId", "value": "" } ], "params": [ { "name": "workspace_id", "value": "", "type": "path", "description": "The id of the workspace that must be exported." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Export workspace or set of applications application if the authorized user is in the application's workspace. All the related children are also going to be exported. For example in case of a database application all the underlying tables, fields, views and rows are going to be exported.Roles are not part of the export." }, { "info": { "name": "import_export_resource", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/api/workspaces/:workspace_id/import/:resource_id/", "params": [ { "name": "resource_id", "value": "", "type": "path" }, { "name": "workspace_id", "value": "", "type": "path" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Delete a resource. This endpoint mark as ready for deletion the specified resource. This operation is not undoable. The user must be the owner of the resource to perform this action." }, { "info": { "name": "import_workspace_applications_async", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/workspaces/:workspace_id/import/async/", "headers": [ { "name": "ClientSessionId", "value": "" } ], "params": [ { "name": "workspace_id", "value": "", "type": "path", "description": "The id of the workspace where the application will be imported." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Import a set of applications included in a given resource if the authorized user is in the specified workspace. This endpoint requires a valid resource_id of the uploaded file." }, { "info": { "name": "import_resource_upload_file", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/workspaces/:workspace_id/import/upload-file/", "headers": [ { "name": "ClientSessionId", "value": "" } ], "params": [ { "name": "workspace_id", "value": "", "type": "path", "description": "The id of the workspace for which file is uploaded." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Uploads an exported workspace or a set of applications if the authorized user is in the workspace. The uploaded file must be a valid ZIP file containing the applications' data for future import." }, { "info": { "name": "leave_workspace", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/workspaces/:workspace_id/leave/", "params": [ { "name": "workspace_id", "value": "", "type": "path", "description": "Leaves the workspace related to the value." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Makes the authenticated user leave the workspace related to the provided `workspace_id` if the user is in that workspace. If the user is the last admin in the workspace, they will not be able to leave it. There must always be one admin in the workspace, otherwise it will be left without control. If that is the case, they must either delete the workspace or give another member admin permissions first." }, { "info": { "name": "workspace_permissions", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/workspaces/:workspace_id/permissions/", "params": [ { "name": "workspace_id", "value": "", "type": "path", "description": "The workspace id we want the permission object for." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Returns a the permission data necessary to determine the permissions of a specific user over a specific workspace. \nSee `core.handler.CoreHandler.get_permissions()` for more details." }, { "info": { "name": "get_workspace_generative_ai_models_settings", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/workspaces/:workspace_id/settings/generative-ai/", "params": [ { "name": "workspace_id", "value": "", "type": "path" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Returns the generative AI models settings for the given workspace." }, { "info": { "name": "update_workspace_generative_ai_models_settings", "type": "http" }, "http": { "method": "PATCH", "url": "{{baseUrl}}/api/workspaces/:workspace_id/settings/generative-ai/", "headers": [ { "name": "ClientSessionId", "value": "" } ], "params": [ { "name": "workspace_id", "value": "", "type": "path", "description": "Updates the workspace settings for the generative AI models available." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Updates the generative AI models settings for the given workspace." }, { "info": { "name": "create_initial_workspace", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/workspaces/create-initial-workspace/", "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Creates an initial workspace. This is typically called after the user signs up and skips the onboarding in the frontend. It contains some example data." }, { "info": { "name": "order_workspaces", "type": "http" }, "http": { "method": "POST", "url": "{{baseUrl}}/api/workspaces/order/", "headers": [ { "name": "ClientSessionId", "value": "" }, { "name": "ClientUndoRedoActionGroupId", "value": "" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Changes the order of the provided workspace ids to the matching position that the id has in the list. If the authorized user does not belong to the workspace it will be ignored. The order will be custom for each user." }, { "info": { "name": "update_workspace_user", "type": "http" }, "http": { "method": "PATCH", "url": "{{baseUrl}}/api/workspaces/users/:workspace_user_id/", "params": [ { "name": "workspace_user_id", "value": "", "type": "path", "description": "Updates the workspace user related to the provided value." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Updates the existing workspace user related to the provided `workspace_user_id` param if the authorized user has admin rights to the related workspace." }, { "info": { "name": "delete_workspace_user", "type": "http" }, "http": { "method": "DELETE", "url": "{{baseUrl}}/api/workspaces/users/:workspace_user_id/", "params": [ { "name": "workspace_user_id", "value": "", "type": "path", "description": "Deletes the workspace user related to the provided value." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Deletes a workspace user if the authorized user has admin rights to the related workspace." }, { "info": { "name": "list_workspace_users", "type": "http" }, "http": { "method": "GET", "url": "{{baseUrl}}/api/workspaces/users/workspace/:workspace_id/", "params": [ { "name": "search", "value": "", "type": "query", "description": "Search for workspace users by username, or email." }, { "name": "sorts", "value": "", "type": "query", "description": "Sort workspace users by name, email or role." }, { "name": "workspace_id", "value": "", "type": "path", "description": "Lists workspace users related to the provided workspace value." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Lists all the users that are in a workspace if the authorized user has admin permissions to the related workspace. To add a user to a workspace an invitation must be sent first." } ] } ], "bundled": true }