For getting access token manually I wrote a curl php code...<?php
$curl = curl_init();
$url = "https://auth.cloud.kaaiot.com/auth/realms/3bf748e2-3d22-46b3-b29f-1aad2e7a33e6/protocol/openid-connect/token?grant_type=client_credentials&client_id=fa98deb4-2180-47ac-9933-eb578bfe039a&username=hew@trizlabz.com&password=trizlabz1234#";
//SendMoveFrwdData
// $url = "https://cloud.kaaiot.com/cex/api/v1/endpoints/0c5b605a-a282-4d56-9656-366dd37b04cb/commands/MVFRWD?endpointId=0c5b605a-a282-4d56-9656-366dd37b04cb&awaitTimeout=5&commandTtl=60000";
curl_setopt($curl, CURLOPT_URL, $url);
//curl_setopt($curl, CURLOPT_HTTPHEADER, array('-X POST -H Content-Type: application/x-www-form-urlencoded','-d grant_type=client_credentials'));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'-H Content-Type: application/x-www-form-urlencoded',
));
$res = curl_exec($curl);
print_r($res);exit;
if($e = curl_error($curl))
{
echo $e;
}
else{
$decode = json_decode($res);
//echo '<pre>';print_r($decode->data);
foreach($decode->data as $data)
{
print_r($data);
// echo $data->first_name.' '.$data->last_name.'<br>';
}
}
curl_close($curl);
?>.....This is the code....But it is showing an error........." {"error":"RESTEASY003650: No resource method found for GET, return 405 with Allow header"} " This is the error.How to fix this?
Hello, I have the following json output from my device which I can't change:
{"type":"Feature","geometry":{"type":"Point","coordinates":[null,null,null]},"properties":{"loggerID":"7253","observationNames":["WindSpeed_Avg","WindDir_Avg","AirTC_Avg","AirRH_Avg","AirDP_Avg","Batt_volt_Min","PTemp"],"observations":{"time": "2022-05-10T17:28:45",:[0,0,23.08,38.44,8.16,12.02,31.6]}}}
I would like to extract the timestamp, and the weather data into kaaiot. Is there a way to preprocess these data for kaaiot service? Can I check somewhere raw data thate are comming to kaaiot?