So right now, I am working on creating some voicemail functionality. As of right now, I am just testing some specific requests in Postman and in my browser. The weird part is only some of the requests are working, even though I'm getting the exact urls from the Cisco CUMI doc wiki. For example here are some requests that work fine:
- https://<server>/vmrest/users (Lists users)
- https://<server>/vmrest/mailbox/folders/inbox/messages?userobjectid=<userID> (Lists messages for a user)
- https://<server>/vmrest/messages/<msgID>/attachments/0/?userobjectid=<userID>&filename=voicemessage.wav (Returns recording of the message)
But some more basic queries such as:
For these I get a response that says INVALID_PARAMETER unable to create CML session for user: id=926b1ab8-829d-4a6d-a696-b109ca223e7b, message=CMLException: 0x46401 code in file CsCmlJni/CsCmlJniSessionFactory.cpp at line 116.
- DELETE https://<server>/vmrest/messages/<message-id>?userobjectid=<userobjectid>&harddelete=<true or false>
And then for this one I get an HTTP status 401 error - Domain not allowed
If anyone could shed some light on any of these I would appreciate it!
at least the first items look like you're authenticating with an admin user (i.e. a user that does not have a voice mail repository) - as such if you issue requests related to messages without explicit identifying the user ID to do that for you'll get those types of errors.
I just issued a GET to https://lindborgload7.cisco.com:8443/vmrest/mailbox/folders/inbox/messages
using the login and PW for a user with a mailbox and got that user's inbox list back as expected. I tried this for both the above 10.5 and and 11.5 system.
Not sure what's going on for your delete scenario - I'd have to test out a sample for that tomorrow when I can grab some time.
Thanks for the response. I didn't realize I couldn't access some of these urls from an admin's perspective. But I got it working now. As for the delete, I was testing my requests with Postman and for some reason it wouldn't go through, but when I switched over to ARC using the same request, it worked. Thanks for your help!