Why POST instead of GET for HTTP Method in Web Services?

Hi All,
Can I know why we are select POST method for account aggregation instead of GET?

Hi Theja! Welcome to this world :slight_smile: web services are implemented as developers want… as it is some standard that we generally use GET to search, POST to create, PUT to modify and DELETE to delete, this is not mandatory, and you can create your calls as you want.

I understand that some POST call was given to you for aggregation, I am right?

2 Likes

Hi @JackSparrow,

You have some specific ask regarding a HTTP method type, or you are facing some issue?

Can you please elaborate on the aks.

Thanks

Hi @jsosa, @ashutosh08
In web services connector documentation, I can see for account aggregation they have given POST in HTTP method. PFA. Hope it’s just an example.

What type of operation you select depends on the end system you are connecting to. You need to select the same type of operation that you would select in Postman to send a request to the end application you are getting the details from. Generally, it’s a GET operation to fetch data from any API, but some APIs may have POST operation configured for fetching the data as well

1 Like

Hi @JackSparrow, the screenshot and populated values are just for an example. In most of the cases, performing a GET operation retrieves data from an API; however, there are system APIs that support a POST operation for data retrieval. For example, Workday query language requires modify access (POST Method) for getting comments or descriptions fields associated with user-based security groups or getting security groups as well, it requires a modify access as the method is POST.

Similarly, there are many other systems where it is applicable.

Thanks!

Some times it is preferable to use post even for “GET” operations if you need to pass some sensitive information to get the data. For example, if you are trying to search an user based on ssn or mobile number, you would not pass your data as query params.

1 Like

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