cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2020
Views
0
Helpful
5
Replies

UCCX 12 - Configuration API CORS Policy

tsuntken
Level 1
Level 1

I have written a reskilling web application and it has been working great on UCCX versions 10 and 11. As soon as a users enters a skill number in the web form javascript runs using the UCCX Configuration API (REST) to update the skill immediately. I have not seen any documentation says this was added to UCCX 12.

 

Now that I am trying to use it on UCCX 12 I am getting CORS errors (see attachment). I have found commands in the CLI for adding domains/origins for CORS but they are only for the Finesse API, not the Configuration API.  

 

I have validated the API Calls do work using Postman and by simply putting them into a browser and enter the creds when prompted. . 

 

Anyone know if Configuration API calls and be made from a separate Web Server using javascript? If so, how to do it? 

 

Thanks

Tom 

 

 

 

5 Replies 5

Anthony Holloway
Cisco Employee
Cisco Employee
So, you set the CLI command, but are you sending the correct Origin header in your request? Can you share the value you used on the CLI, and the value of your Origin header?

I did the CLI commands but them realized those were only for the Finesse API, not the Configuration REST API. 

 

I have found that the CCX Configuration API Documentation Developer Guides (https://developer.cisco.com/docs/contact-center-express/#!previous-documentation-pdfs) from 10.5(1) to 11.6(2) all mention CORS support... 

CORS
Cross-origin resource sharing (CORS) is supported that allows you to place requests to configuration APIs from any origin.

 

The UCCX 12.0(1) guide doesn't mention it at all, the verbiage about CORS was removed.

 

So it does seem like it was removed in version 12+???? With no mention I cant tell. 

 

 

Ricko Suave
Level 1
Level 1

Hello! I'm facing the exact same issue while trying to do a pretty similar tool to play with skill via a webpage. Did you manage to get things work? I can also only find info related to Finesse API and not to UCCX Configuration API.

Thanks!!

Ricko

Hi @Ricko Suave ,

You mentioned in your question that you've figured "the commands in the CLI for adding domains/origins for CORS but they are only for the Finesse API,"
can you tell me what is the command, how and where do I need to run? I'm trying to go through 12.0 desktop doc but nothing relatable is mentioned there.

Steps to resolve CORS Error:

 

  1. Login to finesse CLI:

ssh user@<finesse_ip>

  1. Check if CORS is allowed

utils finesse cors status

  1. If CORS is not allowed, you can either
    1. Allow CORS for all origin: 

utils finesse cors enable_all 

 

OR

 

  1. Add origins to a list: 

 

utils finesse cors allowed_origin add http://origin1.com:[port], http://origin2.com:[port]

 

And then enable them:

 

utils finesse cors enable

 

  1. Check the status of CORS again
  2. If it still doesn’t work, Check for headers allowed in CORS

 

utils finesse cors allowed_headers list

 

  1. Match your request’s header with the list fetched above, if your request’s headers are missing in the above list, then either remove those headers from your request or add them to CORS allowed headers list using the below command:

 

utils finesse cors allowed_headers add header1,header2,header3