全部产品
云市场
云游戏

ListRules

更新时间:2020-07-27 11:56:58

描述

查询规则列表。

方法

GET

URI


openapi/instances/{instanceId}/rules GET

请求参数

参数 类型 是否必需 描述
instanceId String 通过实例ID查询
ruleType String selection 选品规则
operation 运营规则
sceneId String 指定场景id,
全局运营规则是关键字 global
status Sring DRAFT 草稿状态
EFFECTIVE 生效状态
PUBLISHING 发布中状态
INEFFECTIVE 已失效状态
FAILED 未生效状态
page Integer 指定页码,默认为:1
size Integer 指定每页展示条数,默认为10,限制:[1-50]
startTime Long 开始时间(秒级时间戳)
endTime Long 结束时间 (秒级时间戳)

返回参数

参数 类型 描述
RequestId String 当前请求的RequestID
Result List 规则列表
Headers Map 头信息详情
└X-Total-Count Integer 规则总数量

示例

请求示例

  1. GET /openapi/instances/{airec-xxxx}/rules?ruleType=xxx&sceneId=1234&page=1&size=10

返回示例

JSON 格式

  1. // 选品规则
  2. {
  3. "Result":[
  4. {
  5. "Status":"DRAFT",
  6. "GmtCreate":"2020-04-27T06:38:28.000Z",
  7. "GmtModified":"2020-04-27T06:38:28.000Z",
  8. "RuleId":"98493A14-D619-4E88-9F8D-108939817F9F",
  9. "RuleMeta":{
  10. "RuleMetaType":"SELECTION",
  11. "SceneId":"123",
  12. "PubState":"PUBLISHING",
  13. "SelectionParams":[
  14. {
  15. "SelectType":"QUERY_ITEM_TYPE",
  16. "SelectionOperation":"OPERATOR_EQUAL",
  17. "SelectValue":"atrical,image"
  18. }
  19. ]
  20. }
  21. }
  22. ],
  23. "RequestId":"76E2C51D-A2D7-4775-9FD8-2AB84B2A0CEF",
  24. "Headers":{
  25. "X-Total-Count":19
  26. }
  27. }
  28. // 运营规则
  29. {
  30. "Result":[
  31. {
  32. "Status":"DRAFT",
  33. "GmtCreate":"2020-04-27T03:17:21.000Z",
  34. "GmtModified":"2020-04-27T03:17:21.000Z",
  35. "RuleId":"123456789001122",
  36. "RuleMeta":{
  37. "RuleMetaType":"OPERATION",
  38. "SceneId":"123",
  39. "PubState":"PUBLISHING",
  40. "OperationParams":[
  41. {
  42. "OperationType":"MIX",
  43. "Settings":[
  44. {
  45. "Name":"image",
  46. "Value":10
  47. }
  48. ]
  49. },
  50. {
  51. "OperationType":"DIVERSIFY",
  52. "CategoryIndex":1,
  53. "Window":2,
  54. "Status":true,
  55. "DiversifyType":"TYPE_SHOP"
  56. },
  57. {
  58. "OperationType":"EXPOSURE",
  59. "ExposureSettings":[
  60. {
  61. "DurationSeconds":1234000,
  62. "Status":true,
  63. "ExposureType":"TYPE_EXPOSE",
  64. "ScenarioBased":true
  65. },
  66. {
  67. "DurationSeconds":123400,
  68. "Status":true,
  69. "ExposureType":"TYPE_CLICK",
  70. "ScenarioBased":true
  71. }
  72. ]
  73. }
  74. ]
  75. }
  76. }
  77. ],
  78. "RequestId":"76E2C51D-A2D7-4775-9FD8-2AB84B2A0CEF",
  79. "Headers":{
  80. "X-Total-Count":19
  81. }
  82. }


无结果

  1. {
  2. "RequestId":"8F81A922-6C81-46D6-B78C-CC35E16B1691",
  3. "Result":[]
  4. }

异常返回示例

JSON 格式

  1. {
  2. "Code": "InstanceNotFound",
  3. "Message": "The specified instance does not exist. Check the instanceId please.",
  4. "RequestId": "829F38F6-E2D6-4109-90A6-888160BD16C2"
  5. }