Skip to content

Function: getGenieSpace()

getGenieSpace(spaceId, options?): Promise<{ description?: string; serialized_space?: string; space_id: string; title: string; warehouse_id?: string; }>

Fetch a Genie space by id, optionally including its serialized definition. Hits GET /api/2.0/genie/spaces/<id> with include_serialized_space=true through the raw apiClient, then validates the response against GenieSpaceSchema (unknown fields like etag / parent_path are stripped).

When the serialized request is rejected for lack of permission (403, or a PERMISSION_DENIED / Can Edit message - the workspace API gates the blob behind Can Edit), it retries once without the flag so the caller still gets the space. Any other failure, and a retry that fails too, is rethrown: a cancelled request or a missing space must not look like an unserialized space.

string

GetGenieSpaceOptions

Promise<{ description?: string; serialized_space?: string; space_id: string; title: string; warehouse_id?: string; }>