Workspace API

Endpoints

GET /v2/workspaces

Returns a list of workspaces in the organization.

Try it in Swagger

GET /v2/workspaces/{workspaceId}

Returns a workspace’s metadata.

Try it in Swagger

POST /v2/workspaces

Creates a new workspace. Returns a Workspace object.

Try it in Swagger

PATCH /v2/workspaces/{workspaceId}

Update the workspace’s metadata. Returns a Workspace object.

Try it in Swagger

DELETE /v2/workspaces/{workspaceId}

Deletes the workspace. Returns an empty object.

Try it in Swagger

The Workspace Object

Attributes

workspaceId string

The unique identifier associated with the workspace.

name string

The workspace's name, as is listed in Sigma.

createdBy string

The unique identifier, memberId, of the organization member who created the workspace.

updatedBy string

The unique identifier, memberId, of the organization member who last updated the workspace.

createdAt string

The timestamp at which the workspace was created.

updatedAt string

The timestamp at which the workspace was last updated.

{
"workspaceId": "35aa4e29-cdf4-424f-98e3-595a439be560",
"name": "Engineering-All",
"createdBy": "6VZszXPJqLXpIezceRadESnwfPPUg",
"updatedBy": "6VZszXPJqLXpIezceRadESnwfPPUg",
"createdAt": "2021-10-04T20:36:41.044Z",
"updatedAt": "2021-10-08T21:38:25.044Z"
}

List All Workspaces

Returns a list of workspaces in the organization (workspace objects).

GET /v2/workspaces

Try it in Swagger

Permissions

  • The user account associated with the API access token will only see workspaces they have access to.
    Note: If you encounter a permission error for the given endpoint, check with your organization Admin to verify your account type and permissions associated with your API token.

Parameters

_None

_

cURL Request

curl --location --request GET 'https://api.sigmacomputing.com/v2/workspaces/' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json' \

Response

Array<{
workspaceId: string,
name: string,
createdBy: string,
updatedBy: string,
createdAt: string,
updatedAt: string
}>

Example

Example Request:

curl --location --request GET 'https://api.sigmacomputing.com/v2/workspaces/' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json' \

Example Response:

[
{
"workspaceId": "35aa4e29-cdf4-424f-98e3-595a439be560",
"name": "Engineering β€” All",
"createdBy": "6VZszXPJqLXpIezceRadESnwfPPUg",
"updatedBy": "6VZszXPJqLXpIezceRadESnwfPPUg",
"createdAt": "2021-10-04T20:36:41.044Z",
"updatedAt": "2021-10-08T21:38:25.044Z" },
{
"workspaceId": "
2cfa3d51-74f0-4883-a34d-c861aea294c1",
"name": "Marketing β€” Demand Gen",
"createdBy": "8XYszXPJqLXpIezce5adESnwfTVOp",
"updatedBy": "6VZszXPJqLXpIezceRadESnwfPPUg",
"createdAt": "2021-05-03T20:15:41.025Z",
"updatedAt": "2021-11-06T21:43:15.044Z"
}
]

Look Up a Workspace

Returns the requested workspace’s metadata (workspace object).

GET /v2/workspaces/{workspaceId}

Try it in Swagger

Permissions

  • The user account associated with the API access token must have permission to access the requested workspace.
    Note: If you encounter a permission error for the given endpoint, check with your organization Admin to verify your account type and permissions associated with your API token.

Parameters

_None

_

cURL Request

curl --location --request GET 'https://api.sigmacomputing.com/v2/workspaces/{workbookId}' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json' \

Response

{
workspaceId: string,
name: string,
createdBy: string,
updatedBy: string,
createdAt: string,
updatedAt: string
}

Example

Example Request:

curl --location --request GET 'https://api.sigmacomputing.com/v2/workspaces/35aa4e29-cdf4-424f-98e3-595a439be560' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json' \

Example Response:

{
"workspaceId": "35aa4e29-cdf4-424f-98e3-595a439be560",
"name": "Engineering β€” All",
"createdBy": "6VZszXPJqLXpIezceRadESnwfPPUg",
"updatedBy": "6VZszXPJqLXpIezceRadESnwfPPUg",
"createdAt": "2021-10-04T20:36:41.044Z",
"updatedAt": "2021-10-08T21:38:25.044Z"
}

Create a New Workspace

Creates a new workspace. Returns a workspace object.

POST /v2/workspaces/

Try it in Swagger

Permissions

  • The user account associated with the API access token must have permission to create workspaces. Only organization Admins have this permission.
    Note: If you encounter a permission error for the given endpoint, verify your account type and permissions associated with your API token.

Parameters

name string

A name for the workspace. Will be displayed in Sigma.Β 

cURL Request

curl --location --request POST 'https://api.sigmacomputing.com/v2/workspaces/' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": string,
}'

Response

{
workspaceId: string,
name: string,
createdBy: string,
updatedBy: string,
createdAt: string,
updatedAt: string
}

Example

Example Request:

curl --location --request POST 'https://api.sigmacomputing.com/v2/workspaces/' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Engineering β€” Security",
}'

Example Response:

{
"workspaceId": "85ab4e29-cdq4-874f-99i3-897a439ba598",
"name": "Engineering β€” Security",
"createdBy": "7VTszXPJqLHpIetceRadELnwfPPR4",
"updatedBy": "7VTszXPJqLHpIetceRadELnwfPPR4",
"createdAt": "2021-10-04T20:36:41.044Z",
"updatedAt": "2021-10-04T20:36:41.044Z"
}

Update an Existing Workspace

Updates an existing workspace. Returns the updated workspace object.

PATCH /v2/workspaces/{workspaceId}

Try it in Swagger

Permissions

  • The user account associated with the API access token must have permission to edit workspaces. Only organization Admins have this permission.
    Note: If you encounter a permission error for the given endpoint, verify your account type and permissions associated with your API token.

Parameters

name string

A name for the workspace. Will be displayed in Sigma.Β 

cURL Request

curl --location --request PATCH 'https://api.sigmacomputing.com/v2/workspaces/{workspaceId}' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": string,
}'

Response

{
"workspaceId": string,
"name": string,
"createdBy": string,
"updatedBy": string,
"createdAt": string,
"updatedAt": string
}

Example

Example Request:

curl --location --request PATCH 'https://api.sigmacomputing.com/v2/workspaces/85ab4e29-cdq4-874f-99i3-897a439ba598' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Security Team",
}'

Example Response:

{
"workspaceId": "85ab4e29-cdq4-874f-99i3-897a439ba598",
"name": "Security Team",
"createdBy": "7VTszXPJqLHpIetceRadELnwfPPR4",
"updatedBy": "6VZszXPJqLXpIezceRadESnwfPPUg",
"createdAt": "2021-10-04T20:36:41.044Z",
"updatedAt": "2022-02-01T21:38:25.032Z"
}

Delete a Workspace

Deletes the workspace. Returns an empty object.

DELETE /v2/workspaces/{workspaceId}

Try it in Swagger

Permissions

  • The user account associated with the API access token must have permission to delete workspaces. Only organization Admins have this permission.
    Note: If you encounter a permission error for the given endpoint, verify your account type and permissions associated with your API token.

Parameters

None

cURL Request

curl --location --request DELETE 'https://api.sigmacomputing.com/v2/workspaces/{workspaceId}' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json' \

Response

{}

Example

Example Request:

curl --location --request DELETE 'https://api.sigmacomputing.com/v2/workspaces/35aa4e29-cdf4-424f-98e3-595a439be560' \
--header 'Authorization: Bearer {access_token}' \
--header 'Content-Type: application/json' \

Example Response:

{**}**