查询一个规则的详细信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求头
该接口使用公共请求头,无特殊请求头。请参见公共请求参数文档。
请求语法
GET /v2/openapi/instances/[instanceId]/rules/[ruleId] HTTP/1.1
请求参数
名称 | 类型 | 位置 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|---|
instanceId | String | Path | 是 | airec-cn-o400whm78004 |
实例id |
ruleId | String | Path | 是 | xxx |
通过规则Id查询 |
ruleType | String | Query | 是 | selection |
selection 选品规则 operation 运营规则 |
sceneId | String | Query | 是 | xxx |
场景id |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
code | String | InternalServerError |
错误码 |
message | String | An internal server error occurred |
错误详情 |
requestId | String | 8F81A922-6C81-46D6-B78C-CC35E16B1691 |
请求id |
result | Struct |
返回详情结果 |
|
gmtCreate | String | 2020-04-27T06:38:28.000Z |
创建时间 |
gmtModified | String | 2020-04-27T06:38:28.000Z |
最后修改时间 |
ruleId | String | 98493A14-D619-4E88-9F8D-108939817F9F |
通过规则Id查询 |
status | String | DRAFT |
实例状态 |
示例
请求示例
GET /openapi/instances/{airec-xxxx}/rules/{ruleId}?ruleType=xxx&sceneId=123
正常返回示例
XML
格式
<result>
<gmtModified/>
<ruleId/>
<gmtCreate/>
<status/>
</result>
<code/>
<requestId/>
<message/>
JSON
格式
{"result":{"gmtModified":"","ruleId":"","gmtCreate":"","status":""},"code":"","requestId":"","message":""}
返回示例补充说明
```json
// 选品规则
{
"Result":
{
"Status":"DRAFT",
"GmtCreate":"2020-04-27T06:38:28.000Z",
"GmtModified":"2020-04-27T06:38:28.000Z",
"RuleId":"98493A14-D619-4E88-9F8D-108939817F9F",
"RuleMeta":{
"RuleMetaType":"SELECTION",
"SceneId":"123",
"PubState":"PUBLISHING",
"SelectionParams":[
{
"SelectType":"QUERY_ITEM_TYPE",
"SelectionOperation":"OPERATOR_EQUAL",
"SelectValue":"atrical,image"
}
]
}
}
,
"RequestId":"76E2C51D-A2D7-4775-9FD8-2AB84B2A0CEF"
}
// 运营规则
{
"Result":{
"Status":"DRAFT",
"GmtCreate":"2020-04-27T03:17:21.000Z",
"GmtModified":"2020-04-27T03:17:21.000Z",
"RuleId":"123456789001122",
"RuleMeta":{
"RuleMetaType":"OPERATION",
"SceneId":"123",
"PubState":"PUBLISHING",
"OperationParams":[
{
"OperationType":"MIX",
"Settings":[
{
"Name":"image",
"Value":10
}
]
},
{
"OperationType":"DIVERSIFY",
"CategoryIndex":1,
"Window":2,
"Status":true,
"DiversifyType":"TYPE_SHOP"
},
{
"OperationType":"EXPOSURE",
"ExposureSettings":[
{
"DurationSeconds":1234000,
"Status":true,
"ExposureType":"TYPE_EXPOSE",
"ScenarioBased":true
},
{
"DurationSeconds":123400,
"Status":true,
"ExposureType":"TYPE_CLICK",
"ScenarioBased":true
}
]
}
]
}
},
"RequestId":"76E2C51D-A2D7-4775-9FD8-2AB84B2A0CEF"
}
```
错误码
访问错误中心查看更多错误码。