Help Center/ CodeArts Pipeline/ API Reference/ Application Examples/ Example 1: Executing a Pipeline
Updated on 2024-01-16 GMT+08:00

Example 1: Executing a Pipeline

Scenario

This section shows how to execute pipeline tasks by using APIs.

For details about how to call APIs, see Calling APIs.

Constraints

A pipeline task to be executed has been created in CodeArts Pipeline.

Involved APIs

Use request parameters such as the user token and pipeline ID to start a pipeline.

Procedure

  1. Execute a pipeline task.

    • API information

      URI: POST /v3/pipelines/{pipeline_id}/start

      For details about this API, visit Starting a Pipeline.

    • Example request
      POST  https://cloudpipeline-ext.ap-southeast-3.myhuaweicloud.com/v3/pipelines/{pipeline_id}/start
    • Example request body
      {}
    • Example response
      {
          "build_id": "xxx",
          "pipeline_id": "824e784b3f43492e99152a....."
      }