Smart Monitoring V2 Generate YAML¶
POST /api/v1/checker/smart_monitor/generate
Overview¶
Body Request Parameters¶
| Parameter | Type | Required | Description |
|---|---|---|---|
| stream | boolean | Defaults to true to return SSE; false returns synchronous JSON. |
|
| prompt | string | Y | Empty string allowed: False |
| language | string | Allowed values: ['zh', 'zh-hant', 'en', 'id', 'ja', 'ko'] |
|
| checkerUUID | string | ||
| existingYaml | string |
Additional Parameter Notes¶
By default, SSE streaming is used to call Copilot POST /runs (stream=true), passing through StreamEvent JSON; the final result is located in data.response of the terminal state.
When stream=false, the synchronous JSON content of RunResponse is returned; the monitor is not saved or enabled.
If the state is succeeded but result is empty, the upstream response is still retained, and the caller can read the reason from the steps. Failures before the stream is established return an error; if the stream is interrupted and no terminal state is received, the operation is considered incomplete.
X-Smart-Monitor-Generation-Id is pre-allocated in the streaming response header. A draft valid for 24 hours is generated only when the successful terminal state contains valid YAML; interrupted, failed, or empty results cannot be saved.
OpenAPI can directly submit valid V2 YAML to create a monitor without calling the generation endpoint. Language and workspace identity are constrained by the server.