cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1702
Views
0
Helpful
3
Replies

Prime using database variables with api call

tmkobayashi
Level 1
Level 1

i've been trying to use database variables in cisco prime. Here is what i got, a simple test template:

#foreach ($interfaceName in $interfaceNameList)

  #if($interfaceName == "GigabitEthernet1/6")

     interface $interfaceName

     description 'teste database'

  #end

#end

If a deploy this template directly from cisco prime, the deployment is successfull. However, when i try to deploy it from a api call i get this error:

"No Hibernate Session bound to thread., and configuration does not allow creation of non-transactional one here"

Here is the curl call:

curl -k -v -H "Content-Type: application/json" -X PUT --data-binary "@testeDatabase.json" -u user:password https://ip/webacs/api/v1/op/clitemplateConfiguration/deployTemplateThroughJob.json

Can anyone help me?

Thanks

3 Replies 3

Spencer Zier
Cisco Employee
Cisco Employee

What version of PI are you using?  Which patches, if any, have you applied?  Are you experiencing problems with any other API resources?

I'm using Cisco Prime 3.1 and i haven't installed any patch. So far i haven't experienced any problems with the API.

Hmm, OK.  Can you please try restarting the server?  If the problem persists, please capture the logs (via the UI, Administration > Logging then click the download logs button, it will take some time).  My email address is available on my profile (just be sure to login first), please email me and I can provide you with an upload location if you don't already have one.

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: