Skip to content

Latest commit

 

History

History
executable file
·
273 lines (187 loc) · 11.5 KB

File metadata and controls

executable file
·
273 lines (187 loc) · 11.5 KB

workspaces

Available Operations

create_or_update_workspace_o_auth_credentials

Create/update a set of OAuth credentials to override the Airbyte-provided OAuth credentials used for source/destination OAuth. In order to determine what the credential configuration needs to be, please see the connector specification of the relevant source/destination.

Example Usage

import airbyte
from airbyte.models import operations, shared

s = airbyte.Airbyte(
    security=shared.Security(
        basic_auth=shared.SchemeBasicAuth(
            password="",
            username="",
        ),
    ),
)

req = operations.CreateOrUpdateWorkspaceOAuthCredentialsRequest(
    workspace_o_auth_credentials_request=shared.WorkspaceOAuthCredentialsRequest(
        actor_type=shared.ActorTypeEnum.SOURCE,
        configuration=shared.SnapchatMarketing(
            client_id='cupiditate',
            client_secret='qui',
        ),
        name=shared.OAuthActorNames.AMAZON_SELLER_PARTNER,
    ),
    workspace_id='laudantium',
)

res = s.workspaces.create_or_update_workspace_o_auth_credentials(req)

if res.status_code == 200:
    # handle response

Parameters

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

Response

operations.CreateOrUpdateWorkspaceOAuthCredentialsResponse

create_workspace

Create a workspace

Example Usage

import airbyte
from airbyte.models import shared

s = airbyte.Airbyte(
    security=shared.Security(
        basic_auth=shared.SchemeBasicAuth(
            password="",
            username="",
        ),
    ),
)

req = shared.WorkspaceCreateRequest(
    name='Toni Wolff',
)

res = s.workspaces.create_workspace(req)

if res.workspace_response is not None:
    # handle response

Parameters

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

Response

operations.CreateWorkspaceResponse

delete_workspace

Delete a Workspace

Example Usage

import airbyte
from airbyte.models import operations, shared

s = airbyte.Airbyte(
    security=shared.Security(
        basic_auth=shared.SchemeBasicAuth(
            password="",
            username="",
        ),
    ),
)

req = operations.DeleteWorkspaceRequest(
    workspace_id='omnis',
)

res = s.workspaces.delete_workspace(req)

if res.status_code == 200:
    # handle response

Parameters

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

Response

operations.DeleteWorkspaceResponse

get_workspace

Get Workspace details

Example Usage

import airbyte
from airbyte.models import operations, shared

s = airbyte.Airbyte(
    security=shared.Security(
        basic_auth=shared.SchemeBasicAuth(
            password="",
            username="",
        ),
    ),
)

req = operations.GetWorkspaceRequest(
    workspace_id='quis',
)

res = s.workspaces.get_workspace(req)

if res.workspace_response is not None:
    # handle response

Parameters

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

Response

operations.GetWorkspaceResponse

list_workspaces

List workspaces

Example Usage

import airbyte
from airbyte.models import operations, shared

s = airbyte.Airbyte(
    security=shared.Security(
        basic_auth=shared.SchemeBasicAuth(
            password="",
            username="",
        ),
    ),
)

req = operations.ListWorkspacesRequest(
    include_deleted=False,
    limit=218403,
    offset=961571,
    workspace_ids=[
        '73ef7fbc-7abd-474d-939c-0f5d2cff7c70',
    ],
)

res = s.workspaces.list_workspaces(req)

if res.workspaces_response is not None:
    # handle response

Parameters

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

Response

operations.ListWorkspacesResponse

update_workspace

Update a workspace

Example Usage

import airbyte
from airbyte.models import operations, shared

s = airbyte.Airbyte(
    security=shared.Security(
        basic_auth=shared.SchemeBasicAuth(
            password="",
            username="",
        ),
    ),
)

req = operations.UpdateWorkspaceRequest(
    workspace_update_request=shared.WorkspaceUpdateRequest(
        name='Don Hills',
    ),
    workspace_id='vel',
)

res = s.workspaces.update_workspace(req)

if res.workspace_response is not None:
    # handle response

Parameters

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

Response

operations.UpdateWorkspaceResponse