Skip to content

Latest commit

 

History

History
251 lines (169 loc) · 8.48 KB

File metadata and controls

251 lines (169 loc) · 8.48 KB

Connections

(connections)

Overview

Available Operations

create_connection

Create a connection

Example Usage

import airbyte_api
from airbyte_api import models

s = airbyte_api.AirbyteAPI(
    security=models.Security(
        basic_auth=models.SchemeBasicAuth(
            password="",
            username="",
        ),
    ),
)


res = s.connections.create_connection(request=models.ConnectionCreateRequest(
    destination_id='e478de0d-a3a0-475c-b019-25f7dd29e281',
    source_id='95e66a59-8045-4307-9678-63bc3c9b8c93',
    name='Postgres-to-Bigquery',
    namespace_format='${SOURCE_NAMESPACE}',
))

if res.connection_response is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
request models.ConnectionCreateRequest ✔️ The request object to use for the request.

Response

api.CreateConnectionResponse

Errors

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

delete_connection

Delete a Connection

Example Usage

import airbyte_api
from airbyte_api import api, models

s = airbyte_api.AirbyteAPI(
    security=models.Security(
        basic_auth=models.SchemeBasicAuth(
            password="",
            username="",
        ),
    ),
)


res = s.connections.delete_connection(request=api.DeleteConnectionRequest(
    connection_id='<value>',
))

if res is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
request api.DeleteConnectionRequest ✔️ The request object to use for the request.

Response

api.DeleteConnectionResponse

Errors

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

get_connection

Get Connection details

Example Usage

import airbyte_api
from airbyte_api import api, models

s = airbyte_api.AirbyteAPI(
    security=models.Security(
        basic_auth=models.SchemeBasicAuth(
            password="",
            username="",
        ),
    ),
)


res = s.connections.get_connection(request=api.GetConnectionRequest(
    connection_id='<value>',
))

if res.connection_response is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
request api.GetConnectionRequest ✔️ The request object to use for the request.

Response

api.GetConnectionResponse

Errors

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

list_connections

List connections

Example Usage

import airbyte_api
from airbyte_api import api, models

s = airbyte_api.AirbyteAPI(
    security=models.Security(
        basic_auth=models.SchemeBasicAuth(
            password="",
            username="",
        ),
    ),
)


res = s.connections.list_connections(request=api.ListConnectionsRequest())

if res.connections_response is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
request api.ListConnectionsRequest ✔️ The request object to use for the request.

Response

api.ListConnectionsResponse

Errors

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

patch_connection

Update Connection details

Example Usage

import airbyte_api
from airbyte_api import api, models

s = airbyte_api.AirbyteAPI(
    security=models.Security(
        basic_auth=models.SchemeBasicAuth(
            password="",
            username="",
        ),
    ),
)


res = s.connections.patch_connection(request=api.PatchConnectionRequest(
    connection_patch_request=models.ConnectionPatchRequest(
        name='Postgres-to-Bigquery',
        namespace_format='${SOURCE_NAMESPACE}',
    ),
    connection_id='<value>',
))

if res.connection_response is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
request api.PatchConnectionRequest ✔️ The request object to use for the request.

Response

api.PatchConnectionResponse

Errors

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