ルールの照会
    • PDF

    ルールの照会

    • PDF

    Article Summary

    概要

    ルールを照会します。

    リクエスト

    リクエスト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

    項目必須の有無タイプ説明
    ruleNameYesstringルール名

    レスポンス

    レスポンスボディ

    {
        "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"
                }
            }
        }
    }
    
    項目タイプ説明
    statusstringレスポンスの成否
    body.rule.namestringルール名
    body.rule.descriptionstringルール説明
    body.rule.statusstringルールの状態
    body.rule.querystringルールクエリ
    body.rule.modifyTimelocalDateTime最終修正日
    body.rule.registerTimelocalDateTimeルールの作成日
    body.rule.filterTopicstringルールトピック
    body.actions.matchActionList[].typestringアクションロール(M: matchedAction、E: errorAction)
    body.actions.matchActionList[].relatedProductstringアクションの種類
    body.actions.matchActionList[].displayNamestringアクションの代表名
    body.actions.matchActionList[].modifyTimestringアクションの最終修正日
    body.actions.matchActionList[].registerTimestringアクションの作成日
    body.actions.matchActionList[].relatedProductActionjsonアクションの詳細
    body.actions.errorAction.typestringアクションロール(M: matchedAction、E: errorAction)
    body.actions.errorAction.relatedProductstringエラーアクションの種類
    body.actions.errorAction.displayNamestringエラーアクションの代表名
    body.actions.errorAction.modifyTimestringエラーアクションの最終修正日
    body.actions.errorAction.registerTimestringエラーアクションの作成日
    body.actions.errorAction.relatedProductActionjsonエラーアクションの詳細

    レスポンス例

    {
        "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",
                            "version": 1
                        }
                    }
                ],
                "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",
                        "version": 1
                    }
                }
            }
        }
    }
    

    この記事は役に立ちましたか?

    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.