創(chuàng)建工作流任務(wù)。
調(diào)試
您可以在OpenAPI Explorer中直接運(yùn)行該接口,免去您計(jì)算簽名的困擾。運(yùn)行成功后,OpenAPI Explorer可以自動(dòng)生成SDK代碼示例。
授權(quán)信息
當(dāng)前API暫無授權(quán)信息透出。
請求語法
POST /api/v1/pipelineruns
請求參數(shù)
名稱 | 類型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
body | object | 否 | 工作流任務(wù)。 | |
PipelineId | string | 否 | 工作流的 ID。 PipelineId 和 PipelineManifest 二選一。 | flow-rer7y*** |
Name | string | 否 | 工作流任務(wù)名字。若為空,則自動(dòng)生成名字。 | testName |
PipelineManifest | string | 否 | 工作流定義,具體樣例見下方請求參數(shù)補(bǔ)充說明。 PipelineId 和 PipelineManifest 二選一。 | apiVersion: "core/v1"\nmetadata:\n provider: "1557702098******"\n version: "v1"\n identifier: "my_pipeline"\n name: "source-transform"\nspec:\n inputs:\n parameters:\n - name: "execution_maxcompute"\n type: "Map"\n pipelines:\n - apiVersion: "core/v1"\n metadata:\n provider: "pai"\n version: "v1"\n identifier: "data_source"\n name: "data_source"\n displayName: "讀數(shù)據(jù)表-1"\n spec:\n arguments:\n parameters:\n - name: "inputTableName"\n value: "pai_online_project.wumai_data"\n - name: "partition"\n value: "20220101"\n - name: "execution"\n from: "{{inputs.parameters.execution_maxcompute}}"\n - apiVersion: "core/v1"\n metadata:\n provider: "pai"\n version: "v1"\n identifier: "type_transform"\n name: "type_transform"\n displayName: "類型轉(zhuǎn)換-1"\n spec:\n arguments:\n artifacts:\n - name: "inputTable"\n from: "{{pipelines.data_source.outputs.artifacts.outputTable}}"\n parameters:\n - name: "cols_to_double"\n value: "time,hour,pm2,pm10,so2,co,no2"\n - name: "execution"\n from: "{{inputs.parameters.execution_maxcompute}}"\n dependencies:\n - "data_source" |
Arguments | string | 否 | 參數(shù)。 | arguments: parameters: - name: "execution_maxcompute" value: endpoint: "http://service***" odpsProject: "pai***" |
NoConfirmRequired | boolean | 否 | 是否直接啟動(dòng) pipelineRun,取值如下:
| true |
WorkspaceId | string | 是 | 工作空間 ID。 | 84*** |
SourceType | string | 否 | 工作流任務(wù)來源類型,支持如下值:
| UNKNOWN |
SourceId | string | 否 | 來源 ID。 | experiment-ybpy*** |
Options | string | 否 | 創(chuàng)建工作流任務(wù)選項(xiàng),格式為 JSON。 | {"mlflow":{"experimentId":"exp-1jdk***"}} |
Accessibility | string | 否 | 工作空間可見性:
| PUBLIC |
工作流定義樣例:該工作流由讀數(shù)據(jù)表(data_source
),類型轉(zhuǎn)換(type_transform
)組成。
apiVersion: "core/v1"
metadata:
provider: "1557702098******"
version: "v1"
identifier: "my_pipeline"
name: "source-transform"
spec:
inputs:
parameters:
- name: "execution_maxcompute"
type: "Map"
pipelines:
- apiVersion: "core/v1"
metadata:
provider: "pai"
version: "v1"
identifier: "data_source"
name: "data_source"
displayName: "讀數(shù)據(jù)表-1"
spec:
arguments:
parameters:
- name: "inputTableName"
value: "pai_online_project.wumai_data"
- name: "partition"
value: "20220101"
- name: "execution"
from: "{{inputs.parameters.execution_maxcompute}}"
- apiVersion: "core/v1"
metadata:
provider: "pai"
version: "v1"
identifier: "type_transform"
name: "type_transform"
displayName: "類型轉(zhuǎn)換-1"
spec:
arguments:
artifacts:
- name: "inputTable"
from: "{{pipelines.data_source.outputs.artifacts.outputTable}}"
parameters:
- name: "cols_to_double"
value: "time,hour,pm2,pm10,so2,co,no2"
- name: "execution"
from: "{{inputs.parameters.execution_maxcompute}}"
dependencies:
- "data_source"
返回參數(shù)
示例
正常返回示例
JSON
格式
{
"RequestId": "DA869D1B-035A-43B2-ACC1-C56681BD9FAA",
"PipelineRunId": "flow-rbvg***"
}
錯(cuò)誤碼
訪問錯(cuò)誤中心查看更多錯(cuò)誤碼。
變更歷史
變更時(shí)間 | 變更內(nèi)容概要 | 操作 |
---|---|---|
2024-07-24 | API 內(nèi)部配置變更,不影響調(diào)用 | 查看變更詳情 |
2022-06-16 | API 內(nèi)部配置變更,不影響調(diào)用 | 查看變更詳情 |
2022-06-14 | 新增 OpenAPI | 查看變更詳情 |