Hello i am consuming an Rest API , below is my API ,
https://dev-mobile.xyz.com/sap/opu/odata/sap/abc/SiteEmpSet?$filter=CustCode eq {CustCode} and SiteCode eq {SiteCode} and OfficeCode eq {OfficeCode} and DivisionCode eq {DivisionCode} and SkillCode eq {SkillCode} and EmpNo eq {EmpNo}
This is ODATA , and all query parameters are type interger .
while test i am putting hradcoded values it is working fine but for dyanamic values it is throwing 400 Error code,
What is wrong?
Thanks in advance.
In may case API url is like below.
https://dev-mobile.xyz.com/sap/opu/odata/sap/abc_SRV/SiteEmpSet?$filter=CustCode eq '{CustCode}' and SiteCode eq '{SiteCode}'....
here , OutSystems is treating this {CustCode} as the FULL value of $filter,which makes fails . so i Create one input parameter with text datatype and then pass full condition my logic like pass full condition from logic: "CustCode eq '" + CustCode + "' and SiteCode eq '" + SiteCode + "'...."
and updated my API url like
...? $filter={FilterText}
and my issue gets resolved with this way. now i got 200 OK .
Thanks for all of you . thanks for your valuable time .
with the above link i got full details of my log and which help me to sortout the issue .
Hello,
Did you try comparing the URL before and after using dynamic values? Even a single extra space can cause the API to fail. I suggest checking both versions to see exactly how the request is being sent there might be an unintended space in one of the parameters, such as {SkillCode}. Make sure to trim and remove any extra gaps.
Hi,
I think you should check the API request with dynamic values via Integration log in Service Center and compare it with the API request with hardcode values to check malformed syntax.
Cheers,Nam
i tried to check all details but in integration logs cant find API request. this is what i am getting
@Bharat koshti : Please follow the steps
the above screen shot which i send is from the given location only. i can see only this information.
Not sure that's the correct screen short is. Please goto the integration log like below
Thanks but i have limited stack and details avalaible so i read some documenatation . below is the link for full logs.
Kilian wrote an quick post on how to enable this: https://www.outsystems.com/forums/discussion/33272/setting-logging-level-of-a-rest-api/
which help me to get more details and from this details i get to know root cause . but anyways thanks for your efforts . thank you again. i will explain my root cause n solution for this in next comment. so that other may face issue they will be use this.