cancel
Showing results for 
Search instead for 
Did you mean: 

POST web API

MichalBezak1
Level 3
HI All,

I have an issue with POST in web API services.

I got all parameters exposed and filled in action stage in process.

but I'm receiving an error msg that all field are required - dev guy told me that the msg is the same as when is send empty body

pls see bottom pics

anybody have idea why the body isn't send properly?
19978.jpg
19979.jpg
19980.jpg
19981.jpg


------------------------------
Michal Bezak
Devices@IBM ordering specialist
IBM ISC
Europe/Bratislava
------------------------------
9 REPLIES 9

Hi,

Have you set the Content-Type header to application/json ?

------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------

Hi Shashank,

Yes, that was most probably the issue. But now I'm receiving error 500, do You have idea what t can be. Body is same as above

19929.png


------------------------------
Michal Bezak
HW analysist
IBM ISC
Europe/Bratislava
------------------------------

Hi Michal,

Is this the error encountered after parsing the response or this is the raw response from http?

19934.png


------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------

It is raw response from HTTP. For now I do not have any response after parsing JSON for output parameters.

JSON body sent to API is:

{
"brandName": "[Brand Name]",
"geo": "[Geo]",
"country": "[Country]",
"mdNr": "[MDC Number]",
"createdDate": "[Today]",
"contractName": "[Contract Name]",
"projectName": "[Project Name]",
"submitterName": "[Submitter Name]",
"requesterName": "[Requester Name]",
"lob": "[LOB]",
"organization": "[R/NR]",
"requestDescription": "[Description]",
"reqType": "[Request type]",
"qtrYearNeeded": "[Quarter and Year]",
"authorizationQtrYear": "[Quarter and Year]",
"siteLocation": "[Site Location]",
"is3rdParty": [Leasing?],
"country2": "[Country2]",
"submitterBackup": "[Backup]",
"soCommercial": [SO Commercial?],
"sapCostCenter": "[Cost Center]",
"sapWbsElement": "[WBS Element]",
"sapRequestingOrder": "[Req order]",
"sapWorkStartDate": "[SAP Work Start Date]",
"sapWorkEndDate": "[SAP Work End Date]",
"profitCenter": "[Division Code]"
}


------------------------------
Michal Bezak
HW analysist
IBM ISC
Europe/Bratislava
------------------------------

And it is working when I put the original JSON format:

{
             "brandName": "CHQ - CIO",
             "geo": "Americas",
             "country": "ARGENTINA",
             "mdNr": "20M74421557.1",
             "createdDate": "2019-12-26",
             "contractName": "GBS Budget Project",
             "projectName": "ProjectX",
             "submitterName": "Michal.Bezak1@sk.ibm.com",
             "requesterName": "Michal.Bezak1@sk.ibm.com",
             "lob": "lob_for_test_BLA",
             "organization": "ORG_for_tes_arg",
             "requestDescription": "test reo",
             "reqType": "reqType_for_Test_arg",
             "qtrYearNeeded": "2Q2019",
             "authorizationQtrYear": "2Q2019",
             "siteLocation": "dsf",
             "is3rdParty": 1,
             "country2": "BANGLADESH",
             "submitterBackup": "Michal.Bezak1@sk.ibm.com",
             "soCommercial": 1,
             "sapCostCenter": "uh",
             "sapWbsElement": "bnj",
             "sapRequestingOrder": "iuh",
             "sapWorkStartDate": "2019-06-21",
             "sapWorkEndDate": "2019-06-22",
             "profitCenter": "abc",
             "extRefNumber": "zxce"
}



------------------------------
Michal Bezak
HW analysist
IBM ISC
Europe/Bratislava
------------------------------

I see. I am guessing one of the parameters might be causing the issue. I would suggest to try to identify which parameter might be causing the issue by comparing the two requests.
Also, Can you hardcode only is3rdParty and soCommercial in your json request and pass all the remaining parameters as earlier and see if that works. I am suspecting it to be issue related to data type.

------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------

Hi Shashank,

I got it. I didn't know that I cannot use the "?" in the parameter name

------------------------------
Michal Bezak
HW analysist
IBM ISC
Europe/Bratislava
------------------------------

Hi Shashank,

An observation,

Although we have supplied some of the common parameters and common headers with Data Type: Password, still their values are displayed in the Response Data Output, Can you please confirm whether this is a defect.

------------------------------
Manish Rawat
Project Manager
Mercer
New Delhi
------------------------------

@Manish Rawat I've opened this as a suggested change with the product team. At the moment, I think this is the way the solution is designed, but I would say it's not optimal from a security perspective.

Cheers,


------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------