Skip to content

Latest commit

 

History

History
319 lines (233 loc) · 13 KB

File metadata and controls

319 lines (233 loc) · 13 KB

Destinations

(destinations)

Available Operations

create_destination

Creates a destination given a name, workspace id, and a json blob containing the configuration for the source.

Example Usage

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

Parameters

Parameter Type Required Description
request shared.DestinationCreateRequest ✔️ The request object to use for the request.

Response

operations.CreateDestinationResponse

Errors

Error Object Status Code Content Type
errors.SDKError 4x-5xx /

delete_destination

Delete a Destination

Example Usage

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

Parameters

Parameter Type Required Description
request operations.DeleteDestinationRequest ✔️ The request object to use for the request.

Response

operations.DeleteDestinationResponse

Errors

Error Object Status Code Content Type
errors.SDKError 4x-5xx /

get_destination

Get Destination details

Example Usage

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

Parameters

Parameter Type Required Description
request operations.GetDestinationRequest ✔️ The request object to use for the request.

Response

operations.GetDestinationResponse

Errors

Error Object Status Code Content Type
errors.SDKError 4x-5xx /

list_destinations

List destinations

Example Usage

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

Parameters

Parameter Type Required Description
request operations.ListDestinationsRequest ✔️ The request object to use for the request.

Response

operations.ListDestinationsResponse

Errors

Error Object Status Code Content Type
errors.SDKError 4x-5xx /

patch_destination

Update a Destination

Example Usage

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

Parameters

Parameter Type Required Description
request operations.PatchDestinationRequest ✔️ The request object to use for the request.

Response

operations.PatchDestinationResponse

Errors

Error Object Status Code Content Type
errors.SDKError 4x-5xx /

put_destination

Update a Destination and fully overwrite it

Example Usage

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

Parameters

Parameter Type Required Description
request operations.PutDestinationRequest ✔️ The request object to use for the request.

Response

operations.PutDestinationResponse

Errors

Error Object Status Code Content Type
errors.SDKError 4x-5xx /