vManage API /attachfeature returns HTTP 400 – Unable to update device template variables

moxapatel
Conversationalist

vManage API /attachfeature returns HTTP 400 – Unable to update device template variables

Hello everyone,

I’m encountering an issue when trying to update device template variables via the vManage REST API.
The API consistently returns an HTTP 400 Bad Request, even though the workflow follows Cisco’s documented process and mirrors the web UI “Change Device Values” operation.

Our goal is to automate template variable updates that are currently performed manually in the UI.


Workflow Attempted

Step 1 – Authentication
POST /j_security_check and GET /dataservice/client/token →  

Step 2 – Retrieve Device Info
GET /dataservice/device →

Step 3 – Get Template Info
GET /dataservice/template/device/config/attached/{templateId} →  

Step 4 – Get Current Variables
POST /dataservice/template/device/config/input → retrieved full variable list

Step 5 – Update Variables ( Failing )
POST /dataservice/template/device/config/attachfeature → HTTP 400 Bad Request


What I’ve Tried

  • Verified isEdited = true

  • Confirmed variable names match template fields

  • Ensured values are string type

  • Compared structure with working iTest automation payloads

  • Rechecked JSON against API documentation


Questions

  1. Is the payload for /attachfeature missing any required fields or structure?

  2. How can I get detailed error information for 400 responses?

  3. Is this the right endpoint, or should a detach/attach sequence be used?

  4. Does the web UI trigger additional backend calls that need to be replicated?

3 Replies 3
Oren
Meraki Employee All-Star Meraki Employee All-Star
Meraki Employee All-Star

I love the fact this community draws questions outside of the Meraki space.
That said, in the Catalyst SD-WAN community you are more likely to find relevant experts who can help with vManage APIs.

moxapatel
Conversationalist

Hi Oren, thanks for pointing that out, I wasn’t aware of the separate Catalyst SD-WAN space. Appreciate you guiding me to the right place!

Oren
Meraki Employee All-Star Meraki Employee All-Star
Meraki Employee All-Star

Good luck.
If you don't get an answer there, ping me here with a link to the post there, and I'll reach out to the relevant people.

Get notified when there are additional replies to this discussion.