Deze pagina is nog niet beschikbaar in uw eigen taal. We werken er hard aan om meer taalversies toe te voegen. Bedankt voor uw steun.
Execute Pipeline
Function
Execute Pipeline
URI
POST /v5/{project_id}/api/pipelines/{pipeline_id}/run
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
pipeline_id |
Yes |
String |
Pipeline ID |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. Can be obtained by calling the IAM API for obtaining the user token (the value of X-Subject-Token in the response header). |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
sources |
No |
Array of sources objects |
Sources Used |
description |
No |
String |
Running Description |
variables |
No |
Array of variables objects |
User-defined Parameters |
choose_jobs |
No |
Array of strings |
Selected Task |
choose_stages |
No |
Array of strings |
Selection Phase |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
type |
Yes |
String |
Source Type |
params |
No |
params object |
Source Parameter |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
git_type |
Yes |
String |
Code Repository Type |
alias |
No |
String |
Code Repository Alias |
codehub_id |
No |
String |
Repo code repository ID |
default_branch |
No |
String |
Default Branch |
git_url |
Yes |
String |
HTTPS address of the Git repository |
endpoint_id |
No |
String |
Extension Point ID |
build_params |
No |
build_params object |
Construction Parameters |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
pipeline_run_id |
String |
Pipeline running instance ID |
Example Requests
Starts a pipeline. The specified branch is master, and the parameter is key:val.
POST https://{endpoint}/v5/54f90b75fc1447b1b65e8d3a9f77923d/api/pipelines/e5460d1d403146a1935c2d4b68ef506c/run { "sources" : [ { "type" : "code", "params" : { "git_type" : "codehub", "codehub_id" : "2111699716", "default_branch" : "test-lbdsb11", "git_url" : "https://example.com/clsyz00001/111.git", "build_params" : { "build_type" : "branch", "event_type" : "Manual", "target_branch" : "test-lbdsb11" } } } ], "description" : "Running Description", "variables" : [ { "name" : "key", "value" : "val" } ], "choose_jobs" : [ "16772939480734f4abbc4-b3b9-4235-82c2-46559434cbd4" ] }
Example Responses
Status code: 200
OK
{ "pipeline_run_id" : "ad6b7f66283a45be9c1f82b06c831e59" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.