(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 = "<YOUR_PASSWORD_HERE>" ,
username = "<YOUR_USERNAME_HERE>" ,
),
),
)
req = api .CreateOrUpdateWorkspaceOAuthCredentialsRequest (
workspace_o_auth_credentials_request = models .WorkspaceOAuthCredentialsRequest (
actor_type = models .ActorTypeEnum .DESTINATION ,
configuration = models .Airtable (),
name = models .OAuthActorNames .AMAZON_ADS ,
),
workspace_id = '<value>' ,
)
res = s .workspaces .create_or_update_workspace_o_auth_credentials (req )
if res is not None :
# handle response
pass
api.CreateOrUpdateWorkspaceOAuthCredentialsResponse
Error Object
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 = "<YOUR_PASSWORD_HERE>" ,
username = "<YOUR_USERNAME_HERE>" ,
),
),
)
req = models .WorkspaceCreateRequest (
name = '<value>' ,
)
res = s .workspaces .create_workspace (req )
if res .workspace_response is not None :
# handle response
pass
api.CreateWorkspaceResponse
Error Object
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 = "<YOUR_PASSWORD_HERE>" ,
username = "<YOUR_USERNAME_HERE>" ,
),
),
)
req = api .DeleteWorkspaceRequest (
workspace_id = '<value>' ,
)
res = s .workspaces .delete_workspace (req )
if res is not None :
# handle response
pass
api.DeleteWorkspaceResponse
Error Object
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 = "<YOUR_PASSWORD_HERE>" ,
username = "<YOUR_USERNAME_HERE>" ,
),
),
)
req = api .GetWorkspaceRequest (
workspace_id = '<value>' ,
)
res = s .workspaces .get_workspace (req )
if res .workspace_response is not None :
# handle response
pass
api.GetWorkspaceResponse
Error Object
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 = "<YOUR_PASSWORD_HERE>" ,
username = "<YOUR_USERNAME_HERE>" ,
),
),
)
req = api .ListWorkspacesRequest ()
res = s .workspaces .list_workspaces (req )
if res .workspaces_response is not None :
# handle response
pass
api.ListWorkspacesResponse
Error Object
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 = "<YOUR_PASSWORD_HERE>" ,
username = "<YOUR_USERNAME_HERE>" ,
),
),
)
req = api .UpdateWorkspaceRequest (
workspace_update_request = models .WorkspaceUpdateRequest (
name = '<value>' ,
),
workspace_id = '<value>' ,
)
res = s .workspaces .update_workspace (req )
if res .workspace_response is not None :
# handle response
pass
api.UpdateWorkspaceResponse
Error Object
Status Code
Content Type
errors.SDKError
4xx-5xx
/