文档中心 > API类目 > 智能设备

alibaba.ailabs.iot.business.recipestep.insertorupdate (插入或更新食谱步骤)

插入或更新食谱步骤

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
param_business_recipe_step_open_param BusinessRecipeStepOpenParam 必须 食谱步骤开放参数
  • └ business_recipe_id
  • Number
  • 必须
  • 1
  • 行业食谱id
  • recipe_step_action_list
  • BusinessRecipeStepActionOpenParam []
  • 可选
  • 步骤指令列表
  • └ action_name
  • String
  • 可选
  • runTime
  • 指令名称
  • └ action_value
  • String
  • 可选
  • 3
  • 指令值
  • └ sequence
  • Number
  • 可选
  • 1
  • 指令顺序号
  • └ description
  • String
  • 可选
  • 搅拌3分钟
  • 食谱步骤描述
  • └ business_recipe_step_id
  • Number
  • 可选
  • 1
  • 行业食谱步骤id
  • image_url
  • ImageUrlParam
  • 可选
  • 食谱步骤图片
  • └ img
  • String
  • 可选
  • www.img.com
  • 默认图片
  • └ large
  • String
  • 可选
  • www.large.com
  • 大图
  • └ medium
  • String
  • 可选
  • www.medium.com
  • 中图
  • └ small
  • String
  • 可选
  • www.small.com
  • 小图
  • └ open_account_id
  • String
  • 必须
  • 0yl8oK0WFDBwEheQxSMD4g==
  • 开放账号Id
  • └ recipe_step_name_cn
  • String
  • 必须
  • 搅拌3分钟
  • 食谱步骤中文名
  • └ recipe_step_time
  • Number
  • 可选
  • 180
  • 食谱步骤时间
  • └ sequence
  • Number
  • 必须
  • 1
  • 食谱步骤顺序号
  • └ tips
  • String
  • 可选
  • 步骤提示
  • 食谱步骤提示
  • video_url
  • VideoUrlParam
  • 可选
  • 食谱步骤视频
  • cover
  • ImageUrlParam
  • 可选
  • 视频封面图
  • └ img
  • String
  • 可选
  • www.img.com
  • 默认图片
  • └ large
  • String
  • 可选
  • www.large.com
  • 大图
  • └ medium
  • String
  • 可选
  • www.medium.com
  • 中图
  • └ small
  • String
  • 可选
  • www.small.com
  • 小图
  • └ default_url
  • String
  • 可选
  • www. defaultUrl.com
  • 默认播放链接
  • └ height
  • Number
  • 可选
  • 240
  • 视频高度
  • └ high
  • String
  • 可选
  • www.high.com
  • 高清
  • └ standard
  • String
  • 可选
  • www.standard.com
  • 标清
  • └ ultra
  • String
  • 可选
  • www.ultra.com
  • 超清
  • └ width
  • Number
  • 可选
  • 375
  • 视频宽度
  • └ action_flag
  • Number
  • 必须
  • 1
  • 指令标识:0不支持指令,1支持指令

响应参数

名称 类型 示例值 描述
message String null 信息
ret_code Number 200 响应code
ret_value Number 1 返回结果
trace_id String 1e0525b315754507465865759e 追踪id

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaAilabsIotBusinessRecipestepInsertorupdateRequest req = new AlibabaAilabsIotBusinessRecipestepInsertorupdateRequest();
AlibabaAilabsIotBusinessRecipestepInsertorupdateRequest.BusinessRecipeStepOpenParam obj1 = new AlibabaAilabsIotBusinessRecipestepInsertorupdateRequest.BusinessRecipeStepOpenParam();
obj1.setBusinessRecipeId(1L);
List<AlibabaAilabsIotBusinessRecipestepInsertorupdateRequest.BusinessRecipeStepActionOpenParam> list3 = new ArrayList<AlibabaAilabsIotBusinessRecipestepInsertorupdateRequest.BusinessRecipeStepActionOpenParam>();
AlibabaAilabsIotBusinessRecipestepInsertorupdateRequest.BusinessRecipeStepActionOpenParam obj4 = new AlibabaAilabsIotBusinessRecipestepInsertorupdateRequest.BusinessRecipeStepActionOpenParam();
list3.add(obj4);
obj4.setActionName("runTime");
obj4.setActionValue("3");
obj4.setSequence(1L);
obj1.setRecipeStepActionList(list3);
obj1.setDescription("搅拌3分钟");
obj1.setBusinessRecipeStepId(1L);
AlibabaAilabsIotBusinessRecipestepInsertorupdateRequest.ImageUrlParam obj5 = new AlibabaAilabsIotBusinessRecipestepInsertorupdateRequest.ImageUrlParam();
obj5.setImg("www.img.com");
obj5.setLarge("www.large.com");
obj5.setMedium("www.medium.com");
obj5.setSmall("www.small.com");
obj1.setImageUrl(obj5);
obj1.setOpenAccountId("0yl8oK0WFDBwEheQxSMD4g==");
obj1.setRecipeStepNameCn("搅拌3分钟");
obj1.setRecipeStepTime(180L);
obj1.setSequence(1L);
obj1.setTips("步骤提示");
AlibabaAilabsIotBusinessRecipestepInsertorupdateRequest.VideoUrlParam obj6 = new AlibabaAilabsIotBusinessRecipestepInsertorupdateRequest.VideoUrlParam();
AlibabaAilabsIotBusinessRecipestepInsertorupdateRequest.ImageUrlParam obj7 = new AlibabaAilabsIotBusinessRecipestepInsertorupdateRequest.ImageUrlParam();
obj7.setImg("www.img.com");
obj7.setLarge("www.large.com");
obj7.setMedium("www.medium.com");
obj7.setSmall("www.small.com");
obj6.setCover(obj7);
obj6.setDefaultUrl("www. defaultUrl.com");
obj6.setHeight(240L);
obj6.setHigh("www.high.com");
obj6.setStandard("www.standard.com");
obj6.setUltra("www.ultra.com");
obj6.setWidth(375L);
obj1.setVideoUrl(obj6);
obj1.setActionFlag(1L);
req.setParamBusinessRecipeStepOpenParam(obj1);
AlibabaAilabsIotBusinessRecipestepInsertorupdateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<alibaba_ailabs_iot_business_recipestep_insertorupdate_response>
    <message>null</message>
    <ret_code>200</ret_code>
    <ret_value>1</ret_value>
    <trace_id>1e0525b315754507465865759e</trace_id>
</alibaba_ailabs_iot_business_recipestep_insertorupdate_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部