Updated on 2026-11-18 GMT+08:00

Creating a General Job

Function

This API is used to create the general task list for pipelines.

Calling Method

For details, see Calling APIs.

URI

POST /v5/{project_id}/api/reusable-jobs

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

createReusableJob

Yes

Object

Parameters for creating a job template

Table 3 createReusableJob

Parameter

Mandatory

Type

Description

name

No

String

Job template name

description

No

String

Job template description

definition

No

String

Template definition

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

reusable_job_id

String

Template ID.

Example Requests

POST https://{endpoint}/v5/0493899d9e6644cba4583c778443fad0/api/reusable-jobs

{
  "name" : "Build task template",
  "definition" : "{\"strategi\":{\"select_strategy\":\"selected\"},\"identifier\":\"JOB_nnyfc\",\"name\":\"Select Strategy\"}",
  "description" : "General template for build"
}

Example Responses

None

Status Codes

Status Code

Description

200

Template ID.

Error Codes

See Error Codes.