Skip to main content
Solved

Auto POST JSON file to API end point in schedule interval

  • October 24, 2024
  • 2 replies
  • 73 views

Forum|alt.badge.img

Hi Team,

 

I have a requirement, where i have a standard JSON body which need to be post every 10 mins to API endpoint , as response to post i will be getting the Orders payload from partner’s API. 

Need your expertise, help me to post this one JSON file over & over again to the API as input file. 

 

below is the JSON body to be posted. 

 

{

    "app_id": "RDCSBY01"

}

 

Best answer by lohith

Hi Pradeep,

Here is the script that generates the required static JSON file:

 

<arc:set attr="output.data">
{
  "app_id": "RDCSBY01"
}
</arc:set>
<arc:set attr="output.filename" value="JsonOut.json" />
<arc:push item="output"/>

You can configure this in a dedicated script connector and set the receive automation to trigger every 10 minutes.

This topic has been closed for replies.

2 replies

lohith
  • Employee
  • Answer
  • October 24, 2024

Hi Pradeep,

Here is the script that generates the required static JSON file:

 

<arc:set attr="output.data">
{
  "app_id": "RDCSBY01"
}
</arc:set>
<arc:set attr="output.filename" value="JsonOut.json" />
<arc:push item="output"/>

You can configure this in a dedicated script connector and set the receive automation to trigger every 10 minutes.


Forum|alt.badge.img
  • Author
  • Collaborator
  • October 25, 2024

hi Lohith,

 

Once again with your expertise, right solution for my request. 

Thank you really much appreciate your help.