12-20-2019 11:52 AM - edited 12-20-2019 12:28 PM
Hello,
Our company has been tasked with producing a monthly report that shows all phones that have moved to new locations and their associated ERL, we need to provide both the old and ERL information. We have been working with TAC and so far the only way we have been able to obtain this data is to parse it out from the phone tracking logs. However, there is no way to automate the export of these logs. TAC suggested I reach out here to see if there's anything we could set up through the CER API. Any help is appreciated.
We are on CUCM 12.0.1.22900-11 & CER 12.0.1.10000-4, and we are tracking phones by IP subnet.
Thanks!
Scott
12-21-2019 07:12 AM
You can use the /switchport/info from CER API:
This would be relatively easy to do. I've built programs to pull data from CER with Python, but this can be done with any programming language. You just run your program at desired day and it would compare the last results and provide the delta you are looking for.
01-02-2020 11:26 AM
Thank you Chris!
I have a couple questions...first, since we are tracking on IP Subnet and not switchport, I assume we would be able to use the ipsubnet/info API?
Also, regarding the account used for access... We had been trying to accomplish obtaining this data by pulling the phone tracking logs from the CLI, and we created a separate account with privilege level 0, which worked fine for just pulling the logs to an external server. Would this work for the API, or would we need to create an account with higher level privilege? Looks like this is a read-only operation, but just wanted to confirm.
Thanks for your help,
Scott
01-02-2020 12:17 PM
Correct, there is ipsubnet/info
API that can be used.
The CLI users are completely different from Applications users which would be required for the API authentication, does not look like the API documentation specifics required, but based on defined ROLES in CER I would think you need to make the user part of the Emergency Responder System Admin Group:
02-05-2020 12:55 PM
Thanks, we are having some issues, we keep getting a 404 page not found or 406 errors when attempting to access the API. I have set up an application user account and added to the Emergency Responder System Admin Group. I verified I can log in to the Web Interface with the user account. Is there anything else we may need to change in CER to allow the API to work?
I can send a screen shot of the error if needed...
Thanks,
Scott
02-06-2020 06:13 AM
To eliminate user permissions issues are you able to authenticate using the master CER application account?
02-06-2020 11:04 AM
Thanks - We just tried using the master application account and got the same error...
02-06-2020 12:26 PM
So, when you browse to this for example:
http://{CER-IP}/cerappservices/export/switchport/info
Are you prompted for username and password? After entering it what do you get?
02-06-2020 02:32 PM
02-06-2020 03:05 PM
What do you get for this:
http://{CER-IP}/cerappservices/export/authenticate/status
02-06-2020 03:26 PM
yeah, get the same error for that one as well...
02-11-2020 09:55 AM
Hi Chris, just wanted to follow up to see if you had any other suggestions on what we can try or check to see if we can get the API working.
Thanks,
Scott
02-11-2020 10:35 AM
Have you tried connecting from another machine and/or another web browser? The URL should return something in XML format as documented in the reference guide.
02-11-2020 02:52 PM
Yes, I have tried from Chrome, IE, and Edge, and tried from a jump box sitting on the same subnet as the CER server, and my laptop on a different subnet, and still get the same error every time, I don't ever get a prompt for a username/password, all my attempts always come back immediately with the HTTP Status 404 - Not Found error
02-12-2020 06:53 AM
Odd, outside of trying to reboot the CER server(s) or restarting Tomcat service I have no other suggestions.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide