API error: "Incompatible template and device types"

I’m having a similar issue when trying to send an update request with a template name and variables. In my case, I’m getting the error:

    "error": {
        "message": "Incompatible template and device types",
        "cause": "Incompatible template and device types"

The template works well within cnMaestro, even when applied to the same device I’m sending the PUT request for. My PUT request is just the “template” and “variables” keys. I made sure to copy/paste the template name and variable names within the template so there are not typos.

I’ve tried it with the device in the onboarding queue, not yet approved, and even after it was approved and its status to “online” instead of “onboarding”. I still get the same error. I’m running cnMaestro on-premise version 3.0.3-r32.

Any ideas as to what might be happening?

Thanks in advance

Hi @aerojean,

What type of device and device mode is this failing on?

Hello Jordan and thanks for the quick reply.

The device type is “pmp” and the device mode is “sm”.

Hi @aerojean,

I could reproduce this by creating a template and AP Group using the same name. I got the same error you did in the API and an error in the UI after the device was fully onboarded.

Did you attempt to apply this template to a device that was already onboarded or just in the onboarding page?

To work around this I recommend editing the name of the template to something not in use by an AP Group.

We have an existing ticket in our bug tracker to address this template/AP Group name collision scenario. I’ve increased its priority to get it fixed sooner.

1 Like

Thanks, I got it to work.

1 Like