云服务器内容精选

  • 响应示例 状态码: 200 返回200状态码仅代表接口请求成功,任务提交结果由task_state字段来区分,此结果仅代表任务提交结果,并非智能信息发送结果。用户手机接收智能信息结果请以收到的回执结果为准,也可通过查询智能信息发送明细API获取或登录KooMessage控制台查看。 { "task_name" : "智能信息发送", "sms_channel" : { "channel_number" : "8822053111111", "sms_tpl_id" : 15010661, "sms_sign" : "华为云KooMessage", "sms_app_name" : "KooMessage" }, "resolve_task" : { "tpl_id" : "600000001", "resolve_times" : 1, "aim_code_type" : "individual", "domain" : null, "expiration_time" : 7, "generation_type" : "1", "params" : [ { "cust_flag" : "131****0000", "dync_params" : null, "custom_url" : "https://www.example.com", "custom_short_code" : null, "sms_params" : [ ] } ] }, "task_id" : "c3d7659d-06b0-4fa0-9eed-9225389ecccc", "task_state" : "Success", "creation_time" : "2022-07-19T14:37:34.00Z", "submission_count" : 1, "send_count" : 1, "resolve_count" : 0, "failed_short_chains" : [ ] }
  • 请求示例 发送智能信息。模板ID为"600000001",短链最大解析次数为1次,过期时间为7天,发送手机号码如"131****0000";通道号为"8822053111111",短信模板ID为"15010661"。 https://koomessage.myhuaweicloud.cn/v1/aim/send-tasks { "task_name" : "智能信息发送", "sms_channel" : { "channel_number" : "8822053111111", "sms_tpl_id" : 15010661, "sms_sign" : "华为云KooMessage", "sms_app_name" : "KooMessage" }, "resolve_task" : { "tpl_id" : "600000001", "resolve_times" : 1, "aim_code_type" : "individual", "domain" : null, "expiration_time" : 7, "params" : [ { "cust_flag" : "131****0000", "custom_url" : "https://www.example.com" } ] } } 发送智能信息-动态参数。模板ID为"600000002",短链最大解析次数为1次,过期时间为7天,发送手机号码如"131****0000",分别设置动态参数;通道号为"8822053111111",短信模板ID为"15010661"。 https://koomessage.myhuaweicloud.cn/v1/aim/send-tasks { "task_name" : "智能信息发送-动态参数", "sms_channel" : { "channel_number" : "8822053111111", "sms_tpl_id" : 15010661, "sms_sign" : "华为云KooMessage", "sms_app_name" : "KooMessage" }, "resolve_task" : { "tpl_id" : "600000002", "resolve_times" : 1, "aim_code_type" : "individual", "domain" : null, "expiration_time" : 7, "params" : [ { "cust_flag" : "131****0000", "dync_params" : { "param1" : "参数1", "param2" : "参数2", "param3" : "参数3", "param4" : "参数4" }, "custom_url" : "https://www.example.com", "sms_params" : [ "参数1", "参数2" ] }, { "cust_flag" : "131****0001", "dync_params" : { "param1" : "参数1", "param2" : "参数2", "param3" : "参数3", "param4" : "参数4" }, "custom_url" : "https://www.example.com", "sms_params" : [ "参数1", "参数2" ] } ] } }
  • URI GET /v1/aim/send-tasks 表1 Query参数 参数 是否必选 参数类型 描述 task_id 否 String 智能信息发送任务ID。 task_name 否 String 智能信息发送任务名称。 最小长度:0 最大长度:20 tpl_id 否 String 智能信息模板ID。 最小长度:0 最大长度:9 tpl_name 否 String 智能信息模板名称。 最小长度:0 最大长度:100 begin_time 否 String 智能信息发送任务创建开始时间。样例:2019-10-12T07:20:50.522Z。 说明: 需同时传入end_time才能生效,单独传begin_time不会作为过滤条件。缺省:查询最近7天(168小时)数据。 仅支持查询最近1年内创建的智能信息发送任务。 end_time 否 String 智能信息发送任务创建结束时间。样例:2019-10-12T07:20:50.522Z。 说明: 需同时传入begin_time才能生效,单独传end_time不会作为过滤条件。缺省:查询最近7天(168小时)数据。 task_status 否 String 智能信息发送任务状态。 Success:创建成功 Fail:创建失败 offset 否 Integer 偏移量,表示从此偏移量开始查询,offset大于等于0。 说明: 为提高查询效率,offset+limit须小于等于10000,超出范围查询为空。 最小值:0 最大值:1000000 缺省值:0 limit 否 Integer 每页显示的条目数量。 最小值:1 最大值:100 缺省值:20
  • 响应示例 状态码: 200 返回信息。 { "aim_send_tasks" : [ { "task_id" : "7cc198c3-91d3-425b-9226-54c27cd7cccc", "task_name" : "智能信息发送-动态参数", "task_state" : "Success", "submission_count" : 2, "send_count" : 2, "resolve_count" : 1, "support_resolve_count" : -1, "sms_channel" : { "sms_sign" : "华为云KooMessage" }, "creation_time" : "2022-07-19T14:57:20.00Z", "failed_short_chains" : null, "success_number" : 1 } ], "page_info" : { "offset" : 0, "limit" : 2, "total" : 1 } }