Workspaces router
An overview of the workspaces router
Procedures#
The workspaces router has the following procedures:
Create a workspace#
Create a new workspace.
- Access:
@protected
// Client componentsconst { data } = api.workspaces.create.useMutation()// Server componentsconst data = await api.workspaces.create()
Check if slug is available#
Check if a workspace slug is available.
- Access:
@protected
// Client componentsconst { data } = api.workspaces.slugAvailable.useQuery({ slug: 'my-workspace' })// Server componentsconst data = await api.workspaces.slugAvailable({ slug: 'my-workspace' })
Get workspace by slug#
Get a workspace by its slug and returns the workspace details, subscription, members and tags.
- Access:
@member
// Client componentsconst { data } = api.workspaces.get.useQuery({ slug: 'my-workspace' })// Server componentsconst data = await api.workspaces.get({ slug: 'my-workspace' })
Update workspace#
Update a workspace.
- Access:
@admin
// Client componentsconst { data } = api.workspaces.update.useMutation()// Server componentsconst data = await api.workspaces.update()
Was this helpful?