Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

The 4th edition of the Campaign Community Lens newsletter is out now!

Getting data through external API activity with varying amount of data in the response

Avatar

Level 1

Hello,

 

I'm trying to use external API activity to read some data from the endpoint. The issue is that response mapping might be different depending of how many rows of data will there be in the response table.

 

So, if there are 2 records in the response, it will look like this:

 

{
   "message":"OK",
   "total":1,
   "page":1,
   "page_size":100,
   "payload":[
      {
         "title":"abc1",
         "nickname":"xyz1",
      },
      {
         "title":"abc2",
         "nickname":"xyz2",
      }	  
   ]
}

 

and if there will be 3 records it will look like this:

{
   "message":"OK",
   "total":1,
   "page":1,
   "page_size":100,
   "payload":[
      {
         "title":"abc1",
         "nickname":"xyz1",
      },
	  {
         "title":"abc2",
         "nickname":"xyz2",
      },
	  {
         "title":"abc3",
         "nickname":"xyz3",
      }
   ]
}

and so on.

 

So I can't specify a strict format in "Outbound mapping tab", thus "Column definition tab" is also not prepared. 

 

Can I somehow configure External API activity for this case to accept varying amount of data in the response?

0 Replies

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now