(workspaces )
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.
import airbyte_api
from airbyte_api import api , models
s = airbyte_api .AirbyteAPI (
security = models .Security (
basic_auth = models .SchemeBasicAuth (
password = '' ,
username = '' ,
),
),
)
res = s .workspaces .create_or_update_workspace_o_auth_credentials (request = api .CreateOrUpdateWorkspaceOAuthCredentialsRequest (
workspace_o_auth_credentials_request = models .WorkspaceOAuthCredentialsRequest (
actor_type = models .ActorTypeEnum .DESTINATION ,
configuration = {
'user' : 'charles' ,
},
name = models .OAuthActorNames .AMAZON_ADS ,
),
workspace_id = '<value>' ,
))
if res is not None :
# handle response
pass
api.CreateOrUpdateWorkspaceOAuthCredentialsResponse
Error Type
Status Code
Content Type
errors.SDKError
4XX, 5XX
*/*
Create a workspace
import airbyte_api
from airbyte_api import models
s = airbyte_api .AirbyteAPI (
security = models .Security (
basic_auth = models .SchemeBasicAuth (
password = '' ,
username = '' ,
),
),
)
res = s .workspaces .create_workspace (request = models .WorkspaceCreateRequest (
name = 'Company Workspace Name' ,
))
if res .workspace_response is not None :
# handle response
pass
api.CreateWorkspaceResponse
Error Type
Status Code
Content Type
errors.SDKError
4XX, 5XX
*/*
Delete a Workspace
import airbyte_api
from airbyte_api import api , models
s = airbyte_api .AirbyteAPI (
security = models .Security (
basic_auth = models .SchemeBasicAuth (
password = '' ,
username = '' ,
),
),
)
res = s .workspaces .delete_workspace (request = api .DeleteWorkspaceRequest (
workspace_id = '<value>' ,
))
if res is not None :
# handle response
pass
api.DeleteWorkspaceResponse
Error Type
Status Code
Content Type
errors.SDKError
4XX, 5XX
*/*
Get Workspace details
import airbyte_api
from airbyte_api import api , models
s = airbyte_api .AirbyteAPI (
security = models .Security (
basic_auth = models .SchemeBasicAuth (
password = '' ,
username = '' ,
),
),
)
res = s .workspaces .get_workspace (request = api .GetWorkspaceRequest (
workspace_id = '<value>' ,
))
if res .workspace_response is not None :
# handle response
pass
api.GetWorkspaceResponse
Error Type
Status Code
Content Type
errors.SDKError
4XX, 5XX
*/*
List workspaces
import airbyte_api
from airbyte_api import api , models
s = airbyte_api .AirbyteAPI (
security = models .Security (
basic_auth = models .SchemeBasicAuth (
password = '' ,
username = '' ,
),
),
)
res = s .workspaces .list_workspaces (request = api .ListWorkspacesRequest ())
if res .workspaces_response is not None :
# handle response
pass
api.ListWorkspacesResponse
Error Type
Status Code
Content Type
errors.SDKError
4XX, 5XX
*/*
Update a workspace
import airbyte_api
from airbyte_api import api , models
s = airbyte_api .AirbyteAPI (
security = models .Security (
basic_auth = models .SchemeBasicAuth (
password = '' ,
username = '' ,
),
),
)
res = s .workspaces .update_workspace (request = api .UpdateWorkspaceRequest (
workspace_update_request = models .WorkspaceUpdateRequest (
name = 'Company Workspace Name' ,
),
workspace_id = '<value>' ,
))
if res .workspace_response is not None :
# handle response
pass
api.UpdateWorkspaceResponse
Error Type
Status Code
Content Type
errors.SDKError
4XX, 5XX
*/*