12-17-2013 12:58 AM - edited 03-14-2019 12:53 PM
Hi everybody,
I have a question regarding changing agent skills automatically every night.
I've been told that it's possible to change agent skills back to "default" by using :
(found in Cisco-uccx-developer-guide-902.pdf)
Modify Resource
| |
---|---|
URI | http://<server>/adminapi/resources/{id} |
Example URI | http://<server>/adminapi/resources/{id} |
HTTP Method | PUT |
Content Type | Application/XML, Application/JSON |
HTTP Success Code | 200 |
HTTP Failure Codes | 401, 402, 405 |
Failure Response | - |
Error Codes | - |
But when I try I keep getting error 405 (Method not allowed) when using this script :
Try
Dim strHTTP = Request.ServerVariables("HTTP_HOST")
Dim strServerFile As String = strHTTP & "/Webpage/Cisco_files/XML_masterfile.xml"
Dim wc As WebClient = New WebClient
wc.Credentials = New System.Net.NetworkCredential(usernameGoesHere, passwordGoesHer)
wc.UploadString("http://10.146.102.13:8080/adminapi/resource/", "PUT", strServerFile)
Catch ex As Exception
Response.Write(ex)
End Try
Can anybody tell me what I'm doing wrong?
See attached XML file for file details
12-19-2013 02:50 PM
Hi G
Got it working now, all I needed to do was changing from :
myWebClient.UploadString(strRequestURL, "PUT", strServerFile)
to
myWebClient.UploadFile(strRequestURL, "PUT", strServerFile)
So thanks ypou many times for you patients and help - and I hope you have time for one last question.
Do my XML docoment need to have everything included or can I simplify the content somehow from
to just containing skills like this :
The reason for this is that teamnames in out webapplication are different from them in Cisco and same goes for some of the names
12-20-2013 01:07 AM
Hi,
actually, I have no idea. Unfortunately, I can't even test it right now because I don't have a version 9 UCCX in my lab :-(
G.
12-21-2013 06:31 AM
Great work Gergely - have given you some ratings for it
BTW I find that Poster (an add-on to Firefox) is a great tool for testing the UCCX REST API
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