Hi,
Refer this link,
it has all the details, still need any assistance let me know
Hi,
Refer this link,
it has all the details, still need any assistance let me know
Thanks for reply
But I am using simple HTTP reuqest
Could you please confirm that I am sending Body data is in correct format or not?
Really big thanks for your helpAPI_Test.xaml (8.2 KB)
Hi,
When I am tying to open the xaml, I am getting this error
Could not find type ‘HttpClient’ in namespace ‘http://schemas.uipath.com/workflow/activities’. Row: 63, Column: 10
same error only.
Hi Sarathi ,
one question.
Is following syntax is correct for HTTP Request Body?
{
"webServiceReq":{
"channelId":"RPA",
"cifId":"123456789",
"serReqId":"getlist",
"requestUUID":"12345678",
"request":
{
"custId":"0122345678"
}
}
}
Build your request using the http request builder and check whether that is working or not, I am not sure from where your are building the request body you are mentioning here
Hello Sarthi,
Please find the attached updated .xaml files.
Could you please have look on it .
ThanksHTTP API Test.zip (3.2 KB)
Hi @Rahul_S,
Am not sure whether you were able to resolve the issue.
But the spaces in the body are not supported by UiPath as valid.
Also, double quotes are supposed to be escaped by double quotes to ensure they are consumed as them.
So the required format should be:
“{”“webServiceReq”“:{”“channelId”“:”“RPA”“,…}”
Thanks!
Hi @Rahul_S,
Could you please let us know how you solved it?
I am facing below error:
“Error: Request is not a valid JSON”
Thanks!
Hi
I have Composed Body data in following format:
> "{""filedata"":""data:image/jpeg;base64,"+abc+""",""filename"":""1234.pdf"",""doc_name"":""abc""}"
Hope you got this.
Or else please send body format you are following
Thanks
Rahul
Hi @Rahul_S ,
Following are the formats that I tried, and they seem same as what you are using
(Diff between the two is one uses single quotes and the other uses double quotes - none of them seem to be working for me!)
“{“‘default_phone_number”‘:null,”‘password”‘: “‘1234”‘,”‘email”‘:”‘av@av.com”‘,”‘first_name”‘:”‘Joe”‘,”‘is_admin”‘: True,”‘last_name”‘:”‘Admin”‘,”‘permissions”‘:{“‘edit_apps”‘:True,”‘edit_cc_users”‘:True,”‘edit_data”‘:True,”‘edit_web_users”‘:True,”‘view_report_list”‘:,”‘view_reports”‘:True},”‘phone_numbers”‘:,”‘role”‘:”‘Admin”‘,”‘username”‘:”‘av2@av.com”‘}”
or
“{““default_phone_number”“:null,““password”“: ““1234”“,““email”“:”“av@av.com”“,““first_name”“:”“Joe”“,““is_admin”“: True,““last_name”“:”“Admin”“,““permissions”“:{““edit_apps”“:True,““edit_cc_users”“:True,““edit_data”“:True,““edit_web_users”“:True,““view_report_list”“:,““view_reports”“:True},““phone_numbers”“:,““role”“:”“Admin”“,““username”“:”“av@av.com”“}”
Thanks!
Could you please send Normal Body format without all those double quotes which you are using in Postman?
I will format it in proper way and will revert back to you.
Thanks @Rahul_S for helping out!
Tried with following formats, get the same error:
“{‘default_phone_number’:null,’password’: ‘qwer1234’,’email’:’av1@avtest.com’,’first_name’:’Joe’,’is_admin’: True,’last_name’:’Admin’,’permissions’:{‘edit_apps’:True,’edit_commcare_users’:True,’edit_data’:True,’edit_web_users’:True,’view_report_list’:,’view_reports’:True},’phone_numbers’:,’role’:’Admin’,’username’:’av1@avtest.com’}”
“{“default_phone_number”:null,”password”: “qwer1234”,”email”:”av1@avtest.com”,”first_name”:”Joe”,”is_admin”: True,”last_name”:”Admin”,”permissions”:{“edit_apps”:True,”edit_commcare_users”:True,”edit_data”:True,”edit_web_users”:True,”view_report_list”:,”view_reports”:True},”phone_numbers”:,”role”:”Admin”,”username”:”av1@avtest.com”}”
Following is the Postman body:
{
“default_phone_number”:null,
“password”: “qwer1234”,
“email":"av2@avtest.com”,
“first_name”:“AV”,
“is_admin”: true,
“last_name”:“Admin”,
“permissions”:{
“edit_apps”:true,
“edit_commcare_users”:true,
“edit_data”:true,
“edit_web_users”:true,
“view_report_list”:[
],
“view_reports”:true
},
“phone_numbers”:[
],
“role”:“Admin”,
“username":"av2@avtest.com”
}
Please try below format same as it is in Body
“{”“default_phone_number”“:”“null”“,”“password”“: ““qwer1234"“,”“email”“:”"av2@avtest.com””,”“first_name”“:”“AV”“,”“is_admin”“: ““True””,”“last_name”“:”“Admin”“,”“permissions”“:{”“edit_apps”“:”“True”“,”“edit_commcare_users”“:”“True”“,”“edit_data”“:”“True”“,”“edit_web_users”“:”“true”“,”“view_report_list”“:”“”“,”“view_reports”“:”“True”“},”“phone_numbers”“:”“”“,““role””:““Admin””,““username””:""av2@avtest.com”“}”
Please find the attached workflow for your reference.
Hope it will help.
HTTP Request.xaml (7.2 KB)
Hi @Rahul_S,
Thanks for checking in!
I tried your request body and ‘invalid json’ error has disappeared!
But new error is appearing as attached below:
The error should come only when the username in the request is already registered. The same username works perfectly fine in Postman. So not sure what else UIPath requires!
Thoughts?
Please check that you are passing all valid parameters along with request like Username, Password, Auth Type, etc.
Hi @Rahul_S,
No parameters were required in this request. Authentication was fine too.
Was able to resolve by reading JSON through a test file.
Thanks!
Hi Rahul,
can you help me with the body data structure to attach a pdf containing form