(workspaces)
- 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="<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
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.CreateOrUpdateWorkspaceOAuthCredentialsRequest | ✔️ | The request object to use for the request. |
operations.CreateOrUpdateWorkspaceOAuthCredentialsResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4x-5xx | / |
Create a workspace
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
Parameter | Type | Required | Description |
---|---|---|---|
request |
shared.WorkspaceCreateRequest | ✔️ | The request object to use for the request. |
operations.CreateWorkspaceResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4x-5xx | / |
Delete a Workspace
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
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.DeleteWorkspaceRequest | ✔️ | The request object to use for the request. |
operations.DeleteWorkspaceResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4x-5xx | / |
Get Workspace details
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
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetWorkspaceRequest | ✔️ | The request object to use for the request. |
operations.GetWorkspaceResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4x-5xx | / |
List workspaces
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
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.ListWorkspacesRequest | ✔️ | The request object to use for the request. |
operations.ListWorkspacesResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4x-5xx | / |
Update a workspace
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
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.UpdateWorkspaceRequest | ✔️ | The request object to use for the request. |
operations.UpdateWorkspaceResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4x-5xx | / |