cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
948
Views
0
Helpful
6
Replies

globally deleting a jabber contact using the API

Laura Mayer
Level 1
Level 1

Hello,

I am completely new to this. We recently upgraded Jabber and found it has no way to manage contacts on a global level. My boss demanded I find a way so I've been trying to do so. I can use the bulk upload to load them but I now need a way to globally delete a user from everyone's  list. I know the API does it and found this code axl-powershell-module - Powershell Module for interacting with Cisco's AXL API - Google Project Hosting.

But I can't seem to make it work. Is there another way to do this?

Thanks

Laura

1 Accepted Solution

Accepted Solutions

I don't know if you're able to use PHP, but here's a simple app that just logs in an app user, and then uses the session key to log in an end user.  That should get you started.  Please note that I'm overriding the default SoapClient in this sample app, because the PHP SoapClient gets the request URL wrong.  The advantage to doing this is that I can use this same override to print out the XML that it sends to the server, which helps immensely with debugging.  This sample also prints out the response data, which also helps.

Note also that you need the username/password (daggett/beaver) for the app user, but only the username for the end user (rogue).

View solution in original post

6 Replies 6

npetrele
Cisco Employee
Cisco Employee

I'm not familiar with powershell, so I can't comment about that.

However, you could write a script to do this with EPASSoap.  I can toss together a sample for you, but it will be a while before I can.  Our CIMP server is misconfigured right now after a server move, and I'm working on fixing that. 

Thanks Nicholas, if you do that that would be great. I'll see if I can find some information about EPASSoap in the meantime.

Thanks again

Laura

Here you go:

https://developer.cisco.com/fileMedia/download/a2ce9071-4c3b-4ad5-adaa-095153ea1b4c

Basically, you'd log in as an app user, get the session key, and then use that session key to log in each end user and delete the contact for each end user in the end user's groups. Here's some pseudo-code for how to do it:

sessionkey = login appuser

foreach (enduser) {

     end-user-session-key = login end user with appuser sessionkey

     foreach (group) {

          delete contact using end-user-session-key

     }

}

Thank you so much. I will take a look.

I don't know if you're able to use PHP, but here's a simple app that just logs in an app user, and then uses the session key to log in an end user.  That should get you started.  Please note that I'm overriding the default SoapClient in this sample app, because the PHP SoapClient gets the request URL wrong.  The advantage to doing this is that I can use this same override to print out the XML that it sends to the server, which helps immensely with debugging.  This sample also prints out the response data, which also helps.

Note also that you need the username/password (daggett/beaver) for the app user, but only the username for the end user (rogue).

Thanks again for all you're help. We don't have PHP, but this gives me an idea of how to use it.

Thank you for taking the time to do this. If only cisco would add a way to manage contacts like they have the bulk upload all of us thrust into this wouldn't have to bother you!

Thank  you so much

Laura