cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1718
Views
0
Helpful
2
Replies

prime 3.3 API update calls failing with internal server error

mh7000
Level 1
Level 1

I'd appreciate if anyone can share some minimal sample code that they have got to work against the 3.3 API to update virtual domain information.  I must be missing a crucial part of the process.

We’ve been working on allowing our end users to do as much as possible themselves, and as part of this, we have been allocating access points to virtual domains in Prime (3.3.0).

   

We currently auto provision them, but I’ve been trying to use the Prime API to then add them to the appropriate virtual domain.

 

I’ve used a Ruby script to list all the AP’s with a certain pattern (eg starting with xxx_), then listing all the AP’s in the XXX virtual domain, and getting a list of the differences.  This works ok (using a GET via the API).  However when I try to add the ID’s of the "missing" AP's to the Virtual domain I get a ‘500 Internal Server Error’.

   

I simplified the PUT to try to just update the string ‘description’ for the domain, but with the same result.  (Have tried Ruby, Shell, and Postman).

I have tried using various combinations of authentication, ie. full admin, domain "admin".

The query is (some names changed for "privacy")

 

PUT https://prime.my.domain/webacs/api/v3/op/vd?domainFQN=ROOT-DOMAIN/TestDom

{"vdUpdateDTO":{"description":"TestDom Virtual Domain 001"}}

   

the result is: 

<?xml version="1.0" ?>

<errorDocument>

    <httpResponseCode>500</httpResponseCode>

    <httpMethod>PUT</httpMethod>

    <message>Unable to update virtual domain</message>

    <exception>com.cisco.ncs.nbi.groups.vd.ops.VDServiceException: Unable to update virtual domain</exception>

    <uriPath>op/vd</uriPath>

    <queryParams>{domainFQN=[ROOT-DOMAIN/TestDom]}</queryParams>

</errorDocument>

 

log files show:

/opt/CSCOlumos/logs/localhost_access_log.txt:

a.b.c.d - - [14/May/2018:14:49:49 +1000] "PUT /webacs/api/v3/op/vd?domainFQN=ROOT-DOMAIN/TestDom HTTP/1.1" 500 380

/opt/CSCOlumos/logs/xmpNbiFw.log:

[2018-05-14 14:32:03,837] [https-jsse-nio-443-exec-69] [nbifw] [INFO ] - [Request PUT-https://prime.my.domain/webacs/api/v3/op/vd?domainFQN=ROOT-DOMAIN/TestDom]

[2018-05-14 14:32:03,891] [https-jsse-nio-443-exec-69] [nbifw] [ERROR] - [Application exception during performOperation: com.cisco.ncs.nbi.groups.vd.ops.VDServiceException: Unable to update virtual domain, com.cisco.ncs.nbi.groups.vd.ops.VDServiceException: Unable to update virtual domain]

[2018-05-14 14:32:03,891] [https-jsse-nio-443-exec-69] [nbifw] [ERROR] - Exception [com.cisco.xmp.web.XMPWebApplicationException: HTTP 500 Internal Server Error].

com.cisco.xmp.web.XMPWebApplicationException: HTTP 500 Internal Server Error

        at com.cisco.xmp.web.OperationsHelper.performOperation(OperationsHelper.java:366)

        at com.cisco.xmp.web.VersionedOperationsHandler.invokeVersionedOperationPut(VersionedOperationsHandler.java:210)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        ...

2 Replies 2

jturner2720
Level 1
Level 1

Did you manage to work out what the root of this problem was?

I'm getting a similar error trying to update a VD in 3.6u1

abukharo
Cisco Employee
Cisco Employee

Hello!

The API PUT "/webacs/api/v4/op/vd" has the mandatory attribute in payload - "domainName"

If you don't want to change domain name you should provide the current domain name.

 

For example:

PUT https://prime.my.domain/webacs/api/v3/op/vd?domainFQN=ROOT-DOMAIN/TestDom

{"vdUpdateDTO":{"description":"TestDom Virtual Domain 001", "domainName":"TestDom"}}

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: