Updated on 2025-02-25 GMT+08:00

Modifying a Workspace

Function

This API is used to modify workspaces.

URI

PUT /v1/{project_id}/instances/{instance_id}/workspaces/{workspace_id}

Table 1 URI parameters

Parameter

Mandatory

Type

Description

instance_id

Yes

String

Instance ID.

workspace_id

Yes

String

Workspace ID. For how to obtain it, see Obtaining a Workspace ID.

project_id

Yes

String

Project ID. For how to obtain a project ID, see Obtaining a Project ID.

Request Parameters

Table 2 Request header parameter

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

Obtain a user token by calling IAM's API. X-Subject-Token in the response header is the desired user token. For how to obtain a token, see Authentication.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

configs

No

Map<String,String>

Workspace attribute configuration.

  • If default_dataset_permission is set to 1, all dataset data can be viewed when row-level permissions are not enabled. When set to 0, no dataset data can be viewed when row-level permissions are not enabled.

name

Yes

String

Workspace name.

description

No

String

Workspace description.

eps_id

Yes

String

ID of the enterprise project the workspace belongs to.

Response Parameters

Status code: 200

Table 4 Response body parameter

Parameter

Type

Description

id

String

Workspace ID.

Example Request

Modify the information of the workspace with ID xxxxaaa59ce841f8b4cc2c1305c1xxxx in a project.

/v1/{project_id}/instances/{instance_id}/workspaces/xxxxaaa59ce841f8b4cc2c1305c1xxxx

{
  "configs" : {
    "mode" : "0",
    "field_show_type" : "0",
    "only_admin_create_datasource" : "0",
    "works_authorized" : "0",
    "works_public" : "1",
    "works_view" : "0"
  },
  "name": "Test name",
  "description": "This is a test description.",
  "eps_id" : "0"
}

Example Response

{
  "id" : "xxxxaaa59ce841f8b4cc2c1305c1xxxx"
}

Status Codes

Status Code

Description

200

-

Error Codes

See Error Codes.