05-24-2016 04:01 AM - last edited on 03-25-2019 07:30 PM by ciscomoderator
I have been facing the issue When I download the script from the rest
I am doing this "http://uccx-server/adminapi/script/download/mum.aef" and I have been getting this response from the server.
06-21-2016 07:48 AM
I have a similar problem: using a PowerShell function, I am able to download prompts from the UCCx server but it does not work when it comes to:
The function is global, e.g. I only pass the download type as a parameter ("prompt" or "script" or "document") so I am sure my URIs comply with the CCX dev guide.
If I try to download a document through a browser:
http://server_IP/adminapi/document/download/fr_FR/Printemps/FILE.xml
I get an HTTP 404 Not Found Error even though I can see the file in this folder.
If I try to download a script through a browser:
http://server_IP/adminapi/script/download/Site/Service.aef
I get an HTTP 500 Internal Server Error even though I can see the script in this folder.
Any idea?
Edit: If I collect a trace of the request / response, I can see that the UCCx server is sending the following error for a script:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<apiErrors>
<apiError>
<errorData>Internal Server Error</errorData>
<errorMessage>The server encountered an unexpected condition which prevented it from fulfilling the request</errorMessage>
<errorType>500</errorType>
</apiError>
</apiErrors>
And for a document:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<apiErrors>
<apiError>
<errorData>Not Found</errorData>
<errorMessage>Specified Resource does not exist</errorMessage>
<errorType>InstanceNotFound</errorType>
</apiError>
</apiErrors>
07-04-2016 11:56 PM
Ok so after many tests I was able to successfully download a script.
From what I can tell, the URL needs somehow to be different from a prompt download even if the developers guide tells the contrary:
So for example if I want to download the Service.aef script mentioned above, the URL must be:
http://server_IP/adminapi/script/download//default/Site/Service.aef
Instead of:
http://server_IP/adminapi/script/download/Site/Service.aef
I think the developers guide needs to be updated to reflect this.
As for a document download, unfortunately it seems to be unavailable using the REST API.
Any comment appreciated on this!
10-17-2019 02:12 PM
Thanks very much for your post. It was the only way I could download script files.
Question did you try downloading document files? I tried several methods and could download them.
10-18-2019 04:06 AM
As a matter of fact I tried again a few month ago on a 11.x version, but unfortunately it still did not work.
However now the Configuration API Developer Guide now lists a GET method for Documents:
So I suppose It can be achieved, but I haven't deployed any CUCM 12.x yet to test this.
10-29-2020 04:31 AM
unbelievable, but works. Many Thanks.
10-29-2020 07:04 AM
Thanks Maic, I'm glad the post could help someone.
But from your post I conclude that the documentation has not been updated and is still misleading people, its a shame...
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