<@U04S8PLJWMT> What is the best way to add a secon...
# ask-ai
k
@kapa.ai What is the best way to add a second query parameter that is required along with a cursor when using Cursor Pagination in the Connector Builder?
k
The best way to add a second query parameter required alongside a cursor when using Cursor Pagination in the Airbyte Connector Builder is to use the generic parameter section at the bottom of the stream configuration form. Here, you can freely configure additional query parameters, headers, or JSON body properties using Jinja expressions and available variables. If the standard pagination form does not support your use case (such as needing to add multiple parameters, apply conditional logic, or inject values into the URL path), you should: 1. Disable injection in the pagination form for the cursor. 2. Add both the cursor and the second required parameter in the generic parameter section, using Jinja templates to reference the appropriate variables (e.g.,
next_page_token
,
config
, etc.). For example, if you need to send both a
pagination_token
and a
type
parameter, you could configure them like this:
Copy code
yaml parameters:   - name: pagination_token     value: "{{ next_page_token['pagination_token'] }}"   - name: type     value: "required_value"
This approach allows you to combine multiple parameters as needed for your API requests, ensuring both the cursor and any additional required parameters are included in each request. For more details, see the documentation on [custom parameter injection](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/pagination#custom-parameter-injection).
k
@kapa.ai Using the Connector Builder, how can I add a query parameter only after the first request?
k
A message from kapa.ai
In the Airbyte Connector Builder, for pagination methods like Page Increment or Offset Increment, query parameters such as the page number or offset are, by default, not included in the first request (the first page is assumed to be implicit). If you want to add a query parameter only after the first request, you can use the default behavior. However, if you want to force the parameter to be included on the first request, you need to enable the "Inject Page Number on First Request" or "Inject Offset on First Request" option. If you leave this option disabled (the default), the parameter will be omitted from the first request and only included in subsequent requests. For example, with Page Increment pagination: - By default, the first request does not include the page parameter. - To include it on the first request, enable Inject Page Number on First Request. Reference: > By default, the first request doesn't include a page parameter (assuming the first page is implicit). Enable this option if the API requires an explicit page number in the first request. [Advanced Page Increment Options](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/pagination#advanced-page-increment-options) The same logic applies to Offset Increment pagination: > By default, the first request doesn't include an offset parameter (assuming offset=0 is implicit). Enable this option if the API requires an explicit
offset=0
parameter in the first request. [Offset Increment Pagination](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/pagination#offset-increment) Summary: - To add a query parameter only after the first request, use the default pagination settings and do not enable the "inject on first request" option. - If you need to customize this behavior for other parameters, the knowledge sources do not provide explicit instructions for arbitrary parameters, only for pagination-related ones.