All Products
Search
Document Center

ListScenes

Last Updated: Mar 29, 2021

We recommend that you do not call an API operation to manage scenes. Go to the Scene Management page in the AIRec console to manage scenes. For more information, see Create a recommendation scene by configuring item selection rules.

Description

Queries scenes of a specified instance.

Method

GET

URI

openapi/instances/{instanceId}/scenes GET

Request parameters

Parameter

Type

Required

Description

instanceId

String

Yes

The ID of the instance.

status

String

No

The status of the scene. Valid values: DRAFT, PUBLISHING, RUNNING, FAILED, and FROZEN.

Response parameters

Parameter

Type

Description

RequestId

String

The ID of the request.

Result

List

The list of scenes.

Examples

Sample requests

GET /openapi/instances/{airec-xxxx}/scenes

Sample responses

JSON format

{
    "Result":[
        {
            "Status":"DRAFT",
            "GmtCreate":"2020-04-23T06:08:48.000Z",
            "GmtModified":"2020-04-23T06:08:48.000Z",
            "SceneId":"123",
            "SceneMeta":{
                "SceneName":"sceneTest",
                "Description":"xxx",
                "Metric":{
                    "PvCtr":"32",
                    "Daily":"32",
                    "Weekly":"32"
                }
            }
        }
    ],
    "RequestId":"0D532E4F-899E-4A59-96B8-C7843A286A53"
}

Sample responses with no results

{
    "RequestId":"8F81A922-6C81-46D6-B78C-CC35E16B1691",
    "Result":[]
}

Sample error responses

JSON format

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