cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2357
Views
0
Helpful
2
Replies

API call to get contents of an XML file Application > Document Management UCCX

CunningStunt
Level 1
Level 1

Hey everyone,

 

I am currently working on a project to make our lives easier for maintaining documents and I am trying to pull down the contents of all of the XML files on UCCX and displaying them in a web interface. 

 

What I am doing is getting a list of all of out XML files with the following api call:

GET

https://{server-Name-here}/adminapi/document/en_US/

 

This works perfectly and I am able to retrieve the list I need.

 

Then I take that list and want to pull the actual XML contents down. When I try to use the API all I get is file information and while I do use this info its not what I'm trying to do:

 

GET

https://{server-Name-here}/adminapi/document/en_US/some-xml-document.xml

Files>Document>Path>Filename..ect ect

 

If I make the call to the actual web app I am able to pull down the xml information using this. This is the same as clicking on the actual document within the webapp itself.  

 

GET

https://{server-Name-here}/appadmin/temp/some-xml-document.xml

 

The problem with this last get is if we haven't viewed the document within the webapp the temp file is never created and this fails.

 

Does anyone know if there is an API call to retrieve the actual contents of the Document files without having them to reside in the temp area on the webapp? 

 

Thanks! 

 

2 Replies 2

Nathan Gageby
Level 4
Level 4

I realize this is not exactly in line with the request but do you have the ability to write back a new file and what commands would that be?

Hi,

There is a REST method https://<server>/adminapi/{ResourceName}/download/{FilePath} that downloads the file from repository. But it works for Scripts and Prompts only.

Dariusz Pazdzior