get JSON data, through an outsystems URL using cURL (get data from POST message)

Hi, how can i get the json api response in the POST message, by only giving my outsystems url link to my client.? Is this possible? are there tutorials that i can see? If someone can help, I would really appriciate it. Thank you

Hi Marvei,

You can follow this course on integration with webservices, this will help you.

https://www.outsystems.com/learn/courses/116/integrating-with-web-services/

Nikhil Gaur wrote:

Hi Marvei,

You can follow this course on integration with webservices, this will help you.

https://www.outsystems.com/learn/courses/116/integrating-with-web-services/


I already followed the course, but there is no example getting data using the post message 

Let me share my understanding about your question. 

You want to create a POST API and in its response want to send your response data. Is this what you want?

Nikhil Gaur wrote:

Let me share my understanding about your question. 

You want to create a POST API and in its response want to send your response data. Is this what you want?

No sir, The API is created already. I only need to send an outsystems link to my client. and i need to get the json data from the api to my outsystems application and populate a table. The API uses curl method to send data. JSON data is passed through the POST message


Nikhil Gaur wrote:

Let me share my understanding about your question. 

You want to create a POST API and in its response want to send your response data. Is this what you want?


It's the other way around. I want to get the data from an existing API. All i need to send to my client is a link that would serve as a listener to the JSON data if a transaction occurs.

Sorry dear, but your replys are very confusing.

Here is what I understand from your previous comment. 

You have an API which accepts json data in POST. Now you want to give its link to your client so that he can call it.

Am I right? In that case what is the issue? Because creating POST API is explained in the tutorial already and for calling it using cURL you can use below request

curl -X POST \
  https:/XYZ.outsystemscloud.com/YourAppName/rest/API/Action \
  -H 'content-type: application/json' \
  -d '{
  "attribute1":"attribute 1 content",
  "attribute2":"attribute 2 content"
}'

Nikhil Gaur wrote:

Sorry dear, but your replys are very confusing.

Here is what I understand from your previous comment. 

You have an API which accepts json data in POST. Now you want to give its link to your client so that he can call it.

Am I right? In that case what is the issue? Because creating POST API is explained in the tutorial already and for calling it using cURL you can use below request

curl -X POST \
  https:/XYZ.outsystemscloud.com/YourAppName/rest/API/Action \
  -H 'content-type: application/json' \
  -d '{
  "attribute1":"attribute 1 content",
  "attribute2":"attribute 2 content"
}'

I'll Try this thank you