Custom Connector API Pagination Issue

Summary

Need to format request body for API pagination in a custom connector to include ‘param’ field with ‘nPagina’ incrementing for all pages.


Question

Hello everyone. I am having some issues on paginating an API of a custom connector. I need to create a specific formatting of a request body on a POST like this:

{
“call”: “ListarMovimentos”,
“app_key”: “”,
“app_secret”: “”,
“param”: [
{
“nPagina”: 1,
“nRegPorPagina”: 5
}
]
}

Where the “nPagina” needs to increment to get all pages of the source.

Using the UI interface “Page Increment” strategy and Body JSON payload im getting this structure:

    "call": "ListarMovimentos",
    "app_key": "x",
    "app_secret": "x",
    "nRegPorPagina": 1,
    "nPagina": 5
  }```
Is ther a way to get this into the "param" field inside the request body?

<br>

---

This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. [Click here](https://airbytehq.slack.com/archives/C027KKE4BCZ/p1713536756283279) if you want to access the original thread.

[Join the conversation on Slack](https://slack.airbyte.com)

<sub>
["custom-connector", "api-pagination", "request-body", "param-field", "nPagina-increment"]
</sub>

It will get a little bit hacky and tricky. If you want to give me a link to your clloud workspace, and/or full yaml of your connector and test keys for me to try it out, I can take a look and make a video explanation for you.

What I would suggest you try is to set the pagination variable called “params”, like this:
• Page number variable: “params”
• Body JSON payload
• Value: { "nPageForPagina": "{{actual_value_here}}", "nPagina": 5 }
I.e if you need nested value, use the parent variable name and set the whole nested body as it’s value.

Which may or may not work depending on whether you need to set more child keys into this :wink: