Workspaces

Create workspace

Creates a new workspace and returns its credentials. Workspaces provide a playground for your data. You can load data from your storage, explore or modify it and then, optionally, load it back to storage tables. A workspace is represented by access credentials to a storage backend with permissions to write to the workspace specific database schema.

Set async=true to create the workspace in a background job. Calling the endpoint with async=false is deprecated.

To create a workspace bound to a component configuration (including a reader workspace), use the /components/{componentId}/configs/{configurationId}/workspaces variant of this endpoint.

All workspaces endpoints can be used with default for the branchId parameter, which emulates the call without a development branch: GET /v2/storage/workspaces is the same as GET /v2/storage/branch/default/workspaces.

post/v2/storage/branch/{branchId}/workspaces

Request

Path parameters

componentIdstring

Component identifier. Only for the configuration workspace variant of the endpoint.

configurationIdstring

Configuration identifier. Only for the configuration workspace variant of the endpoint.

branchIdstring required

Query parameters

asyncboolean

Create workspace in a background job. Calling the parameter as async=false is deprecated.

Headers

contextstring nullable

Request body

backend'snowflake' | 'bigquery' | 'abs' nullable

Workspace backend type.

backendSizestring nullable

Requested backend size (Snowflake only).

readOnlyStorageAccessboolean nullable

Enable read-only storage access.

networkPolicy'system' | 'user' | 'not-defined' nullable

Network policy for the workspace.

loginType'null' | 'default' | 'snowflake-legacy-service' | 'snowflake-person-sso' | 'snowflake-person-keypair' | 'snowflake-service-keypair' | 'none' | 'governed' nullable

Preferred login type. Use "none" to create a workspace without credentials for QueryService. Create direct connection credentials later using the workspace credentials endpoint. Use "governed" (Snowflake and BigQuery, no "publicKey") to create a workspace that only QueryService can read: it has no login, nobody else can obtain its credentials, and password reset, public key, SSO and native query are refused. For the "snowflake" backend, "default" and "snowflake-legacy-service" are rejected because they resolve to password authentication, which Snowflake no longer supports; use "snowflake-service-keypair" or "snowflake-person-keypair" with "publicKey", or "none".

publicKeystring nullable

RSA public key for key pair login.

useCase'normal' | 'reader' nullable

Workspace use case.

configurationVersioninteger nullable

Pin workspace to a specific configuration version.

Response

Synchronous call response (async=false). The password (or key/connection string) is returned only here and cannot be retrieved later.

idinteger required

ID of the workspace.

type'file' | 'table' required

Type of the workspace.

namestring nullable required

Name of the workspace (schema name for table type).

componentstring nullable required

ID of the component that created the workspace.

configurationIdstring nullable required

ID of the configuration that created the workspace.

configurationVersioninteger nullable required

Pinned configuration version.

createdstring required

Date and time of workspace creation, ISO 8601 with a +hhmm offset.

backendSizestring nullable required

Size of the backend (e.g., for Snowflake).

statementTimeoutSecondsinteger required

Statement timeout in seconds.

readOnlyStorageAccessboolean required

Indicates if read-only storage access is enabled.

platformUsageType'service' | 'user' | 'reader' nullable required

Platform usage type.

state'active' | 'deactivated' required

Lifecycle state of the workspace. A deactivated workspace is kept listed so its owner can delete it, but its backend identity is disabled and cannot be connected to; contact support to reactivate it.

lastActivityAtstring nullable required

Last observed workspace use (backend login or Storage job), ISO 8601 with a +hhmm offset. May be a seeded floor for an unused workspace; null when unknown.

warnAtstring nullable required

Projected date retention would warn this workspace, ISO 8601 with a +hhmm offset. It can move when the workspace is used; null when retention does not apply or activity has not been synced recently.

deactivateAtstring nullable required

When retention will deactivate this unused workspace, ISO 8601 with a +hhmm offset. Null unless the owner has been warned. Connecting to the workspace cancels it. Can lie in the past while retention only notifies.

deleteAtstring nullable required

When retention will delete this deactivated workspace, ISO 8601 with a +hhmm offset. Null unless the workspace is deactivated. Support can reactivate it until then.

Example response

{
  "created": "2017-02-13T12:01:05+0100",
  "connection": {
    "credentials": {
      "type": "service_account"
    }
  },
  "lastActivityAt": "2017-02-13T12:01:05+0100",
  "warnAt": "2017-02-13T12:01:05+0100",
  "deactivateAt": "2017-02-13T12:01:05+0100",
  "deleteAt": "2017-02-13T12:01:05+0100"
}

Changes

No recorded changes to this operation across all 1 revision of this API.