Skip to content

Update of Genie Create/Update/Import tools with serialized_space support #83

@BlitzBricksterYY-db

Description

@BlitzBricksterYY-db

Currently Genie Create/Update doesn't include serialized_space, which contains settings and instructions.

If user want to clone or import a Genie, we need to have serialized_space imported as well.

sample syntax:

Example requests
Export a Genie space
curl -s -X GET \
  "https://<workspace-host>/api/2.0/genie/spaces/<SPACE_ID>?include_serialized_space=true" \
  -H "Authorization: Bearer <TOKEN>"
bash

Response will include:

{
  "space_id": "01ef274d35a310b5bffd01dadcbaf577",
  "title": "My Space",
  "warehouse_id": "abc123def456",
  "serialized_space": "{\n  \"version\": 1,\n  \"config\": { ... }\n}\n"
}
json

Import a new Genie space
curl -s -X POST "https://<workspace-host>/api/2.0/genie/spaces" \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "warehouse_id": "abc123def456",
    "parent_path": "/Workspace/Users/yang.yang@databricks.com/Genie Spaces",
    "serialized_space": "<PASTE_EXPORTED_JSON_STRING>",
    "title": "My Imported Space",
    "description": "Cloned from dev"
  }'
bash

Update an existing Genie space
curl -s -X PATCH "https://<workspace-host>/api/2.0/genie/spaces/<SPACE_ID>" \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "warehouse_id": "newWarehouseId",
    "serialized_space": "<UPDATED_EXPORTED_JSON_STRING>",
    "title": "Updated Space",
    "description": "Refreshed configuration"
  }'
bash

Metadata

Metadata

Assignees

No one assigned

    Labels

    tools-libraryRelated to databricks-tools-core

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions