Sending data to API through HTTPs request Wizard

I am trying to send data to API throught HTTP request Wizard .

When I am sending POST request , I am getting response as Successful .

However , when I am giving File Path of Output data in Attachments section and Name fields value as any name ex .outputfile , I am getting below error.

There is already a parameter named outputfile . Please choose a different value .

no matter what field value in provide in name field(Attachments section), I am getting same message.

Can someone help me .

Hi @Niraj_Chandra,
Can you show some screenshots and properties you are using for HTTP requests? Maybe this could help other to understand where is the problem.

Hi Pablito,

Thanks for responding . unfortunately I cannot upload screen shot from office laptop (option is disabled) .however others have reported the same issue .
please check this link, it has screen shots as well

Hmmm maybe it’s not a perfect answer but have you tried maybe to worked on it with use of Postman application? It’s being very helpful when working with HTTP requests as you can build model there and then check if it’s working, finally doing the same in activity in studio.

Can you try sending the request just clicking ok instead of preview and check if you are getting any error?

1 Like

Hi, Postman was successful but HTTP request returned a null result. Have you experience this for HTTPS and how had you solve it?

Make sure that all parameters and header used by postman are properly provided in activity properties.

Here you go,

in Uipath for POST/PUT request your json body format should be like this :

β€œ{β€β€œeventTypeβ€β€œ:β€β€œuipathβ€β€œ,β€β€œURLβ€β€œ:”+β€œβ€β€œβ€ +URL.ToString+β€œβ€β€œβ€+β€œ,”+β€œβ€β€œSSOβ€β€œ:”+β€œβ€β€œβ€+SSO.ToString+β€œβ€β€œβ€+β€œ,”+β€œβ€β€œLogInStartTimeβ€β€œ:”+β€œβ€β€œβ€+LogInStartTime.ToString+β€œβ€β€œβ€+β€œ,”+β€œβ€β€œLoginEndTimeβ€β€œ:”+β€œβ€β€œβ€+LoginEndTime.ToString+β€œβ€β€œβ€+β€œ,”+β€œβ€β€œLoadTimeβ€β€œ:”+β€œβ€β€œβ€+LoadTime.ToString+β€œβ€β€œβ€+β€œ,”+β€œβ€β€œCacheFlagβ€β€œ:”+β€œβ€β€œβ€+CacheFlag.ToString+β€œβ€β€œβ€+β€œ,”+β€œβ€β€œStatusβ€β€œ:”+β€œβ€β€œβ€+Status.ToString+β€œβ€β€œβ€+β€œ}”

keys and values should be in double quotes then only it will work

Does it work the same for both HTTP and HTTPS? Previously, I dealt with HTTP requests and there was no issues.

It depends. HTTPS is secured and sometimes calls using this protocol requires additional parameters like api-key and/or username.

I have included it, likewise for Postman. However, it worked on both Postman and Python but not via HTTP Request

Thank you! However, it seems to be other issues. I did use the double quotes within it.

Can you let me know what is the error you are getting and how you are sending the data to the request please?

Hi, please view the error message in the image when I test the call. I’m trying to retrieve the access token via POST. Another attempted API call is retrieving the information via GET.

When conducting both calls, the results tend to be null

I was also getting statuscode = 0. one reason can be you have not passed the parameters correctly .

Have you used assign activity
like

Assign
json = β€œ{β€β€œeventTypeβ€β€œ:β€β€œuipathβ€β€œ,β€β€œURLβ€β€œ:”+β€œβ€β€œβ€ +URL.ToString+β€œβ€β€œβ€+β€œ,β€β€œβ€¦β€¦β€¦β€¦β€¦β€¦β€¦β€¦}”

and then passed json in HTTPrequest body .
also check is other parameters like
BodyFormat = application /json

Headers
Parameters are passed correctly .

It’s not a rocket science , it’s pretty simple .may be you are missing something .

if you really want solution please share screen shots of both postman and uipath ,then only others can analyze and help. if it is a sensitive data then you can mask/hide details in screenshot.

Hello All,

I am facing same issue with HTTPS URL and previously it was working fine with HTTP URL.
Is there any solution for this?

Thanks
Raji

Hi all, I managed to conduct an API call after including the cookies. However, after I call it multiple times, it results a status code of 0.

Any idea how it may have result the status code to be 0 when there is no issues with postman?