Update a pipeline
Code Mode: praxis.media.pipelines.update
HTTP: PATCH /media/v1/pipelines/{pipeline_id}
Change a pipeline’s name, elements or alert_rules; each field you send replaces the whole of that field (elements is a list, not a merge) and a field you leave out stays. A stream that is live keeps the pipeline it began its broadcast with; the change takes effect from its next broadcast. An empty body answers 400. Example: {“elements”:[{“type”:“transcribe”}]}.
签名
praxis.media.pipelines.update(args:{path:{/** e.g. "msp_zpnqd7a2kxwg3vhr5tj4bfm6ec" */ pipeline_id:string};body:{/** The new name. e.g. "jewellery room" */ name?:string;/** The new element list */ elements?:Array<{/** Which processor or sink this element is. e.g. "transcribe" */ type:"transcribe"|"describe_frames"|"match_keywords"|"events"|"webhook"|"agent";/** transcribe: a language tag such as zh or en-US. e.g. "zh" */ language?:string;/** transcribe: words the recogniser should favour, at most 100. e.g. ["jade"] */ hot_words?:Array<string>;/** describe_frames: seconds between two described frames. e.g. 20 */ interval_s?:number;/** describe_frames: what to ask the model about the frame; the default asks what is happening in the picture in a sentence or two. e.g. "Describe what is happening in the picture in one or two sentences." */ prompt?:string;/** describe_frames: the vision model; omit it to use the platform's default. e.g. "gemini-3.5-flash" */ model?:string;/** match_keywords: the words to look for in the transcript. e.g. ["refund"] */ keywords?:Array<string>;/** webhook: the https or http address results are posted to. e.g. "https://example.com/hook" */ url?:string;/** webhook: a stable name for this webhook inside the pipeline (letters, digits, - and _, up to 64); whk_ followed by its position when you send none. e.g. "whk_0" */ id?:string;/** webhook: the signing secret (whsec_ followed by base64) the receiver verifies each delivery with. e.g. "whsec_k3JvYm90LXNlY3JldC1leGFtcGxlLTAwMDA" */ secret?:string;/** agent: the agent session that receives the results. e.g. "ses_01example" */ session_id?:string}>;/** The new rules */ alert_rules?:Array<{/** Which rule this is. e.g. "keyword_match" */ type:"keyword_match"|"model_judgment";/** keyword_match: the words that fire it. e.g. ["refund"] */ keywords?:Array<string>;/** model_judgment: the question the model answers. e.g. "Is the anchor promising a refund?" */ prompt?:string;[key:string]:unknown}>}}):Promise<{/** The pipeline's id; msp_ followed by 26 lowercase base32 characters. e.g. "msp_zpnqd7a2kxwg3vhr5tj4bfm6ec" */ id:string;/** Always media.pipeline. e.g. "media.pipeline" */ object:"media.pipeline";/** The pipeline's name. e.g. "jewellery room" */ name:string;/** The ordered processors and sinks. */ elements:Array<{/** Which processor or sink this element is. e.g. "transcribe" */ type:"transcribe"|"describe_frames"|"match_keywords"|"events"|"webhook"|"agent";/** transcribe: a language tag such as zh or en-US. e.g. "zh" */ language?:string;/** transcribe: words the recogniser should favour, at most 100. e.g. ["jade"] */ hot_words?:Array<string>;/** describe_frames: seconds between two described frames. e.g. 20 */ interval_s?:number;/** describe_frames: what to ask the model about the frame; the default asks what is happening in the picture in a sentence or two. e.g. "Describe what is happening in the picture in one or two sentences." */ prompt?:string;/** describe_frames: the vision model; omit it to use the platform's default. e.g. "gemini-3.5-flash" */ model?:string;/** match_keywords: the words to look for in the transcript. e.g. ["refund"] */ keywords?:Array<string>;/** webhook: the https or http address results are posted to. e.g. "https://example.com/hook" */ url?:string;/** webhook: a stable name for this webhook inside the pipeline (letters, digits, - and _, up to 64); whk_ followed by its position when you send none. e.g. "whk_0" */ id?:string;/** webhook: the signing secret (whsec_ followed by base64) the receiver verifies each delivery with. e.g. "whsec_k3JvYm90LXNlY3JldC1leGFtcGxlLTAwMDA" */ secret?:string;/** agent: the agent session that receives the results. e.g. "ses_01example" */ session_id?:string}>;/** The alert rules. */ alert_rules:Array<{/** Which rule this is. e.g. "keyword_match" */ type:"keyword_match"|"model_judgment";/** keyword_match: the words that fire it. e.g. ["refund"] */ keywords?:Array<string>;/** model_judgment: the question the model answers. e.g. "Is the anchor promising a refund?" */ prompt?:string;[key:string]:unknown}>;/** When the pipeline was created. e.g. "2026-11-28T10:00:00.000Z" */ created_at:string;/** When it last changed. e.g. "2026-11-28T10:00:00.000Z" */ updated_at:string}>;参数
| 名称 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
| pipeline_id | path | string | 是 | The pipeline’s id, the id field returned by pipelines.create or pipelines.list (msp_ followed by 26 lowercase base32 characters); a pipeline of another organization answers 404. |
请求体
| 必填 | 内容类型 | 说明 |
|---|---|---|
| 是 | application/json |
响应
| 状态码 | 内容类型 | 说明 |
|---|---|---|
| 200 | application/json | The pipeline after the change. |
| 400 | application/json | A field is invalid or the patch changes nothing: the error names the field. Correct it and send again. |
| 401 | application/json | The request carries no valid API key or session. Send a key of your organization. |
| 404 | application/json | No pipeline with this id in your organization, or Media Streams is not released for it. |