cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
560
Views
2
Helpful
4
Replies

vManage API documentation is lacking regarding configuration changes.

MikaelLindgren
Level 1
Level 1

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

Best Regards
/Mikael Lindgren
Tele2 Business AB
Umeå, Sweden
1 Accepted Solution

Accepted Solutions

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.

 

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

View solution in original post

4 Replies 4

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.

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

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".

Best Regards
/Mikael Lindgren
Tele2 Business AB
Umeå, Sweden

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.

 

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

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!

Best Regards
/Mikael Lindgren
Tele2 Business AB
Umeå, Sweden