CreatePipeline
Creates a pipeline.
Operation description
OSS import
When
source.typeisoss,format,region,roleArn, anduriinsource.ossare required. You can omitformatOptionsor pass an empty object{}. The initial version has no available configuration keys. Non-empty objects and other JSON types return a parameter error. Omitsource.inputFields. When LeRobot has no processing nodes, you can passpipeline.nodes: []. For MCAP, you must pass an empty array.sink.typemust bedataset, andsink.datasetmust point to an existing dataset.executePolicy.modemust beRunOnce. You can omitrunOnce. OSS ignores the time window. If a time field is passed, the value must be an integer.A successful creation indicates that the submission is accepted. Call
ListPipelineRunswith the pipeline name to query the import progress. The formal submission independently discovers the OSS input scope.
OSS creation request example
{
"pipelineName": "robot_import_example",
"pipeline": {"nodes": []},
"source": {"type": "oss", "oss": {"format": "lerobot", "region": "cn-beijing", "roleArn": "acs:ram::1234567890123456:role/oss-reader", "uri": "oss://example-bucket/robot-datasets/"}},
"sink": {"type": "dataset", "dataset": {"agentSpace": "my-agent-space", "dataset": "robot-import-target"}},
"executePolicy": {"mode": "RunOnce"}
}
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
agentloop:CreatePipeline |
create |
*Pipeline
|
None | None |
Request syntax
POST /agentspace/{agentSpace}/pipeline HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| agentSpace |
string |
No |
The name of the AgentSpace where the pipeline is created. |
my-agent-space |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| pipelineName |
string |
No |
The name of the pipeline. The name must be 3 to 63 characters in length and can contain only lowercase letters, digits, and hyphens. |
my-pipeline |
| description |
string |
No |
The description of the pipeline. The description can be up to 256 characters in length. |
Collect trace data from SLS for data cleaning into a dataset |
| pipeline |
object |
No |
The pipeline configuration, including node orchestration. |
{"nodes":[{"id":"select-fields","type":"project","parameters":{"question":"user_query"}}]} |
| nodes |
array<object> |
No |
The list of nodes. For non-OSS sources, you must pass a non-empty array. For LeRobot sources, you can pass an empty array for direct import. For MCAP sources, you must pass an empty array. |
[{"id":"select-fields","type":"project","parameters":{}}] |
|
array<object> |
No |
The configuration of a single node. |
||
| id |
string |
No |
The ID of the node. |
node-1 |
| type |
string |
No |
The type of the node. |
transform |
| parameters |
object |
No |
The parameters of the node. The parameters use a key-value structure and vary based on the node type. |
{"ID": "ID"} |
|
any |
No |
The value of the node parameter. |
value |
|
| source |
object |
No |
The data source of the pipeline. |
{"type":"logstore","logstore":{"project":"my-sls-project","logstore":"agent-logs"},"inputFields":[{"name":"question","type":"text"}]} |
| type |
string |
No |
The type of the data source. Valid values: |
oss |
| oss | PipelineOssSource |
No |
When |
|
| inputFields |
array<object> |
No |
The input fields and their types. For OSS sources, the server derives the input fields from the metadata. Omit |
[{"name":"question","type":"text"}] |
|
object |
No |
The input field. |
||
| name |
string |
No |
The name of the field. |
question |
| type |
string |
No |
The type of the field. Valid values: text, long, double, and json. |
text |
| logstore |
object |
No |
The datasource config for the SLS Logstore. |
{"project":"my-sls-project","logstore":"agent-logs"} |
| project |
string |
No |
The name of the SLS project. |
my-sls-project |
| logstore |
string |
No |
The name of the SLS Logstore. |
my-sls-logstore |
| query |
string |
No |
The filtered query statement (SLS query and analysis syntax). |
* | SELECT * |
| dataset |
object |
No |
The datasource config for the dataset in the current AgentSpace. |
{"dataset":"my-dataset","filter":"status = 'pending'"} |
| dataset |
string |
No |
The name of the source dataset. |
my-dataset |
| filter |
string |
No |
The data filtering condition for the dataset. |
status = 'pending' |
| version |
string |
No |
The version of the source dataset. |
v1 |
| trajectory |
object |
No |
The trajectory data configuration. This parameter is optional and takes effect only when the type is |
{"enrich":{"enabled":true,"columns":["input","output"]}} |
| enrich |
object |
No |
Trajectory enrichment: mounts trajectory data into the cleansing result based on |
{"enabled":true,"columns":["input","output"]} |
| enabled |
boolean |
No |
Specifies whether to enable trajectory enrichment. |
false |
| columns |
array |
No |
The list of enrichment columns. This parameter is retained for compatibility. The current implementation outputs a single fixed column |
["input","output","session_id"] |
|
string |
No |
The name of the trajectory column. |
input |
|
| sink |
object |
No |
The pipeline sink. |
|
| type |
string |
No |
The sink type. Currently, only Dataset is supported. |
Dataset |
| dataset |
object |
No |
The destination dataset configuration. |
|
| agentSpace |
string |
No |
The name of the AgentSpace to which the destination dataset belongs. |
my-agent-space |
| dataset |
string |
No |
The name of the destination dataset. |
my-dataset |
| condition |
object |
No |
The conditional routing configuration. This parameter is used only when sink.type is set to condition. |
|
| matchMode |
string |
No |
The route matching mode. Currently, only all is supported. |
all |
| routes |
array<object> |
No |
The list of conditional routes. |
|
|
array<object> |
No |
The conditional route. |
||
| id |
string |
No |
The route ID. |
refund |
| expression |
string |
No |
The route expression in Search Processing Language (SPL). Only where, project, and extend are supported. |
* | where intent = 'refund' |
| sink |
object |
No |
The sink for the route. |
|
| type |
string |
No |
The route sink type. Currently, only dataset is supported. |
dataset |
| dataset |
object |
No |
The destination dataset for the route. |
|
| agentSpace |
string |
No |
The name of the AgentSpace to which the destination dataset belongs. |
my-agent-space |
| dataset |
string |
No |
The name of the destination dataset. |
refund-result |
| defaultSink |
object |
No |
The default sink used when no conditional route is matched. |
|
| type |
string |
No |
The default sink type. Currently, only dataset is supported. |
dataset |
| dataset |
object |
No |
The default destination dataset. |
|
| agentSpace |
string |
No |
The name of the AgentSpace to which the default destination dataset belongs. |
my-agent-space |
| dataset |
string |
No |
The name of the default destination dataset. |
other-result |
| executePolicy |
object |
No |
The execution policy. |
{"mode":"RunOnce","runOnce":{"fromTime":1735660800,"toTime":1735664400}} |
| mode |
string |
No |
The execution mode. Valid values: RunOnce (single execution) and Scheduled (periodic scheduling). |
RunOnce |
| runOnce |
object |
No |
The RunOnce configuration. This parameter is required only when mode is set to RunOnce. |
{"fromTime":1735660800,"toTime":1735664400} |
| fromTime |
integer |
No |
The start time of the data processing window in UNIX seconds. This value must be less than toTime. |
1735660800 |
| toTime |
integer |
No |
The end time of the data processing window in UNIX seconds. This value must be greater than fromTime. |
1735747200 |
| continuous |
object |
No |
The continuous execution configuration. This parameter is used when type is set to trace. The processing frequency is a fixed value managed by the server. |
{"fromTime":1735660800} |
| fromTime |
integer |
No |
The bootstrap historical start time in UNIX seconds. The precision is the same as runOnce or scheduled.fromTime. Millisecond values greater than or equal to 1e12 are automatically converted. The cursor starts from this time aligned to the grid and catches up window by window. After catching up, it switches to minute intervals. By default, it starts from the current time and processes only incremental data. |
1735660800 |
| scheduled |
object |
No |
The scheduled execution configuration. This parameter is required only when mode is set to Scheduled. |
{"interval":"1h","fromTime":1735660800} |
| interval |
string |
No |
The scheduling interval. Valid values: 1h, 6h, 12h, and 1d. |
1h |
| fromTime |
integer |
No |
The scheduling start time in UNIX milliseconds. |
1735660800000 |
| pipelineKind |
string |
No |
The pipeline type. Valid values: PROCESSING (data processing) and ORCHESTRATION (orchestration task). |
ORCHESTRATION |
| clientToken |
string |
No |
The idempotency token. A unique string generated by the client to ensure the idempotence of the creation operation. |
a1b2c3d4-1234-5678-90ab-cdef12345678 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response data. |
||
| requestId |
string |
The request ID, which is used to locate the request during troubleshooting. |
9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M |
Examples
Success response
JSON format
{
"requestId": "9ACFB10A-1B2C-3D4E-5F6G-7H8I9J0K1L2M"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.