(destinations)
- create_destination - Create a destination
- delete_destination - Delete a Destination
- get_destination - Get Destination details
- list_destinations - List destinations
- patch_destination - Update a Destination
- put_destination - Update a Destination and fully overwrite it
Creates a destination given a name, workspace id, and a json blob containing the configuration for the source.
import airbyte
from airbyte.models import shared
s = airbyte.Airbyte(
security=shared.Security(
basic_auth=shared.SchemeBasicAuth(
password="<YOUR_PASSWORD_HERE>",
username="<YOUR_USERNAME_HERE>",
),
),
)
req = shared.DestinationCreateRequest(
configuration=shared.DestinationGoogleSheets(
credentials=shared.AuthenticationViaGoogleOAuth(
client_id='string',
client_secret='string',
refresh_token='string',
),
spreadsheet_id='https://docs.google.com/spreadsheets/d/1hLd9Qqti3UyLXZB2aFfUWDT7BG/edit',
),
name='string',
workspace_id='8360860a-d46e-48e6-af62-08e5ba5019ef',
)
res = s.destinations.create_destination(req)
if res.destination_response is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
shared.DestinationCreateRequest | ✔️ | The request object to use for the request. |
operations.CreateDestinationResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4x-5xx | / |
Delete a Destination
import airbyte
from airbyte.models import operations, shared
s = airbyte.Airbyte(
security=shared.Security(
basic_auth=shared.SchemeBasicAuth(
password="<YOUR_PASSWORD_HERE>",
username="<YOUR_USERNAME_HERE>",
),
),
)
req = operations.DeleteDestinationRequest(
destination_id='string',
)
res = s.destinations.delete_destination(req)
if res.status_code == 200:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.DeleteDestinationRequest | ✔️ | The request object to use for the request. |
operations.DeleteDestinationResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4x-5xx | / |
Get Destination details
import airbyte
from airbyte.models import operations, shared
s = airbyte.Airbyte(
security=shared.Security(
basic_auth=shared.SchemeBasicAuth(
password="<YOUR_PASSWORD_HERE>",
username="<YOUR_USERNAME_HERE>",
),
),
)
req = operations.GetDestinationRequest(
destination_id='string',
)
res = s.destinations.get_destination(req)
if res.destination_response is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetDestinationRequest | ✔️ | The request object to use for the request. |
operations.GetDestinationResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4x-5xx | / |
List destinations
import airbyte
from airbyte.models import operations, shared
s = airbyte.Airbyte(
security=shared.Security(
basic_auth=shared.SchemeBasicAuth(
password="<YOUR_PASSWORD_HERE>",
username="<YOUR_USERNAME_HERE>",
),
),
)
req = operations.ListDestinationsRequest(
workspace_ids=[
'c2980b9a-8317-4202-845c-d26fb4455227',
],
)
res = s.destinations.list_destinations(req)
if res.destinations_response is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.ListDestinationsRequest | ✔️ | The request object to use for the request. |
operations.ListDestinationsResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4x-5xx | / |
Update a Destination
import airbyte
from airbyte.models import operations, shared
s = airbyte.Airbyte(
security=shared.Security(
basic_auth=shared.SchemeBasicAuth(
password="<YOUR_PASSWORD_HERE>",
username="<YOUR_USERNAME_HERE>",
),
),
)
req = operations.PatchDestinationRequest(
destination_patch_request=shared.DestinationPatchRequest(
configuration=shared.DestinationGoogleSheets(
credentials=shared.AuthenticationViaGoogleOAuth(
client_id='string',
client_secret='string',
refresh_token='string',
),
spreadsheet_id='https://docs.google.com/spreadsheets/d/1hLd9Qqti3UyLXZB2aFfUWDT7BG/edit',
),
),
destination_id='string',
)
res = s.destinations.patch_destination(req)
if res.destination_response is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.PatchDestinationRequest | ✔️ | The request object to use for the request. |
operations.PatchDestinationResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4x-5xx | / |
Update a Destination and fully overwrite it
import airbyte
from airbyte.models import operations, shared
s = airbyte.Airbyte(
security=shared.Security(
basic_auth=shared.SchemeBasicAuth(
password="<YOUR_PASSWORD_HERE>",
username="<YOUR_USERNAME_HERE>",
),
),
)
req = operations.PutDestinationRequest(
destination_put_request=shared.DestinationPutRequest(
configuration=shared.DestinationGoogleSheets(
credentials=shared.AuthenticationViaGoogleOAuth(
client_id='string',
client_secret='string',
refresh_token='string',
),
spreadsheet_id='https://docs.google.com/spreadsheets/d/1hLd9Qqti3UyLXZB2aFfUWDT7BG/edit',
),
name='string',
),
destination_id='string',
)
res = s.destinations.put_destination(req)
if res.destination_response is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.PutDestinationRequest | ✔️ | The request object to use for the request. |
operations.PutDestinationResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4x-5xx | / |