AI开发平台MODELARTS-新建消息订阅Subscription:请求示例

时间:2024-10-24 09:20:55

请求示例

创建消息订阅。设置订阅的主题为“fengbin26”,订阅的主体为“238947895793875835893490”,订阅的事件为“[ "*:failed,completed", "job_step:stop" ]”。订阅Workflow失败、完成和job_step节点停止三个事件,发生这三个事件时,会有消息提醒。

POST https://{endpoint}/v2/{project_id}/workflows/{workflow_id}/subscriptions

{
  "topic_urns" : [ "fengbin26" ],
  "entity" : "238947895793875835893490",
  "events" : [ "*:failed,completed", "job_step:stop" ]
}
support.huaweicloud.com/api-modelarts/CreateWorkflowSubscriptions.html