cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1796
Views
0
Helpful
6
Replies

CCX Editor: Parameter not found for POST Rest call (Json) in CCX Editor

ehtasham.malik
Level 1
Level 1

I need to call a Rest POST API (json ) in my ccx editor. I am using Make Rest Call node. The rest content Type is JSON. When i call that  API i received error "parameter not found", but actually i am sending the parameter in body. 




In the body i have given json parameter "cnic" but when i sent request  it throw me error NIC not found, its mean i am not able to send cnic parameter correctly. 

Screen shot is attached, any help is much appreciated

.

6 Replies 6

Samuel Womack
Level 5
Level 5

When I'm testing out whether or not an API is going to work..I use POSTMAN first..I would experiment with that..and then try to figure out what you might be doing wrong with the particular STEP you are trying to use on that platform..or in your case..you are passing the correct data..but there really isn't a NIC for the ID you passed as the param in the object..

https://www.getpostman.com

Thanks @Samuel Womack for your reply. 
Actually i have already tested this API in different tools, like Rest API client in intelliji idea, postman etc . And it works perfectly well. But when i run this inside the ccx client i got this error.

According to error its seems somehow i am not passing the correct data. 


I always build my API body as a string before the rest step so I can see what CCX is putting in the string.

Then in the Rest step just reference string in the body.

I also seem to recall problems escaping double quotes so I have tended to use double single quotes instead of backslash double quote.

Graham

So what  i needed to do ?? 
Should i create a string assign that expression string and  use that String inside the the body ? 

I am facing an issue with post API and I am using make rest call, the body i have given json parameters, in the below format.
u"{\"Amount\":\"Int_Amount\",
\"AccountId\":\"String_AccountId\"}".
I tried posting the required parameters using postman. there its working fine.
Whereas, while doing reactive debug in uccx tool,I sent request to post the body parameter,its goes to unsuccessful part of the make rest call, it throw me error as 400 bad request , it mean i am not able to send body parameters correctly.

Your help would be most appreciated.

Graham makes a good point..about creating a variable for the Body, however I found double single quotes do not work..so I believe you were on the right track with your var expression:

u"{\"name\":\"name\"}"

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: