- create_or_update_workspace_o_auth_credentials - Create OAuth override credentials for a workspace and source type.
- create_workspace - Create a workspace
- delete_workspace - Delete a Workspace
- get_workspace - Get Workspace details
- list_workspaces - List workspaces
- update_workspace - Update a workspace
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.
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
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.CreateOrUpdateWorkspaceOAuthCredentialsRequest | ✔️ | The request object to use for the request. |
operations.CreateOrUpdateWorkspaceOAuthCredentialsResponse
Create a workspace
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
Parameter | Type | Required | Description |
---|---|---|---|
request |
shared.WorkspaceCreateRequest | ✔️ | The request object to use for the request. |
operations.CreateWorkspaceResponse
Delete a Workspace
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
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.DeleteWorkspaceRequest | ✔️ | The request object to use for the request. |
operations.DeleteWorkspaceResponse
Get Workspace details
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
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetWorkspaceRequest | ✔️ | The request object to use for the request. |
operations.GetWorkspaceResponse
List workspaces
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
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.ListWorkspacesRequest | ✔️ | The request object to use for the request. |
operations.ListWorkspacesResponse
Update a workspace
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
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.UpdateWorkspaceRequest | ✔️ | The request object to use for the request. |