Updated on 2026-01-08 GMT+08:00

Deploying an Application

Function

This API is used to deploy an application by deployment task ID.

Calling Method

For details, see Calling APIs.

URI

POST /v2/tasks/{task_id}/start

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

task_id

Yes

String

Definition

Deployment task ID.

Constraints

N/A

Range

The value contains 32 characters. Only letters and digits are allowed.

Default value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Definition:

Type (or format) of the message body.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

X-Auth-Token

Yes

String

Definition:

User token. Obtain a token (the value of the X-Subject-Token response header) by calling the IAM API used for.

Constraints:

N/A.

Value range:

String. Max. 20,000 characters.

Default value:

N/A.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

params

No

Array of DynamicConfigInfo objects

Definition:

Parameters transferred during application deployment.

Constraints:

N/A.

record_id

No

String

Definition:

Application deployment ID.

Constraints:

N/A.

Value range:

32 characters, including letters and digits.

Default value:

N/A.

trigger_source

No

String

Definition:

Whether to restrict the triggering source.

Constraints:

N/A.

Value range:

  • 0: No restrictions.

  • 1: Trigger a deployment only through the pipeline.

Default value:

N/A.

Table 4 DynamicConfigInfo

Parameter

Mandatory

Type

Description

key

No

String

Definition:

Parameter name transferred during application deployment.

Constraints:

N/A.

Value range:

1 to 128 characters, including letters, digits, hyphens (-), underscores (_), and periods (.).

Default value:

N/A.

value

No

String

Definition:

Parameter value transferred during application deployment.

Constraints:

N/A.

Value range:

Max. 8,192 characters. The following special characters are not supported: {{, {%, and {#

Default value:

N/A.

type

No

String

Definition:

Deployment parameter type.

Constraints:

If you set this parameter to runtime, this parameter is mandatory.

Value range:

  • text: String type.

  • host_group: Environment type.

  • encrypt: Private type.

  • enum: Enumeration type.

Default value:

N/A.

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

id

String

Definition:

Deployment record ID.

Value range:

32 characters, including letters and digits.

task_id

String

Definition:

Deployment task ID.

Value range:

32 characters, including letters and digits.

job_name

String

Definition:

Execution task name.

Value range:

50 characters, including letters, digits, and underscores (_).

app_component_list

Array of AppComponentDao objects

Definition:

Mapping between applications and AOM application components.

Table 6 AppComponentDao

Parameter

Type

Description

task_id

String

Definition:

Deployment job ID.

Range:

32 characters, including letters and digits.

app_id

String

Definition:

AOM application ID.

Range:

32 characters, including letters and digits.

app_name

String

Parameter description:

AOM application name.

Value range:

The value consists of letters and digits.

comp_id

String

Definition:

AOM application component ID.

Range:

32 characters, including letters and digits.

comp_name

String

Parameter description:

AOM application component name.

Value range:

The value consists of 0 to 128 characters.

domain_id

String

Definition:

Tenant ID.

Range:

32 characters, including letters and digits.

region

String

Parameter description:

Region information.

Value range:

The value consists of 1 to 256 characters.

state

String

Parameter description:

Whether the AOM application component takes effect.

Value range:

  • 0: Initialized.

  • 1: The operation is successful and takes effect.

Example Requests

This API is used to deploy an application by deployment task ID.

https://{endpoint}/v2/tasks/d2dc947ec2424d8789bb3984bb3adf45/start

{
  "params" : [ {
    "key" : "string",
    "value" : "test",
    "type" : "text"
  }, {
    "key" : "env",
    "value" : "e3144513a4094398857c992606ccba12",
    "type" : "host_group"
  }, {
    "key" : "enum",
    "value" : "value1",
    "type" : "enum"
  } ],
  "trigger_source" : 0
}

Example Responses

Status code: 200

OK: The request is successful.

{
  "id" : "0ee9c8e6a7dc44109541e53c6dccf47c",
  "task_id" : "d2dc947ec2424d8789bb3984bb3adf45",
  "job_name" : "job_0ee9c8e6a7dc44109541e53c6dccf47c_1620810492008",
  "app_component_list" : [ ]
}

Status Codes

Status Code

Description

200

OK: The request is successful.

Error Codes

See Error Codes.