Overview
Workspaces endpointsAvailable Operations
- List - List workspaces
- Create - Create a workspace
- Delete - Delete a workspace
- Get - Get a workspace
- Update - Update a workspace
- BulkAddMembers - Bulk add members to a workspace
- BulkRemoveMembers - Bulk remove members from a workspace
List
List all workspaces for the authenticated user. Management key required.Example Usage
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx | context.Context | :heavy_check_mark: | The context to use for the request. | |
offset | optionalnullable.OptionalNullable[int64] | :heavy_minus_sign: | Number of records to skip for pagination | 0 |
limit | *int64 | :heavy_minus_sign: | Maximum number of records to return (max 100) | 50 |
opts | []operations.Option | :heavy_minus_sign: | The options for this request. |
Response
*operations.ListWorkspacesResponse, errorErrors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.UnauthorizedResponseError | 401 | application/json |
| sdkerrors.InternalServerResponseError | 500 | application/json |
| sdkerrors.APIError | 4XX, 5XX | */* |
Create
Create a new workspace for the authenticated user. Management key required.Example Usage
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ctx | context.Context | :heavy_check_mark: | The context to use for the request. |
request | components.CreateWorkspaceRequest | :heavy_check_mark: | The request object to use for the request. |
opts | []operations.Option | :heavy_minus_sign: | The options for this request. |
Response
*components.CreateWorkspaceResponse, errorErrors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.BadRequestResponseError | 400 | application/json |
| sdkerrors.UnauthorizedResponseError | 401 | application/json |
| sdkerrors.ForbiddenResponseError | 403 | application/json |
| sdkerrors.InternalServerResponseError | 500 | application/json |
| sdkerrors.APIError | 4XX, 5XX | */* |
Delete
Delete an existing workspace. The default workspace cannot be deleted. Workspaces with active API keys cannot be deleted. Management key required.Example Usage
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx | context.Context | :heavy_check_mark: | The context to use for the request. | |
id | string | :heavy_check_mark: | The workspace ID (UUID) or slug | production |
opts | []operations.Option | :heavy_minus_sign: | The options for this request. |
Response
*components.DeleteWorkspaceResponse, errorErrors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.BadRequestResponseError | 400 | application/json |
| sdkerrors.UnauthorizedResponseError | 401 | application/json |
| sdkerrors.ForbiddenResponseError | 403 | application/json |
| sdkerrors.NotFoundResponseError | 404 | application/json |
| sdkerrors.InternalServerResponseError | 500 | application/json |
| sdkerrors.APIError | 4XX, 5XX | */* |
Get
Get a single workspace by ID or slug. Management key required.Example Usage
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx | context.Context | :heavy_check_mark: | The context to use for the request. | |
id | string | :heavy_check_mark: | The workspace ID (UUID) or slug | production |
opts | []operations.Option | :heavy_minus_sign: | The options for this request. |
Response
*components.GetWorkspaceResponse, errorErrors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.UnauthorizedResponseError | 401 | application/json |
| sdkerrors.NotFoundResponseError | 404 | application/json |
| sdkerrors.InternalServerResponseError | 500 | application/json |
| sdkerrors.APIError | 4XX, 5XX | */* |
Update
Update an existing workspace by ID or slug. Management key required.Example Usage
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx | context.Context | :heavy_check_mark: | The context to use for the request. | |
id | string | :heavy_check_mark: | The workspace ID (UUID) or slug | production |
updateWorkspaceRequest | components.UpdateWorkspaceRequest | :heavy_check_mark: | N/A | {"name": "Updated Workspace","slug": "updated-workspace"} |
opts | []operations.Option | :heavy_minus_sign: | The options for this request. |
Response
*components.UpdateWorkspaceResponse, errorErrors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.BadRequestResponseError | 400 | application/json |
| sdkerrors.UnauthorizedResponseError | 401 | application/json |
| sdkerrors.ForbiddenResponseError | 403 | application/json |
| sdkerrors.NotFoundResponseError | 404 | application/json |
| sdkerrors.InternalServerResponseError | 500 | application/json |
| sdkerrors.APIError | 4XX, 5XX | */* |
BulkAddMembers
Add multiple organization members to a workspace. Members are assigned the same role they hold in the organization. Management key required.Example Usage
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx | context.Context | :heavy_check_mark: | The context to use for the request. | |
id | string | :heavy_check_mark: | The workspace ID (UUID) or slug | production |
bulkAddWorkspaceMembersRequest | components.BulkAddWorkspaceMembersRequest | :heavy_check_mark: | N/A | {"user_ids": ["user_abc123","user_def456"]} |
opts | []operations.Option | :heavy_minus_sign: | The options for this request. |
Response
*components.BulkAddWorkspaceMembersResponse, errorErrors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.BadRequestResponseError | 400 | application/json |
| sdkerrors.UnauthorizedResponseError | 401 | application/json |
| sdkerrors.ForbiddenResponseError | 403 | application/json |
| sdkerrors.NotFoundResponseError | 404 | application/json |
| sdkerrors.InternalServerResponseError | 500 | application/json |
| sdkerrors.APIError | 4XX, 5XX | */* |
BulkRemoveMembers
Remove multiple members from a workspace. Members with active API keys in the workspace cannot be removed. Management key required.Example Usage
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
ctx | context.Context | :heavy_check_mark: | The context to use for the request. | |
id | string | :heavy_check_mark: | The workspace ID (UUID) or slug | production |
bulkRemoveWorkspaceMembersRequest | components.BulkRemoveWorkspaceMembersRequest | :heavy_check_mark: | N/A | {"user_ids": ["user_abc123","user_def456"]} |
opts | []operations.Option | :heavy_minus_sign: | The options for this request. |
Response
*components.BulkRemoveWorkspaceMembersResponse, errorErrors
| Error Type | Status Code | Content Type |
|---|---|---|
| sdkerrors.BadRequestResponseError | 400 | application/json |
| sdkerrors.UnauthorizedResponseError | 401 | application/json |
| sdkerrors.ForbiddenResponseError | 403 | application/json |
| sdkerrors.NotFoundResponseError | 404 | application/json |
| sdkerrors.InternalServerResponseError | 500 | application/json |
| sdkerrors.APIError | 4XX, 5XX | */* |