I am new to this AWS IoT, i was able to get/update thing shadows using http api (https://endpoint/things/thingName/shadow), provided by AWS IoT, but i want the list of things created under my account. Documentation provides the way of getting list-things using AWS CLI, how can i achieve the same using rest-api ?
2
votes
1 Answers
0
votes
I found a solution for this, first i build up custom sdk for AWS IoT, using this link you can build, i selected AWS.IoT and AWS.IoTData and build a sdk. After importing that sdk to your solution, you can query like this :
var iot = new AWS.Iot({
"accessKeyId":"accessKeyId",
"secretAccessKey":"secretAccessKey",
"region":"region"
});
iot.listThings({}, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
You can find the API documentation here