dtype.org
Log in

Difference between revisions of "DSmartHome"

From dtype.org
(code for api gateway)
 
(API Gateway)
Line 14: Line 14:
 
         "value": {
 
         "value": {
 
             "N": "$input.path('$.value')"
 
             "N": "$input.path('$.value')"
 +
        },
 +
        "type": }
 +
            "S": "$input.path('$.type')"
 
         },
 
         },
 
         "description": {
 
         "description": {
Line 20: Line 23:
 
     }
 
     }
 
}
 
}
 +
</nowiki>
 +
 +
Test values:
 +
 +
<nowiki>
 +
{
 +
  "device": "test01",
 +
  "time": "01",
 +
  "value": "02",
 +
  "type": "testtype",
 +
  "description": "testdesc"
 
</nowiki>
 
</nowiki>

Revision as of 00:51, 30 July 2017

API Gateway

{ 
    "TableName": "dsmarthome",
    "Item": {
        "device": {
            "S": "$input.path('$.device')"
            },
        "time": {
            "N": "$input.path('$.time')"
        },
        "value": {
            "N": "$input.path('$.value')"
        },
        "type": }
            "S": "$input.path('$.type')"
        },
        "description": {
            "S": "$input.path('$.description')"
        }
    }
}

Test values:

{
  "device": "test01",
  "time": "01",
  "value": "02",
  "type": "testtype",
  "description": "testdesc"