Silvia Giammarinaro
06/03/2024, 12:03 PMkapa.ai
06/03/2024, 12:03 PMrequests
library with HTTP Basic Authentication. Below is an example based on the information provided in the knowledge sources: python import requests from requests.auth import HTTPBasicAuth # Define the API endpoint url = "http://<server_url>:8006/api/v1/destinations" # Define the username and password username = "<your_username>" password = "<your_password>" # Define the headers headers = { "accept": "application/json", "content-type": "application/json" } # Make the GET request with basic authentication response = requests.get( url, headers=headers, auth=HTTPBasicAuth(username, password) ) # Print the response print(response.json())
Replace <server_url>
, <your_username>
, and <your_password>
with your actual server URL, username, and password. This example uses the requests
library to send a GET request to the Airbyte API endpoint for listing destinations, including the necessary authentication headers. For more details on the Airbyte API, you can refer to the [Airbyte Public API - Destinations](https://reference.airbyte.com/reference/start) documentation.