cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
569
Views
2
Helpful
1
Replies

SD-WAN API Question

apfeil
Level 1
Level 1

I am running an API call using 20.9.3 and 20.12.1. I am trying to do /certificate/device/stage. The purpose is to stop data traffic by placing certificate of the device in staging mode. I am getting 405 Method Not Allowed. I am able to successfully grab a token. I also have another script that backs up the configuration of all devices working. I was just hoping somebody else has gotten this to work and can share?

 

<html>

<head>
    <title>Error</title>
</head>

<body>HTTP method POST is not supported by this URL</body>

</html>
1 Accepted Solution

Accepted Solutions

I think these need to go to TAC. as i would sounds like the API doc is wrong or missing information. I havent seen this API before the only reference i can find is this being used in SDK for SD-WAN and is listed as this - 

 

def stageDevice(vmanage, devInfo):
    """
    Stop data traffic to device
     
    Parameters:
    devInfo:	vEdge device info
     
    Returns
    response  (dict)
     
     
    """

    endpoint = f"dataservice/certificate/device/stage"
    response = vmanage.apiCall("POST", endpoint, devInfo)
    return response

 

It takes a single parameter, devInfo, which is a dictionary containing information about the vEdge device. The function returns a dictionary containing the response from the vManage API.  From the SDK it shows the API call. with the function using the vmanage.apiCall() method to make a POST call to the dataservice/certificate/device/stage endpoint, passing in the devInfo dictionary as the request body. 

The only other suggestion is capture the traffic from the UI in developer tools and see what is being sent in the request.

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

View solution in original post

1 Reply 1

I think these need to go to TAC. as i would sounds like the API doc is wrong or missing information. I havent seen this API before the only reference i can find is this being used in SDK for SD-WAN and is listed as this - 

 

def stageDevice(vmanage, devInfo):
    """
    Stop data traffic to device
     
    Parameters:
    devInfo:	vEdge device info
     
    Returns
    response  (dict)
     
     
    """

    endpoint = f"dataservice/certificate/device/stage"
    response = vmanage.apiCall("POST", endpoint, devInfo)
    return response

 

It takes a single parameter, devInfo, which is a dictionary containing information about the vEdge device. The function returns a dictionary containing the response from the vManage API.  From the SDK it shows the API call. with the function using the vmanage.apiCall() method to make a POST call to the dataservice/certificate/device/stage endpoint, passing in the devInfo dictionary as the request body. 

The only other suggestion is capture the traffic from the UI in developer tools and see what is being sent in the request.

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

Review Cisco Networking for a $25 gift card