Query Parameters Specifies the query parameters th...
# ask-ai
h
Query Parameters Specifies the query parameters that should be set on an outgoing HTTP request given the inputs. Example values {"unit":"day"} {"query":"last_event_time BETWEEN TIMESTAMP \"{{ stream_interval.start_time }}\" AND TIMESTAMP \"{{ stream_interval.end_time }}\""} {"searchIn":"{{ ','.join(config.get('search_in', [])) }}"} {"sort_by[asc]":"updated_at"} i have list of orgunits how cani pass them into query parameters
k
To pass a list of
orgunits
as query parameters in Airbyte, you can use Jinja expressions to join the list into a comma-separated string, which is a common pattern for APIs that accept multiple values in a single query parameter. Assuming your list of
orgunits
is available in the config as
config['orgunits']
, you can define your query parameter like this:
Copy code
json {   "orgunits": "{{ ','.join(config.get('orgunits', [])) }}" }
This will result in a query parameter like
?orgunits=unit1,unit2,unit3
if your config contains
["unit1", "unit2", "unit3"]
as the value for
orgunits
. You can use this pattern in the
request_parameters
section of your stream configuration. This approach is shown in the official documentation for similar use cases, such as the
searchIn
example:
Copy code
json {   "searchIn": "{{ ','.join(config.get('search_in', [])) }}" }
[HttpRequester object reference](https://docs.airbyte.com/platform/1.7/connector-development/config-based/understanding-the-yaml-file/reference#/definitions/HttpRequester) If your API expects multiple parameters with the same key (e.g.,
?orgunits=unit1&orgunits=unit2
), you would need to check if the API supports comma-separated values or requires repeated keys. The above approach is for comma-separated values, which is the most common pattern. If you need to customize further, you can use Jinja expressions in the generic parameter section as described in the documentation: > ...use the generic parameter section at the bottom of the stream configuration form to freely configure query parameters, headers and properties of the JSON body, by using jinja expressions and available variables. [Custom parameter injection](https://docs.airbyte.com/platform/1.7/connector-development/connector-builder-ui/pagination#custom-parameter-injection) Let me know if you need an example for a different structure!