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
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| createReusableJob | Yes | Object | Parameters for creating a job template |
| 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
| 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.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot