Use Airbyte As an API

Saagie jobs can call Airbyte’s API. As with Airbyte’s intuitive user interface, you can programmatically create and manage connections in your data pipeline, ensuring that your data is always up-to-date.

Sync a Connexion Manually With Python

  1. Make sure you have created the required global and project environment variables. For more information, see Airbyte Prerequisites.

  2. Import the following libraries:

    import requests
    import os
  3. You can now sync manually an existing connection by running the following lines of code:

    res = requests.post(f'{os.environ["AIRBYTE_URL"]}/api/v1/connections/sync',
                              auth=HTTPBasicAuth(os.environ["AIRBYTE_LOGIN"],
                              os.environ["AIRBYTE_PASSWORD"]),
                              json={"connectionId": "your_connection_id"}
                        )
For more information about Airbyte API, see Airbyte Configuration API.