workspaces
Creates, updates, deletes, gets or lists a workspaces
resource.
Overview
Name | workspaces |
Type | Resource |
Id | digitalocean.genai.workspaces |
Fields
The following fields are returned by SELECT
queries:
- genai_get_workspace
- genai_list_workspaces
A successful response.
Name | Datatype | Description |
---|---|---|
name | string | Name of the workspace (example: example name) |
agents | array | Agents |
created_at | string (date-time) | Creation date (example: 2023-01-01T00:00:00Z) |
created_by | string (uint64) | The id of user who created this workspace (example: 12345) |
created_by_email | string | The email of the user who created this workspace (example: example@example.com) |
deleted_at | string (date-time) | Deleted date (example: 2023-01-01T00:00:00Z) |
description | string | Description of the workspace (example: example string) |
evaluation_test_cases | array | Evaluations |
updated_at | string (date-time) | Update date (example: 2023-01-01T00:00:00Z) |
uuid | string | Unique id (example: 123e4567-e89b-12d3-a456-426614174000) |
A successful response.
Name | Datatype | Description |
---|---|---|
name | string | Name of the workspace (example: example name) |
agents | array | Agents |
created_at | string (date-time) | Creation date (example: 2023-01-01T00:00:00Z) |
created_by | string (uint64) | The id of user who created this workspace (example: 12345) |
created_by_email | string | The email of the user who created this workspace (example: example@example.com) |
deleted_at | string (date-time) | Deleted date (example: 2023-01-01T00:00:00Z) |
description | string | Description of the workspace (example: example string) |
evaluation_test_cases | array | Evaluations |
updated_at | string (date-time) | Update date (example: 2023-01-01T00:00:00Z) |
uuid | string | Unique id (example: 123e4567-e89b-12d3-a456-426614174000) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
genai_get_workspace | select | workspace_uuid | To retrieve details of a workspace, GET request to /v2/gen-ai/workspaces/{workspace_uuid} . The response body is a JSON object containing the workspace. | |
genai_list_workspaces | select | To list all workspaces, send a GET request to /v2/gen-ai/workspaces . | ||
genai_create_workspace | insert | To create a new workspace, send a POST request to /v2/gen-ai/workspaces . The response body contains a JSON object with the newly created workspace object. | ||
genai_update_workspace | replace | workspace_uuid | To update a workspace, send a PUT request to /v2/gen-ai/workspaces/{workspace_uuid} . The response body is a JSON object containing the workspace. | |
genai_delete_workspace | delete | workspace_uuid | To delete a workspace, send a DELETE request to /v2/gen-ai/workspace/{workspace_uuid} . |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
workspace_uuid | string | Workspace UUID. (example: "123e4567-e89b-12d3-a456-426614174000") |
SELECT
examples
- genai_get_workspace
- genai_list_workspaces
To retrieve details of a workspace, GET request to /v2/gen-ai/workspaces/{workspace_uuid}
. The response body is a JSON object containing the workspace.
SELECT
name,
agents,
created_at,
created_by,
created_by_email,
deleted_at,
description,
evaluation_test_cases,
updated_at,
uuid
FROM digitalocean.genai.workspaces
WHERE workspace_uuid = '{{ workspace_uuid }}' -- required;
To list all workspaces, send a GET request to /v2/gen-ai/workspaces
.
SELECT
name,
agents,
created_at,
created_by,
created_by_email,
deleted_at,
description,
evaluation_test_cases,
updated_at,
uuid
FROM digitalocean.genai.workspaces;
INSERT
examples
- genai_create_workspace
- Manifest
To create a new workspace, send a POST request to /v2/gen-ai/workspaces
. The response body contains a JSON object with the newly created workspace object.
INSERT INTO digitalocean.genai.workspaces (
data__agent_uuids,
data__description,
data__name
)
SELECT
'{{ agent_uuids }}',
'{{ description }}',
'{{ name }}'
RETURNING
workspace
;
# Description fields are for documentation purposes
- name: workspaces
props:
- name: agent_uuids
value: array
description: >
Ids of the agents(s) to attach to the workspace
- name: description
value: string
description: >
Description of the workspace
- name: name
value: string
description: >
Name of the workspace
REPLACE
examples
- genai_update_workspace
To update a workspace, send a PUT request to /v2/gen-ai/workspaces/{workspace_uuid}
. The response body is a JSON object containing the workspace.
REPLACE digitalocean.genai.workspaces
SET
data__description = '{{ description }}',
data__name = '{{ name }}',
data__workspace_uuid = '{{ workspace_uuid }}'
WHERE
workspace_uuid = '{{ workspace_uuid }}' --required
RETURNING
workspace;
DELETE
examples
- genai_delete_workspace
To delete a workspace, send a DELETE request to /v2/gen-ai/workspace/{workspace_uuid}
.
DELETE FROM digitalocean.genai.workspaces
WHERE workspace_uuid = '{{ workspace_uuid }}' --required;