CreatePipeline
Creates a pipeline. This API supports creating YAML-based pipelines.
Try it now
Test
RAM authorization
Request syntax
POST /organization/{organizationId}/pipelines HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| organizationId |
string |
Yes |
The organization ID. This string can be obtained from the Yunxiao URL, such as https://devops.aliyun.com/organization/[OrganizationId]. |
5ebbc0228123212b59xxxxx |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| name |
string |
Yes |
The name of the pipeline. |
Sample pipeline |
| content |
string |
Yes |
The YAML description of the pipeline. For more information about how to write the YAML file, see References at https://help.aliyun.com/document_detail/2249317.html. |
sources: # Configure pipeline source nodes in sources
my_repo: # The unique identifier of the pipeline source
type: codeup # The type of the pipeline source
name: Code source name # The display name of the code source
endpoint: |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| success |
boolean |
Indicates whether the API call is successful. Valid values: true (successful) and false (failed). |
true |
| errorCode |
string |
The error code. |
"" |
| errorMessage |
string |
The error message. |
"" |
| pipelinId |
integer |
The ID of the pipeline. |
11XXX |
| requestId |
string |
The request ID. Each request has a unique ID to facilitate troubleshooting. |
ASSDS-ASSASX-XSAXSA-XSAXSAXS |
Examples
Success response
JSON format
{
"success": true,
"errorCode": "\"\"",
"errorMessage": "\"\"",
"pipelinId": 0,
"requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS\n"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParam.ParamNotPresent | The parameter is invalid. | The parameter is invalid. |
| 400 | InvalidUser.NotFound | The user that is invoking the API service is not a registered user. | The user that is invoking the API service is not a registered user. |
| 403 | Forbidden.AccessDenied | The user is not authorized to perform the operation. | The user is not authorized to perform the operation. |
| 403 | Forbidden.UserNotAdminOrOwner | The current user is not an admin or owner in the organization and is not authorized to perform the operation. | |
| 403 | Forbidden.UserNotInCurrentOrganization | The user is not in the organization and is not authorized to perform the operation. | |
| 404 | InvalidOrganization.NotFound | The organization is not found. | The organization is not found. Please check the organization ID. |
| 404 | InvalidPipeline.NotFound | The pipeline is not found. | The pipeline does not exist. |
| 404 | InvalidPipelineRun.NotFound | The pipeline execution instance is not found. | The pipeline execution instance is not found. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.