Created by: John Farley on 19-08-2010 08:21:20 PM Does anyone have experience with or information about using CUPI in a .NET environment? I know AXL for CUCM requires a proxy class to work in .NET. Most helpful would be an example of connecting to CUPI and performing basic operations in C#.NET. Thanks, John
Subject: RE: Using CUPI in a .NET environment Replied by: Matthew Penning on 19-08-2010 08:21:20 PM Hi John - I don't have a C# example using CUPI specifically, but there's a couple of basic examples of making general REST request here: http://rest.elkstein.org/2008/02/using-rest-in-c-sharp.html Also I can tell you that you don't need a proxy class - this are just plain old HTTP requests. - Matt
Subject: RE: Using CUPI in a .NET environment Replied by: John Farley on 19-08-2010 08:21:20 PM Thanks, Matt I was able to get the GET method to return all CUC users using C#.NET and following the examples you posted. I just had to add credentials and invoke ServerCertificateValidationCallback to get around validation of the local cert on the CUC box. But when I try to add or update a user following the examples in the wiki on this site, CUPI returns "<405> Method Not Allowed". "Protocol Error". I tried confirming the method and parameter names in the WADL, and both seem to match up. I tried calling the CUPI methods using both HttpWebRequest and WebClient classes in C#.NET with no success. Any ideas? John
Subject: RE: Using CUPI in a .NET environment Replied by: Matthew Penning on 19-08-2010 08:21:20 PM Hi John - one of the more subtle things in REST is that the content type is very important. If you aren't already, try setting the "Content-Type" header to "application/xml" when you post the user XML. - Matt
Subject: RE: Using CUPI in a .NET environment Replied by: John Farley on 19-08-2010 08:21:20 PM Thanks, Matt. I got it working by forcing basic authentication in the message header as follows: byte authorizationHeaderBytes = System.Text.Encoding.UTF8.GetBytes("<user>" + ":" + "<password>"); string authHeader = "Basic " + Convert.ToBase64String(authorizationHeaderBytes); client.Headers.Add("Authorization", authHeader); The above code replaces the previous authentication line: client.Credentials = new System.Net.NetworkCredential("<user>", "<password>"); The next challenge is to enable and add an address to the SMTP notificaiton device type for each user. Users created with CUPI in my testing have an SMTP notification type already that is disabled. Maybe this comes from the template? Could you post an example of updating a user's SMTP notification device to set "Active" to true and write to the "SmtpAddress" value? John
Subject: RE: Using CUPI in a .NET environment Replied by: John Farley on 19-08-2010 08:21:20 PM I got it: client.UploadString("https://<connection-server>/vmrest/users/<SubscriberObjectId>/notificationdevices/smtpdevices/<ObjectId>", "PUT", "<SmtpDevice><Active>true</Active><SmtpAddress>firstname.lastname@example.org</SmtpAddress></SmtpDevice>"); I just have to query for the newly created user to get the <ObjectId> of the SMTP Device before calling the above method. John
Lately I have received a few requests from people asking if it was possible to Archive a Webex MessageSpace as in "download all messages".Interesting.
You can download all messages using the messages API but that leaves yo...
On May 10th 2021 a new API component was added: SPACE Tabs!
We call them ROOM tabs to be consistent with the room (space) API. Room Tabs represent an always available tab that is added as a tab in the space. It is co...
Hello, Does anybody know why the Call Costume Variable Report does not match the number of Handle calls total from Contact Service Queue Activity Report? I have removed all Contact Disposition and focus on the Handle (2) calls and still, it doesn't m...
Hi allI wondering if anyone can help me with this issue. We have multiple UCCX11.6.2 HA clusters within our environment and have been having an issue with calls getting though the UCCX script queue and disconnecting when they are being presenting to ...