Help Center/ CodeArts Build/ API Reference/ Task APIs/ Deleting a Build Template
Updated on 2023-12-06 GMT+08:00

Deleting a Build Template

Function

Deleting a Build Template

Calling Method

For details, see Calling APIs.

URI

DELETE /v3/templates/{uuid}/delete

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

uuid

Yes

String

uuid

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. Obtain the value by calling the IAM service interface. (value of X-Subject-Token in the response header). Global tenant tokens are not supported. Use a region-level token whose scope is project.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

result

Array of CreateTemplatesItems objects

Template query result

error

String

An error message is returned.

status

String

Returned status information.

Table 4 CreateTemplatesItems

Parameter

Type

Description

favourite

Boolean

Indicates whether to add a template to favorites.

id

String

ID in the database.

uuid

String

uuid

template

QueryTemplate object

Build step template, which needs to be encapsulated in camel case.

type

String

Template category.

public

Boolean

Whether the Template Is Public

name

String

Template Naming

create_time

String

Created

domain_id

String

domainId

weight

Double

Weight

user_id

String

User ID.

user_name

String

User Name

domain_name

String

Domain Name

scope

String

Template scope. The default value is custom for a user-defined template.

description

String

Template Description

tool_type

String

Build tool type, which can be YAML build or action build.

intl_description

Object

intl Description

parameters

Array of CreateBuildJobParameter objects

List of build execution parameters

i18n

Object

i18n

Table 5 QueryTemplate

Parameter

Type

Description

steps

Array of CreateBuildJobSteps objects

Build Execution Steps

Table 6 CreateBuildJobSteps

Parameter

Type

Description

properties

Map<String,Object>

Specific Construction Procedure

module_id

String

Indicates the ID of the building module.

name

String

Building Module Name

version

String

Build version

enable

Boolean

Whether to enable this feature.

Table 7 CreateBuildJobParameter

Parameter

Type

Description

name

String

Parameter definition name. The default value is hudson.model.StringParameterDefinition.

params

Array of CreateBuildJobParameterParam objects

Subparameters of Construction Execution Parameters

Table 8 CreateBuildJobParameterParam

Parameter

Type

Description

name

String

Parameter Field Name

value

String

Parameter Field Value

limits

Array of LimitsParam objects

Restrictions on Enumeration Parameters

Table 9 LimitsParam

Parameter

Type

Description

disable

String

Indicates whether the configuration takes effect. The default value is 0, indicating that the configuration takes effect.

display_name

String

Name of a parameter.

name

String

Parameter

Status code: 400

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

Description

Status code: 401

Table 11 Response body parameters

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

Description

Status code: 403

Table 12 Response body parameters

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

Description

Status code: 404

Table 13 Response body parameters

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

Description

Status code: 500

Table 14 Response body parameters

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

Description

Example Requests

DELETE https://{endpoint}/v3/templates/ca9c83214d6344b9bd26d14ba0b519d9/delete

Example Responses

None

Status Codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal Server Error

Error Codes

See Error Codes.