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

API of Cisco Prime block me Access

scottdeeley
Level 1
Level 1

Hi ,

     I have an issue with API of Cisco Prime Infrastructure.

     I will try to explain at my best the problem I have :

     First of all , I need to monitor all devices that are connected to the Prime infrastructure in proactive.

     For that I have a script, this will run every 5 minutes to get information.

     The first Section connect to the API and get all devices with status Unreachable.

     The Second section connect to the API and get all new events that contain "is down" into description

     The Third section connect to the API and get all new events that contain "is up" into description.

     This means I have 3 connections every 5 minutes to the API.

     I try to make my script run every 10 minutes and I receive the same Error.

     I try to make my script run every 15 minutes and I receive the same Error.

     When I start the script everything goes well. But after 30 minutes when I try to connect to the API, I receive this error :

     The remote server returned an error: (401) Unauthorized

Is anyone can help me with this issue?

Thanks you for help in advance

2 Replies 2

Spencer Zier
Cisco Employee
Cisco Employee

Can you confirm: you are receiving successful responses (HTTP status 200) for about 30 minutes and then the 401 errors start happening?  What version of Prime Infrastructure are you running?  Do you have TACACS, SSO, or any other AAA provider enabled on Prime Infrastructure?  Can you include the body of the response you get from the server when the 401 happens?

Hi Spencer,

     Thanks you for your help.

     I just change my request by HttpWebRequest in Asp.net

     And I add KeepAlive = false

And now everything work fine.

Thanks you