cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
368
Views
0
Helpful
3
Replies
Beginner

Renaming files in UCCX with the REST API - sanity check so I don't wipe out my production files

I'm looking to do a pretty simple operation of renaming prompt WAVs and then refreshing the associated script.

API guide that I'm using: https://developer.cisco.com/docs/contact-center-express/#!modify-file/sample-input-xml-modifying-a-script-file-name

 

Right now I'm just testing things out and I want to make sure I'm not going to accidentally wipe out all of my production prompts.  So I've created a folder named "ScriptDev" and put some test files in there and I want to run this PUT statement using Postman:

PUT  https://SERVERNAME/adminapi/prompt

JSON payload:

{
   "Script": {
      "File": {
         "path": "/en_US/ScriptDev/",
         "FileName": "1000.wav",
         "reNameTo": "1000rename.wav"
      }
   }
}

I want to be 100% certain that even though my URL is specifying the Resource Name of "prompt" I can ONLY affect prompts (or other files) in the folder path of "/en_US/ScriptDev/".  Can someone confirm this?

Everyone's tags (1)
3 REPLIES 3
Highlighted
Enthusiast

Re: Renaming files in UCCX with the REST API - sanity check so I don't wipe out my production files

I wouldn't trust the API with my production files either :)

Are you trying to rename the files dynamically as part of a call or an agent operation?
If not, then I'd recommend to backup your production files by downloading them with an sftp application (like filezilla), to get them off the server. Then either run your commands using the API, or rename the files on your dev machine and upload the altered files.

Beginner

Re: Renaming files in UCCX with the REST API - sanity check so I don't wipe out my production files

Thanks for the reply.  I'm trying to automate an annoying task with a script :)  The server is automatically backed up every night with two days of retention, so I'm not worried about losing data, it's really more about downtime.  Also we have dozens of scripts we hundreds of prompts so right-clicking and saving each prompt isn't really feasible.

Contributor

Re: Renaming files in UCCX with the REST API - sanity check so I don't wipe out my production files

>we have dozens of scripts we hundreds of prompts so right-clicking and saving each prompt isn't really feasible

You can download all scripts with one click and the same prompts if they are in a folder.

you download the folder and it zips all the scripts / prompts into a single file.

 

See below where I left clicked on the folder icon and all prompts in en-US folder are downloaded into a single zip file.

 

Gerry

downloadPrompts.JPG

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards