Skip to content

Latest commit

 

History

History
300 lines (214 loc) · 12.8 KB

File metadata and controls

300 lines (214 loc) · 12.8 KB

Workspaces

(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="<YOUR_PASSWORD_HERE>",
            username="<YOUR_USERNAME_HERE>",
        ),
    ),
)

req = operations.CreateOrUpdateWorkspaceOAuthCredentialsRequest(
    workspace_o_auth_credentials_request=shared.WorkspaceOAuthCredentialsRequest(
        actor_type=shared.ActorTypeEnum.DESTINATION,
        configuration=shared.Airtable(
        credentials=shared.Credentials(),
    ),
        name=shared.OAuthActorNames.AMAZON_ADS,
    ),
    workspace_id='string',
)

res = s.workspaces.create_or_update_workspace_o_auth_credentials(req)

if res.status_code == 200:
    # handle response
    pass

Parameters

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

Response

operations.CreateOrUpdateWorkspaceOAuthCredentialsResponse

Errors

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

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="<YOUR_PASSWORD_HERE>",
            username="<YOUR_USERNAME_HERE>",
        ),
    ),
)

req = shared.WorkspaceCreateRequest(
    name='string',
)

res = s.workspaces.create_workspace(req)

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

Parameters

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

Response

operations.CreateWorkspaceResponse

Errors

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

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="<YOUR_PASSWORD_HERE>",
            username="<YOUR_USERNAME_HERE>",
        ),
    ),
)

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

res = s.workspaces.delete_workspace(req)

if res.status_code == 200:
    # handle response
    pass

Parameters

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

Response

operations.DeleteWorkspaceResponse

Errors

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

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="<YOUR_PASSWORD_HERE>",
            username="<YOUR_USERNAME_HERE>",
        ),
    ),
)

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

res = s.workspaces.get_workspace(req)

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

Parameters

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

Response

operations.GetWorkspaceResponse

Errors

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

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="<YOUR_PASSWORD_HERE>",
            username="<YOUR_USERNAME_HERE>",
        ),
    ),
)

req = operations.ListWorkspacesRequest(
    workspace_ids=[
        '4953f9aa-3803-487f-945d-389888ede307',
    ],
)

res = s.workspaces.list_workspaces(req)

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

Parameters

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

Response

operations.ListWorkspacesResponse

Errors

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

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="<YOUR_PASSWORD_HERE>",
            username="<YOUR_USERNAME_HERE>",
        ),
    ),
)

req = operations.UpdateWorkspaceRequest(
    workspace_update_request=shared.WorkspaceUpdateRequest(
        name='string',
    ),
    workspace_id='string',
)

res = s.workspaces.update_workspace(req)

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

Parameters

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

Response

operations.UpdateWorkspaceResponse

Errors

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