All Products
Search
Document Center

DescribeRule

Last Updated: Jan 15, 2021

Queries detailed information about a rule.

Method

GET

URI

openapi/instances/{instanceId}/rules/{ruleId}

Request parameters

Parameter

Type

Required

Description

instanceId

String

Yes

The ID of the instance.

ruleId

String

Yes

The ID of the rule.

ruleType

String

Yes

The type of the rule. Valid values: selection and operation.

sceneId

String

Yes

The ID of the scene.

Response parameters

Parameter

Type

Description

RequestId

String

The ID of the request.

Result

Rule

The list of rules.

Examples

Sample requests

GET /openapi/instances/{airec-xxxx}/rules/{ruleId}?ruleType=xxx&sceneId=123

Sample responses

JSON format

// Item selection rule
{
    "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"
}

// Operations rule
{
    "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"
}

JSON format

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