12-18-2020 05:40 AM
When sending a POST to another server, the CCX inserts a "?" at the end of the URL. The server responds with 200 however, because of the "?" the POST data is dropped by the server.
UCCX Status details: "POST https://{server name}/apiv1/coSpaces?
In Postman: https://{server name}/apiv1/coSpaces
I tried putting in a "/" after the URL
UCCX Status details: "POST https://{server name}/apiv1/coSpaces/?
How do I get rid of that "?" ?
John B
Solved! Go to Solution.
01-04-2021 01:23 PM
Right ok, so the Content-Type needs to match what you're sending the server. In UCCX, if you are sending a key/value pair of parameters, this is implying a url form encoded content type. I don't know where the ? is coming from, but it might actually not be your problem, just that it's the thing you noticed first.
12-22-2020 04:20 AM
After messing around with the headers I found that the basic URL is now completing to the server however, the Key items are not being sent. Is there some Header or otherwise that is required to get the Key pairs to transmit?
John B
12-22-2020 06:27 AM
Rest and post API message retry configuration methods
12-22-2020 07:04 AM
Postman is working fine; it's the UCCX script that is not working.
12-22-2020 09:10 AM
Are you using the Make REST Call step or something else? E.g., URL[] document literal.
12-22-2020 09:20 AM
Yes, using the Make REST Call step.
I am attempting to use UCCX to send configuration items to the Cisco Meeting Server by API. The CCX sends the POST just fine, but is not getting the Key pair to the CMS. I think it is because of the "?" that is inserted at the end of the URL, but there may be additional characters or something I am missing to get by that and actually send the Key pair.
John B
12-22-2020 10:16 AM
I'm not too familiar with the CMS API, but don't you send it an XML payload?
At any rate, can you post some details about the Make REST Call step and the data you're sending? Feel free to sanitize.
01-04-2021 08:02 AM
So My REST step has the URL (which CCX can connect to) and then I am putting Key pairs in the URL Parameters:
Method: Post
URL Parameters Names Values
"needsActivation" "true"
When I run Reactive debug, I can see the connection to CMS however, the Key pair is not sent.
In Postman I do the same by using the Body tab and the Key and Value
Does this make sense?
01-04-2021 12:28 PM
I think that makes sense, but doesn't the CMS API require an XML body? I guess not, since you're saying it works in postman. What did you set your Content-Type header to in the Make REST Call step? Can you provide a screenshot? Sometimes there are other clues to see if I can see your screen.
01-04-2021 12:37 PM
01-04-2021 12:42 PM
What's the value of your Content-Type?
01-04-2021 12:46 PM
Content Type: Application/XML.
I just noticed Postman has "x-www-form-urlencoded" selected. Is that something that should be in the Header?
Balaji stated I might need something in the Body during the Post. Right now the variable assigned to Body is blank.
01-04-2021 01:23 PM
Right ok, so the Content-Type needs to match what you're sending the server. In UCCX, if you are sending a key/value pair of parameters, this is implying a url form encoded content type. I don't know where the ? is coming from, but it might actually not be your problem, just that it's the thing you noticed first.
01-05-2021 08:36 AM
I solved this issue by doing the following;
1st MAKE REST = POST (to create the item in CMS)
2nd MAKE REST = GET (to find the Item ID)
3rd MAKE REST = PUT (with the Content Type = "application/x-www-form-encoded" and the information in the body, not the URL Parameters.
This script is going to read a list of over 2000 users and build their profiles, with a host PIN and a separate user PIN, in Cisco Meeting Server 1000.
12-23-2020 04:41 AM
cant you do it by attaching those in body?
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