I send you an example of how I get them with js
function getCommandTypes(id) {
$.ajax({
type : "GET",
url : sessionStorage.getItem('url') + "commands/types/",
cache: false,
data:{deviceId:id},
contentType: "application/json",
headers: {
"Authorization": "Basic " + btoa(sessionStorage.getItem('email')+":"+sessionStorage.getItem('password')),
"Accept":"application/json"
},
error: function (response) {
switch(response.status) {
case 400:
doOpenAlertError($.i18n("message_user_not_permission"));
break;
case 401:
doOpenAlertError($.i18n("message_user_unauthorized"));
break;
case 404:
doOpenAlertError($.i18n("message_user_no_matching"));
break;
default:
doOpenAlertError($.i18n("message_error_performing"));
break;
}
},
success: function (response) {
limpaSelect("type");
$.each( response, function( key, value ) {
insertOption("type", value.type,$.i18n("title_" + value.type));
});
}
});
}
Yes, that will be obtained, the list of all types of commands. But I am not asking that, but the internal attributes of each type of command. How do I get the correct attributes.
Good morning, there is some documentation where all the attributes of the commands are. Example: Periodic report, you need to send
frequency in seconds and password