04-15-2015 07:36 AM
Hello,
I was finally able to figure out how to do this and I get a succeeded message but the contact list is not being updated. It worked great yesterday now of course when I sit down to document the steps it stops working. Can someone tell me why?
- <?xml version="1.0" encoding="UTF-8"?>
- <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:epas="urn:cisco:epas:soap"
- xmlns="urn:cisco:epas:soap">
- <soapenv:Header>
- <session-key>b2a9c7d9-b08e-a64f-1414-58f0039c5585</session-key>
- </soapenv:Header>
- <soapenv:Body>
- <delete-contact>
- <group name="MIS">
- <persona-id>lmtest</persona-id>
- </group>
- </delete-contact>
- </soapenv:Body>
- </soapenv:Envelope>
And the result:
- <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:xml="http://www.w3.org/XML/1998/namespace"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <env:Body>
- <epas:delete-contact-resp xmlns:epas="urn:cisco:epas:soap" >
- <epas:status ret-code="0" persona-id="lmtest" group="MIS">succeeded</epas:status>
- </epas:delete-co
- <?xml version='1.0' ?>
- ntact-resp>
- </env:Body>
- </env:Envelope>
but when I look at my contact list its still there.
Any ideas would be great.
Thanks
Laura
Solved! Go to Solution.
04-15-2015 10:29 PM
I tested it on servers with the same version. It says the operation succeeded even if you don't specify the contact correctly (which is a defect, IMO, and should be fixed). In that case, it will say it succeeded, but won't remove the contact you thought you wanted to remove. But if you specify the contact (persona-id) correctly, it does remove the contact.
First, make sure that the session-key is the session-key of the end user that includes the contact you want to delete. Then make sure you have specified the correct group and persona-id. The following works for me:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:cisco:epas:soap">
<soap:Header>
<urn:session-key>1cbaddaa-a230-2e64-3ccc-14bfc8fa0738</urn:session-key>
</soap:Header>
<soap:Body>
<urn:delete-contact>
<urn:group name="Nicholas Contacts">
<urn:persona-id>elmer</urn:persona-id>
</urn:group>
</urn:delete-contact>
</soap:Body>
</soap:Envelope>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Body>
<epas:delete-contact-resp xmlns:epas="urn:cisco:epas:soap">
<epas:status ret-code="0" persona-id="elmer" group="Nicholas Contacts">succeeded</epas:status>
</epas:delete-contact-resp>
</env:Body>
</env:Envelope>
Depending upon how your server is configured, you may need to add the domain, so that it looks more like this:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:cisco:epas:soap">
<soap:Header>
<urn:session-key>1cbaddaa-a230-2e64-3ccc-14bfc8fa0738</urn:session-key>
</soap:Header>
<soap:Body>
<urn:delete-contact>
<urn:group name="Nicholas Contacts">
<urn:persona-id domain="cisco.com">elmer</urn:persona-id>
</urn:group>
</urn:delete-contact>
</soap:Body>
</soap:Envelope>
04-15-2015 10:54 AM
What version of Cisco IMP (CUPS) server are you running? What version of CUCM?
04-15-2015 11:15 AM
Hi Nicholas,
cups = 10.5.1.10000-9
CUCM = 10.5.1.10000-7
Thanks
Laura
04-15-2015 04:31 PM
Thanks - I didn't forget about you. We had to fix our lab servers after moving them to a new location. They're working now, so I'll check into this tonight or tomorrow.
04-15-2015 10:29 PM
I tested it on servers with the same version. It says the operation succeeded even if you don't specify the contact correctly (which is a defect, IMO, and should be fixed). In that case, it will say it succeeded, but won't remove the contact you thought you wanted to remove. But if you specify the contact (persona-id) correctly, it does remove the contact.
First, make sure that the session-key is the session-key of the end user that includes the contact you want to delete. Then make sure you have specified the correct group and persona-id. The following works for me:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:cisco:epas:soap">
<soap:Header>
<urn:session-key>1cbaddaa-a230-2e64-3ccc-14bfc8fa0738</urn:session-key>
</soap:Header>
<soap:Body>
<urn:delete-contact>
<urn:group name="Nicholas Contacts">
<urn:persona-id>elmer</urn:persona-id>
</urn:group>
</urn:delete-contact>
</soap:Body>
</soap:Envelope>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Body>
<epas:delete-contact-resp xmlns:epas="urn:cisco:epas:soap">
<epas:status ret-code="0" persona-id="elmer" group="Nicholas Contacts">succeeded</epas:status>
</epas:delete-contact-resp>
</env:Body>
</env:Envelope>
Depending upon how your server is configured, you may need to add the domain, so that it looks more like this:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:cisco:epas:soap">
<soap:Header>
<urn:session-key>1cbaddaa-a230-2e64-3ccc-14bfc8fa0738</urn:session-key>
</soap:Header>
<soap:Body>
<urn:delete-contact>
<urn:group name="Nicholas Contacts">
<urn:persona-id domain="cisco.com">elmer</urn:persona-id>
</urn:group>
</urn:delete-contact>
</soap:Body>
</soap:Envelope>
04-16-2015 05:25 AM
I think that might be my problem:
"First, make sure that the session-key is the session-key of the end user that includes the contact you want to delete."
I am needing to delete this for all users like when someone leaves the company. I just took the session key from a webpage and pasting it. I thought it worked because as you said it said succeeded.
Is there a way to incorporate a session key into the delete request itself?
Thanks again for all your help and time.
Laura
04-16-2015 07:33 AM
It sounds like you want to delete a user from the system, not delete a contact from someone's roster. Is that the case?
Or are you trying to delete a contact from everyone's roster, but let that person remain in the system?
04-16-2015 07:47 AM
If the person leaves the company I want to delete them from the system and the rosters for everyone. Can I do that? If I can only delete them from the rosters I'll take that too.
Thanks
Laura
04-16-2015 01:08 PM
Hi Nicholas,
I had to call cisco there was something else going on as well. Its working now with the script you gave me above. Thank you so much for all your help as always.
Laura
04-16-2015 02:56 PM
Great, glad to hear you've got something working! If you want to delete a person from the system, you need to do that in CUCM, and then the delete operation will automatically sync to your CIMP/CUP server. You can do that manually in the CUCM web UI, or with AXL (not EPASSoap, but in administrative XML for CUCM). Here's an example:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/10.5">
<soapenv:Header/>
<soapenv:Body>
<ns:removeUser>
<userid>nicholas</userid>
</ns:removeUser>
</soapenv:Body>
</soapenv:Envelope>
The URI for this operation would be something like https://yourcucmserver.com:8443/axl/
04-17-2015 06:39 AM
Thanks as always Nicholas! Have a great weekend.
Laura
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