创建发布任务

  • 请求路径:/openapi/cubecard/createTask

  • 请求方式:POST

  • 请求参数:

    名称

    类型

    是否必传

    说明

    publishType

    Integer

    发布类型

    • 2:灰度发布

    • 3:正式发布

    publishMode

    Integer

    灰度发布模式

    • 0:正式发布

    • 1:白名单

    • 2:时间窗

    taskDesc

    String

    发布描述

    greyEndtimeData

    String

    publishMode 为 2时必传

    灰度时间窗发布的结束时间,格式为 "YYYY-MM-dd HH:mm:ss",时间必须大于当前时间并且与当前时间的间隔小于 7 天

    greyNum

    Integer

    publishMode 为 2时必传

    时间窗灰度的人数

    whitelistIds

    String

    publishMode 为 1时必传

    白名单主键 ID,多个使用 , 分隔

    templateResourceId

    Long

    发布的资源包主键 ID

    greyConfigInfo

    String

    发布的高级规则条件,JSON 字符串,具体含义见下表:[{"ruleElement":"city","operation":1,"value":"上海市,北京市,天津市"},{"ruleElement":"mobileModel","operation":2,"value":"REDMI NOTE 3,VIVO X5M"},{"ruleElement":"osVersion","operation":3,"value2":"9.2.1","value1":"9.2.1","value":"9.2.1-9.2.1"}]

    高级规则说明

    名称

    类型

    说明

    ruleElement

    String

    规则类型

    • city:城市

    • mobileModel:机型

    • netType:网络

    • osVersion:设备系统版本

    value

    String

    规则值,多个使用","分隔。

    当 operation 为 3 或 4 时,value 值为 aa-bb 的格式,其中 aa 是较小的值,bb 是较大的值

    operation

    Integer

    操作关系

    • 1:包含

    • 2:不包含

    • 3:范围内

    • 4:在范围外

    如果 ruleElement 为 city、mobileModel 或 netType 时,operation 只有 1(包含)和 2(不包含);当 ruleElement 为 osVersion 时,operation 的值可以是四种里的任意一种。

  • 返回值

    456

    返回结果的为创建发布任务对应的主键。