How to POST/GET API method in http request activity

Hi All,

I am trying to pull data from Pega API by using activity “http request”. I am getting below error while using GET method. I am new in using API, please help me to resolve the same issue.

Error:

The SSL connection could not be established, see inner exception. —> System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. —> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch at System.Net.Security.SslStream.SendAuthResetSignal(ProtocolToken message, ExceptionDispatchInfo exception)

Please also find the header information and Json data that I am using to send GET request.

image

“{”“Service”“:{”“ServiceHeader”“:{”“RequestorID”“:”“RPA”“,”“RequestID”“:”“19186856"”},““ServiceBody””:{““CallReason””:““DEA””,““CallRequest””:{““Action””:““GetRPAVcatEntities””,““Body””:{““PageIndex””:““5"”,”“PageSize”“:”“5"”}}}}}"

@shekharhimanshu627,

I think your API endpoint expecting SSL Certificate for authentication.
Try passing it from configuration.

Thanks,
Ashok :slight_smile:

Hi @ashokkarale , After deleting “Host” from configuration parameter I am getting different error. I have tested these API in Postman and it is working fine. I ma attaching Configured parameter and error that I am getting.

Error:
image

Header Configuration:

image

I have doubt if I am using correct configuration in Header parameter.

@shekharhimanshu627,

Can you show how you are using in Postman?

@ashokkarale

Please find the below required data.

Json Body:

Json Response:

Header Configuration:

Thanks

have you provided the body payload. Can you show us (HttpRequest Properties Details)?

@ppr Thanks for your response.

Please find the below http request properties details along with Json Body.

Json Body:

“{”“Service”“:{”“ServiceHeader”“:{”“RequestorID”“:”“RPA”“,”“RequestID”“:”“19186856"”},““ServiceBody””:{““CallReason””:““DEA””,““CallRequest””:{““Action””:““GetRPAVcatEntities””,““Body””:{““PageIndex””:““5"”,”“PageSize”“:”“5"”}}}}}"

Thanks

@ashokkarale @ppr

Still I stuck with the same issue. Can you please help to let me know what I am missing here.

Thanks

when HTTPRequest Activity cause issues, then we try Postman as you already have done. The result (e.g. export a curl, the Python generated code) we can use for inspections and port it on HTTPRequest. In this step we also check, if we are touching possible limitations of the HTTPRequest Activity and its implementation.

We suggest for the next steps:

  • check the cookie handling and that it value is not outdated
  • export from POSTMAN
  • curl and Python code and if posible please share it with us

Thanks

Hi @ppr @ashokkarale
Issue has been resolved. It was due to passing some parameter in wrong format.

Thanks

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.