Updated on 2025-10-24 GMT+08:00

Deleting a Customized Script

Function

This API is used to delete a custom script.

Constraints

  • Only the scripts created by the current account can be deleted.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    coc:document:delete

    Write

    document *

    -

    -

    -

URI

DELETE /v1/job/scripts/{script_uuid}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

script_uuid

Yes

String

Definition:

Script UUID.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition:

Tenant token.

Constraints:

Tenant token obtained from IAM.

Value range:

N/A.

Default value:

N/A.

X-Language

No

String

Definition:

Internationalization tag. zh-cn indicates Chinese, and en-us or no value indicates English.

Constraints:

zh-cn indicates Chinese, and en-us or no value indicates English.

Value range:

zh-cn and en-us

Default value:

N/A.

x-project-id

No

String

Definition:

The project ID.

Constraints:

Project ID corresponding to the region.

Value range:

N/A.

Default value:

N/A.

x-user-profile

No

String

Definition:

IAM 5.0 user information.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

data

String

Definition:

UUID of the deleted script.

Value range:

N/A.

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Definition:

Error code.

Value range:

See the error code section.

error_msg

String

Definition:

Error description.

Value range:

See the error code section.

Example Requests

Delete a custom script.

DELETE https://{Endpoint}/v1/job/scripts/{script_uuid}

Example Responses

Status code: 200

The script UUID is returned.

For more status codes, see Status Codes.

{
  "data" : "SC202506261xxxxxxxx"
}

Status code: 400

The contained error information is returned.

For more status codes, see Status Codes.

{
  "error_code" : "COC.00040701",
  "error_msg" : "error_msg"
}

Status Codes

Status Code

Description

200

The script UUID is returned.

For more status codes, see Status Codes.

400

The contained error information is returned.

For more status codes, see Status Codes.

Error Codes

See Error Codes.