Updated on 2022-09-15 GMT+08:00

Creating Workspaces

Function

This API is used to create workspaces.

URI

POST /v2/{project_id}/design/workspaces

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

id

No

Long

ID

name

Yes

String

Workspace name

Maximum: 250

description

No

String

Maximum: 600

is_physical

No

Boolean

Whether the table is a physical table

Default: true

frequent

No

Boolean

Whether the workspace is frequently used

Default: true

top

No

Boolean

Hierarchical governance

Default: true

level

No

String

Data governance level

Enumeration values:

  • SDI

  • DWI

  • DWR

  • DM

dw_type

No

String

Data connection type

create_time

No

String

Creation time

update_time

No

String

Update time

create_by

No

String

Creator

update_by

No

String

User who updated the workspace

type

Yes

String

Workspace types

Enumeration values:

  • THIRD_NF

  • DIMENSION

biz_catalog_ids

No

String

IDs of business catalogs, including l1Ids, l2Ids, and l3Ids

databases

No

Array of strings

Array of database names

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

id

Long

ID

name

String

Workspace name

Maximum: 250

description

String

Maximum: 600

is_physical

Boolean

Whether the table is a physical table

Default: true

frequent

Boolean

Whether the workspace is frequently used

Default: true

top

Boolean

Hierarchical governance

Default: true

level

String

Data governance level

Enumeration values:

  • SDI

  • DWI

  • DWR

  • DM

dw_type

String

Data connection type

create_time

String

Creation time

update_time

String

Update time

create_by

String

Creator

update_by

String

User who updated the workspace

type

String

Workspace types

Enumeration values:

  • THIRD_NF

  • DIMENSION

biz_catalog_ids

String

IDs of business catalogs, including l1Ids, l2Ids, and l3Ids

databases

Array of strings

Array of database names

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Error code, for example, DS.000 which indicates that the request was successfully processed.

error_msg

String

Error message

data

Object

Returned data

Status code: 401

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code, for example, DS.000 which indicates that the request was successfully processed.

error_msg

String

Error message

data

Object

Returned data

Status code: 403

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code, for example, DS.000 which indicates that the request was successfully processed.

error_msg

String

Error message

data

Object

Returned data

Example Requests

{
  "id" : "953670725619867648",
  "name" : "test",
  "description" : "this is an example.",
  "is_physical" : false,
  "frequent" : false,
  "top" : true,
  "level" : null,
  "dw_type" : "UNSPECIFIED",
  "create_time" : "2022-03-16T15:06:59.333+08:00",
  "update_time" : "2022-03-16T15:06:59.333+08:00",
  "create_by" : "ei_dgc",
  "update_by" : "ei_dgc",
  "type" : "THIRD_NF",
  "biz_catalog_ids" : null,
  "databases" : null
}

Example Responses

Status code: 200

The operation succeeds. WorkspaceVO is returned.

{
  "data" : {
    "value" : {
      "id" : "1014218815216717824",
      "name" : "test",
      "description" : "abc",
      "is_physical" : true,
      "frequent" : false,
      "top" : true,
      "level" : "SDI",
      "dw_type" : "DLI",
      "create_time" : "2022-08-30T17:03:28.822+08:00",
      "update_time" : "2022-08-30T17:03:28.822+08:00",
      "create_by" : "abc",
      "update_by" : "abc",
      "type" : "THIRD_NF",
      "biz_catalog_ids" : null,
      "databases" : null
    }
  }
}

Status Codes

Status Code

Description

200

The operation succeeds. WorkspaceVO is returned.

400

BadRequest

401

Unauthorized

403

Forbidden