09-19-2023 01:49 AM
Hello braintrust!
I have a problem that is related to configuring devices in vManage.
As far as I can read/understand about the vManage API i should be able to change device-template on a device (effectively changing config) by using the following endpoints:
1. {{url}}/dataservice/device
To get the uuid for the device i want to recofigure
2. {{url}}/dataservice/template/device
To get all available templates
3. {{url}}/dataservice/template/device/config/attachment (async, returns taskID)
To attach a new template to the device
4. {{url}}/dataservice/device/action/status/{{TaskID}}
To see status of the previous request since it is async.
Now every time i use the third (attachment) as described by the documentation: https://developer.cisco.com/docs/sdwan/#!sd-wan-vmanage-v20-12
I get errors.
A more experienced colleague found out that the problem seems to be that the supplied information in that payload is not enough. where can i find documentation that properly describes how this endpoint works (or where can i find an API guide that explains how to change config template on a device in vManage)
Best regards
/Mike
Solved! Go to Solution.
09-21-2023 08:56 AM
I am sure there was a simular thread about this sometime back, not sure if these are the two i am trying to recall, regarding the payload for this action. I think the one i am thinking of the user captured the payload in devtools.
09-19-2023 03:30 AM
The only way to get the full payloads i have found is to use the developer tools and capture the payload from UI. You might look at the SDK https://github.com/CiscoDevNet/sastre which will do all the heaving lifting for you.
Hope this helps.
09-21-2023 03:49 AM - edited 09-21-2023 03:49 AM
Thanks for replying,
This more or less confirmed that the endpoint needs full deviceinfo and not just deviceId and the new templateId... so it certainly was helpful.
I'll see if i can find an effective way of doing this without the sastre tool (even though it does alot of heavy lifting i am looking for a way to do this without 3rd party tools).
If i find a way that isn't terribly roundabout ill post it here and try to mark it as "Solution".
09-21-2023 08:56 AM
I am sure there was a simular thread about this sometime back, not sure if these are the two i am trying to recall, regarding the payload for this action. I think the one i am thinking of the user captured the payload in devtools.
09-22-2023 08:45 AM - edited 09-22-2023 08:46 AM
yes, the "api-template" link explained in better detail how to configure devices with the endpoints and it definitely confirmed what i could reverseengineer from the sastre tool. With that link i found the correct endpoint to gather the data necessary to post an attachment (I hadn't found the correct endpoint in the tool yet... i'm quite green at reading large codestructures with multiple folders/imports and stuff :P)
Thank you! because of you i got to end my week with some good news!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide