I'm running some test API calls in our 2.1.0-r22 cnMaestro instance and made a POST request to the /devices endpoint with the following JSON data:
{
"mac":"[my mac address here]",
"name":"(1394) TEST - DO NOT TOUCH - pre-approved device",
"type":"pmp",
"approved": true,
"description":"Pre-approved device by the Sonar-CNMaestro program."
}
Everything worked fine but the device was onboarded with the name "PMP-[last 6 mac address digits]" instead of the name that was posted in the JSON payload.
The device status since, via the API, deleting it and then adding in to cnMaestro is Offline. The "PMP-..." name appears as the device name in cnMaestro as shown below:
Another thing I noticed. I was watching the onboarding process when I added it and it initially stated under the "Added By" column as "Added by API" or something similar, then it switched to "Unsolicited" and its current onboarding status of "Onboarded with Errors".
We're investigating, but it is strange that it was online with recent info on its graphs and now it's offline and we can't even ping it, all after that onboarding.
We got it to work. Initially, when the error happened, the device was labeled as "Onboarded with Errors" with a red circle next to it. Now, with a correction in the configuration of the device it is now labeled as "Onboarded" with a green circle next to it, is online and with the name passed through the API as its device name. It is worth mentioning that I still saw the "PMP-[last 6 mac]" name while the device was onboarding, but at the end it changed to the one passed through the API. This leads me to believe that initially the device was not completely onboarded and thus its device name was left as "PMP-[last 6 mac]", which seems to be a temporary name used during the onboarding process.