本文档介绍智能创作目前支持的通知事件。
注意
如业务配置了事件回调通知,用户操作触发了对应类型的事件后,回调接收服务会接收到来自智能创作的 HTTP 请求,请求采用 POST 方法,请求内容在 BODY 中。
媒体变更类事件
新文件产生事件
事件名称:Storage.NewFileCreated
事件说明:当业务配置了该类型的事件通知,如果在智能创作有新文件产生,业务后台即可收到该事件通知。事件通知内容为 StorageNewFileCreatedEvent 结构。事件内容如下所示(省略了值为 null 的字段):
{"EventType":"Storage.NewFileCreated","Operator":"user_id_12988300030300329","StorageNewFileCreatedEvent":{"FileId":"528589*****73533167","MaterialId":"5fdafac******0001c82b2e","OperationType":"Upload","Owner":{"Id":"user_id_12988300030300329","Type":"PESRON"},"ClassPath":"/媒资","TaskId":"","SourceContext":""}}
媒体导入事件
事件名称:Material.Imported
事件说明:当业务配置了该类型的事件通知,用户在智能创作导入媒体,业务后台即可收到该事件通知。事件通知内容为 MaterialImportedEvent 结构。事件内容如下所示(省略了值为 null 的字段):
{"EventType":"Material.Imported","Operator":"user_id_12988300030300329","MaterialImportedEvent":{"MediaInfoSet":[{"FileId":"5285890*****3533169","MaterialId":"5fdafaca******001c82b2e"}],"Owner":{"Id":"user_id_12988300030300329","Type":"PESRON"},"ClassPath":"/媒资"}}
媒体添加事件
事件名称:Material.Added
事件说明:当业务配置了该类型的事件通知,用户在智能创作将媒体添加到个人目录、添加到项目中时,业务后台即可收到该事件通知。事件通知内容为 MaterialAddedEvent 结构。事件内容如下所示(省略了值为 null 的字段):
{"EventType":"Material.Added","Operator":"user_id_12988300030300329","MaterialAddedEvent":{"MaterialIdSet":["5fdafaca*******001c82b2e"],"Owner":{"Id":"user_id_12988300030300329","Type":"PESRON"},"ClassPath":"/媒资/视频"}}
媒体移动事件
事件名称:Material.Moved
事件说明:当业务配置了该类型的事件通知,用户在智能创作将媒体移动到其它分类下,业务后台即可收到该事件通知。事件通知内容为 MaterialMovedEvent 结构。事件内容如下所示(省略了值为 null 的字段):
{"EventType":"Material.Moved","Operator":"user_id_12988300030300329","MaterialMovedEvent":{"MaterialIdSet":["5fdafac******d0001c82b2e"],"SourceOwner":{"Id":"user_id_12988300030300329","Type":"PESRON"},"SourceClassPath":"/媒资","DestinationOwner":{"Id":"user_id_12988300030300330","Type":"PESRON"},"DestinationClassPath":"/媒资/视频"}}
媒体更新事件
事件名称:Material.Modified
事件说明:当业务配置了该类型的事件通知,用户在智能创作更新媒体名称、预置标签或者自定义标签时,业务后台即可收到该事件通知。事件通知内容为 MaterialModifiedEvent 结构。事件内容如下所示(省略了值为 null 的字段):
{"EventType":"Material.Modified","Operator":"user_id_12988300030300329","MaterialModifiedEvent":{"MaterialId":"5fdafaca*******001c82b2e","Name":"修改后的名称","PresetTagIdSet":[],"TagSet":["风景","城市"]}}
媒体删除事件
事件名称:Material.Deleted
事件说明:当业务配置了该类型的事件通知,用户在智能创作删除媒体时,业务后台即可收到该事件通知。事件通知内容为 MaterialDeletedEvent 结构。事件内容如下所示(省略了值为 null 的字段):
{"EventType":"Material.Deleted","Operator":"user_id_12988300030300329","MaterialDeletedEvent":{"MaterialIdSet":["5fdafaca*******001c82b2e"]}}
分类变更类事件
分类创建事件
事件名称:Class.Created
事件说明:当业务配置了该类型的事件通知,用户在智能创作创建分类时,业务后台即可收到该事件通知。事件通知内容为 ClassCreatedEvent 结构。事件内容如下所示(省略了值为 null 的字段):
{"EventType":"Class.Created","Operator":"user_id_12988300030300329","ClassCreatedEvent":{"Owner":{"Id":"user_id_12988300030300329","Type":"PERESON"},"ClassPath":"/媒体/测试"}}
分类移动事件
事件名称:Class.moved
事件说明:当业务配置了该类型的事件通知,如果用户在智能创作移动分类时,业务后台即可收到该事件通知。事件通知内容为 ClassMovedEvent 结构。事件内容如下所示(省略了值为 null 的字段):
{"EventType":"Class.moved","Operator":"user_id_12988300030300329","ClassMovedEvent":{"SourceOwner":{"Id":"user_id_12988300030300329","Type":"PERESON"},"SourceClassPathSet":["/媒体/视频/测试1","/媒体/视频/测试2"],"DestinationOwner":{"Id":"user_id_12988300030300329","Type":"PERESON"},"DestinationClassPath":"/媒体/赛事"}}
分类删除件
事件名称:Class.Deleted
事件说明:当业务配置了该类型的事件通知,用户在智能创作删除分类时,业务后台即可收到该事件通知。事件通知内容为 ClassDeletedEvent 结构。事件内容如下所示(省略了值为 null 的字段):
{"EventType":"Class.Deleted","Operator":"user_id_12988300030300329","ClassDeletedEvent":{"Owner":{"Id":"user_id_12988300030300329","Type":"PERESON"},"SourceClassPathSet":["/媒体/视频/测试1","/媒体/视频/测试2"]}}
项目状态变更类事件
云转推项目状态变更事件
事件名称:Project.StreamConnect.StatusChanged
事件说明:当业务配置了该类型的事件通知,云转推项目状态发生变更(包括开始转推及关闭转推)时,业务后台即可收到该事件通知。事件通知内容为 ProjectStreamConnectStatusChangedEvent 结构。事件内容如下所示(省略了值为 null 的字段):
{"EventType":"Project.StreamConnect.StatusChanged","Operator":"user_id_12988300030300329","ProjectStreamConnectStatusChangedEvent":{"ProjectId":"cmepid_6fdafaca*******0001c82b23","Status":"Working"}}
导播台项目状态变更事件
事件名称:Project.Switcher.StatusChanged
事件说明:当业务配置了该类型的事件通知,导播台项目状态发生变更(包括启动导播台、关闭导播台等)时,业务后台即可收到该事件通知。事件通知内容为 ProjectSwitcherStatusChangedEvent 结构。事件内容如下所示(省略了值为 null 的字段):
{"EventType":"Project.Switcher.StatusChanged","Operator":"user_id_12988300030300329","ProjectSwitcherStatusChangedEvent": {"ProjectId":"cmepid_78dbfacb*******022c89b46","Status":"Started"}}
视频导出完成事件
事件名称:Task.VideoExportCompleted
事件说明:当业务配置了该类型的事件通知,视频导出完成(包括导出视频编辑项目、使用视频合成协议导出视频等)时,业务后台即可收到该事件通知。事件通知内容为 VideoExportCompletedEvent 结构。事件内容如下所示(省略了值为 null 的字段):
{"EventType":"Task.VideoExportCompleted","Operator":"user_id_12988300030300329","VideoExportCompletedEvent":{"TaskId":"1*********bec5a75e20t","Status":"SUCCESS","ErrCode":0,"ErrMsg":"","Output":{"MaterialId":"626101****01772235","VodFileId":"38770****198482","URL":"http://15000***/***/cec9182372270.mp4","CoverURL":"http://1500***/***4/coverBySnapshot/coverBySnapshot_10_0.jpg","MetaData":{"Size":5224677,"Container":"mov,mp4,m4a,3gp,3g2,mj2","Bitrate":2112687,"Height":1080,"Width":1920,"Duration":19.784000396728516,"Rotate":0,"VideoStreamInfoSet":[{"Bitrate":2025016,"Height":1080,"Width":1920,"Codec":"h264","Fps":25}],"AudioStreamInfoSet":[{"Bitrate":83050,"SamplingRate":44100,"Codec":"aac"}]}}}}