View rule
    • PDF

    View rule

    • PDF

    Article Summary

    Summary

    Views a rule.

    Request

    Request URL

    GET {CLOUD_IOT_CORE_API_URL}/rules/{ruleName}
    
    Content-Type: application/json; charset=utf-8
    x-ncp-apigw-timestamp: {Timestamp}
    x-ncp-iam-access-key: {Sub Account Access Key}
    x-ncp-apigw-signature-v2: {API Gateway Signature}
    

    Path variables

    CategoryRequired statusTypeDescription
    ruleNameYesstringName of the rule

    Response

    Response body

    {
        "status": "string",
        "body": {
            "rule": {
                "name": "string",
                "description": "string",
                "status": "string",
                "query": "string",
                "modifyTime": "localDateTime",
                "registerTime": "localDateTime",
                "filterTopic": "string"
            },
            "actions": {
                "matchActionList": [
                    {
                        "type": "string",
                        "relatedProduct": "string",
                        "displayName": "string",
                        "modifyTime": "localDateTime",
                        "registerTime": "localDateTime",
                        "relatedProductAction": "json"
                    }
                ],
                "errorAction": {
                    "type": "string",
                    "relatedProduct": "string",
                    "displayName": "string",
                    "modifyTime": "localDateTime",
                    "registerTime": "localDateTime",
                    "relatedProductAction": "json"
                }
            }
        }
    }
    
    CategoryTypeDescription
    statusstringIndicates whether response was successful
    body.rule.namestringName of the rule
    body.rule.descriptionstringDescription of the rule
    body.rule.statusstringRule status
    body.rule.querystringrule query
    body.rule.modifyTimelocalDateTimeLast modified date
    body.rule.registerTimelocalDateTimerule creation date
    body.rule.filterTopicstringrule topic
    body.actions.matchActionList[].typestringAction role (M: matchedAction, E: errorAction)
    body.actions.matchActionList[].relatedProductstringAction type
    body.actions.matchActionList[].displayNamestringAction primary name
    body.actions.matchActionList[].modifyTimestringAction last modified date
    body.actions.matchActionList[].registerTimestringAction creation date
    body.actions.matchActionList[].relatedProductActionjsonAction details
    body.actions.errorAction.typestringAction role (M: matchedAction, E: errorAction)
    body.actions.errorAction.relatedProductstringError action type
    body.actions.errorAction.displayNamestringError action primary name
    body.actions.errorAction.modifyTimestringError action last modified date
    body.actions.errorAction.registerTimestringError action creation date
    body.actions.errorAction.relatedProductActionjsonError action details

    Response example

    {
        "status": "SUCCESS",
        "body": {
            "rule": {
                "name": "lux",
                "description": "turn off",
                "status": "ENABLE",
                "query": "select lux, bulb_id from \"myhome100/abc/+/abc\" where lux > -1",
                "modifyTime": "2020-09-27 12:52:08",
                "registerTime": "2020-09-27 12:52:08",
                "filterTopic": "myhome100/abc/+/abc"
            },
            "actions": {
                "matchActionList": [
                    {
                        "type": "M",
                        "relatedProduct": "REPUBLISH",
                        "displayName": "republish_a",
                        "modifyTime": "2020-09-27 12:52:08",
                        "registerTime": "2020-09-27 12:52:08",
                        "relatedProductAction": {
                            "topic": "republish_a"
                        }
                    }
                ],
                "errorAction": {
                    "type": "E",
                    "relatedProduct": "REPUBLISH",
                    "displayName": "republish_a",
                    "modifyTime": "2020-09-27 12:52:08",
                    "registerTime": "2020-09-27 12:52:08",
                    "relatedProductAction": {
                        "topic": "republish_a"
                    }
                }
            }
        }
    }
    

    Was this article helpful?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.