cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
378
Views
0
Helpful
1
Replies

Updating CLI template from the API not working

dodgerfan78
Level 1
Level 1

I have retrieved a CLI template from the API and performed an update on it. In this case I replace the NTP server string. If I have no devices attached to the template, the update appears in the vManage GUI. If there are devices attached, the template does not get updated even though the process kicks off in the vManage task list. In this particular API request I am copying pretty much verbatim the entire process as seen from the Developer Tools plugin of my browser.

 

Here is the URL:

 

{{vmanage}}/dataservice/template/device/config/attachcli
 
The payload is in this format:
 
    payload = {
        "deviceTemplateList": [
            {
                "templateId": template_id,
                "device": devices,
                "isEdited": "true",
            }
        ]
    }
 
where:
 
  • template_id is the template ID in question
  • device is a list of the devices attached to the template (including the updated "templateConfiguration" key
 
Any idea what could be wrong? I thought maybe my templateConfiguration string wasn't formatted properly (e.g. newlines or some other issue) but vManage is not giving any errors. It says the template was updated but the NTP server has not been updated.
 
Any ideas?
 
Thanks,
 
Bryan
1 Reply 1

@dodgerfan78  When you create a CLI template through REST API, add this input parameter: "cliType":"device" to the REST API. If this input parameter is not added, the CLI template fails to attach to the device.

 

Notes: https://www.cisco.com/c/en/us/td/docs/routers/sdwan/release/notes/vedge-20-3/sd-wan-rel-notes-20-3.html

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io