Skip to main content

Genie Space

View as Markdown

GenieSpace object​

A Genie space that business users query in natural language. Its configuration (data sources, instructions, sample questions and benchmarks) travels as a JSON string in serialized_space; the other fields are metadata about the space.

space_idstringuuid

Genie space ID

Example: e1ef34712a29169db030324fd0e1df5f

titlestring

Title of the Genie Space

descriptionstring

Description of the Genie Space

warehouse_idstring

ID of the SQL warehouse that runs the queries Genie generates for this space.

Example: a7066a8ef796be84

parent_pathstringPublic Preview

Path of the workspace folder that contains the space.

Example: /Workspace/Users/user@example.com

serialized_spacestring

Configuration of the space (data sources, instructions, sample questions and benchmarks) as a JSON string. Get Genie Space returns it only when include_serialized_space is true, and List Genie spaces never returns it. For the JSON format and its validation rules, see https://docs.databricks.com/aws/en/genie-agents/conversation-api.

etagstringPublic PreviewOutput only

ETag for this space. Pass this value back in the update request to prevent overwriting concurrent changes.

create_timestringOutput only

Time when the Genie space was created.

update_timestringOutput only

Time when the Genie space was last modified, matching the value shown in the Genie Agent UI.

Get a Genie space GA​

GET /api/2.0/genie/spaces/{space_id}

Get details of a Genie Space.

API scopes: genie

Parameters​

space_idstringuuidRequiredpath

The ID associated with the Genie space

Example: e1ef34712a29169db030324fd0e1df5f

include_serialized_spacebooleanquery

Whether to include the serialized space export in the response. When true, the response also carries the configuration etag. Requires at least CAN EDIT permission on the space.

Default: false

Response​

Returns the GenieSpace object.

List Genie spaces GA​

GET /api/2.0/genie/spaces

Lists the Genie spaces that the caller can access, most recently updated first.

API scopes: genie

Parameters​

page_sizeint32<= 100query

Maximum number of spaces to return per page

Default: 20

page_tokenstringquery

Pagination token for getting the next page of results

Response​

Returns a list of GenieSpace objects.

Create a Genie space GA​

POST /api/2.0/genie/spaces

Creates a Genie space from a serialized payload.

API scopes: genie

Request body​

warehouse_idstringRequired

ID of the SQL warehouse that runs the queries Genie generates for the space, as a 16-character hexadecimal string.

Example: a7066a8ef796be84

parent_pathstring

Path of the workspace folder in which to create the space.

Example: /Workspace/Users/user@example.com

serialized_spacestringRequired

Configuration of the new space as a JSON string. To copy an existing space, use the value that Get Genie Space returns when include_serialized_space is true. For the JSON format and its validation rules, see https://docs.databricks.com/aws/en/genie-agents/conversation-api.

titlestring

Display name of the new space. A default name is assigned when omitted.

descriptionstring

Description of the space, up to 16384 bytes.

Response​

Returns the GenieSpace object.

Update a Genie space GA​

PATCH /api/2.0/genie/spaces/{space_id}

Updates a Genie space. Replaces the whole configuration when serialized_space is set and changes the title, description, warehouse or folder when those fields are set; omitted fields keep their current values.

API scopes: genie

Parameters​

space_idstringRequiredpath

Genie space ID

Request body​

serialized_spacestring

New configuration of the space as a JSON string. It replaces the whole configuration; when omitted, the current configuration is kept. Start from the value that Get Genie Space returns when include_serialized_space is true. For the JSON format and its validation rules, see https://docs.databricks.com/aws/en/genie-agents/conversation-api.

titlestring

New display name for the space. Cannot be empty or contain a slash.

descriptionstring

New description for the space, up to 16384 bytes.

warehouse_idstring

ID of the SQL warehouse that runs the queries Genie generates for the space.

Example: a7066a8ef796be84

etagstringPublic Preview

ETag returned by a previous GET or UPDATE. When set, the update will fail if the space has been modified since. Omit to apply the update unconditionally.

parent_pathstringPublic Preview

Parent workspace folder path to move this Genie space under.

Response​

Returns the GenieSpace object.

Trash a Genie space GA​

DELETE /api/2.0/genie/spaces/{space_id}

Move a Genie Space to the trash.

API scopes: genie

Parameters​

space_idstringuuidRequiredpath

The ID associated with the Genie space to be sent to the trash.

Example: e1ef34712a29169db030324fd0e1df5f

Download an attachment visualization GA​

GET /api/2.0/genie/{name=spaces/*/conversations/*/messages/*/attachments/*}/download-visualization

Download a rendered image of a message visualization attachment. The response body is the raw PNG image, not a JSON payload. This is only available if the attachment is a visualization and the message status is COMPLETED.

API scopes: genie

Parameters​

namestringRequiredpath

The resource name of the attachment to render, in the format spaces/{space_id}/conversations/{conversation_id}/messages/{message_id}/attachments/{attachment_id}.

Response (application/octet-stream)​

The rendered visualization as a PNG image. Returned as the raw HTTP response body rather than a JSON field.

Returns binary.