Updated on 2024-11-22 GMT+08:00

Deleting Dimensions

Function

This API is used to delete dimensions with specified IDs.

Calling Method

For details, see Calling APIs.

URI

DELETE /v2/{project_id}/design/dimensions

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details about how to obtain the project ID, see Project ID and Account ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

ids

Yes

Array of strings

ID list, which is a string

del_types

No

String

Deletion type.

Enumerated values:

  • PHYSICAL_TABLE: whether to delete physical database tables. This parameter is valid only for tables that can be materialized. (If this parameter is set, physical database tables are deleted.)

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

data

data object

Indicates the final deletion result, that is, the number of objects that are successfully deleted.

Table 4 data

Parameter

Type

Description

value

String

Number of successfully deleted objects

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code, for example, DS.6000, indicating that the request fails to be processed.

error_msg

String

Error message

data

Object

Returned data information.

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code, for example, DS.6000, indicating that the request fails to be processed.

error_msg

String

Error message

data

Object

Returned data information.

Status code: 403

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code, for example, DS.6000, indicating that the request fails to be processed.

error_msg

String

Error message

data

Object

Returned data information.

Example Requests

Delete dimensions based on the input parameters. Only dimensions in the draft, offline, or rejected state can be deleted.

DELETE https://{endpoint}/v2/{project_id}/design/dimensions

{
  "ids" : [ "1227990857618227200" ]
}

Example Responses

Status code: 200

The operation succeeds, and the number of deleted dimensions is returned.

{
  "value" : 1
}

Status code: 400

{
  "error_code" : "DS.60xx",
  "error_msg" : "The user request is illegal."
}

Status code: 401

{
  "error_code" : "DS.60xx",
  "error_msg" : "User authentication failed."
}

Status code: 403

{
  "error_code" : "DS.60xx",
  "error_msg" : "The user does not have permission to call this API."
}

Status Codes

Status Code

Description

200

The operation succeeds, and the number of deleted dimensions is returned.

400

BadRequest

401

Unauthorized

403

Forbidden