Carl Raunås
09/19/2023, 7:24 AMConor Barber (Airbyte)
09/19/2023, 8:50 PMConor Barber (Airbyte)
09/19/2023, 8:51 PMCarl Raunås
09/20/2023, 7:12 AMHiroto Yamakawa
10/26/2023, 8:58 AMCarl Raunås
10/31/2023, 7:54 AMHiroto Yamakawa
10/31/2023, 7:55 AMCarl Raunås
10/31/2023, 8:11 AM<http://localhost:8000/api/v1/workspaces/list>
Getting the connections on workspace
<http://localhost:8000/api/v1/connections/list>
with payload "workspaceId": workspace_id
Getting the state of each connection
<http://localhost:8000/api/v1/state/get>
with payload "`connectionId": connection_id`
Im saving all states together with the name of the connection to a textfile to be used for setting the state on the other instance.
The new instance will already have all source. destinations and connections setup, preferably using Octavia or Terraform.
Get workspace id of the workspace on new instance.
Get all connection ids on the new instance.
Read the saved states from file.
The saved state file contains the connection id of the old instance, so here I'm replacing the connection id of the state by matching connection state on connection name. Something like this:
[conn["connectionId"] for conn in connections if conn["name"] == state['connectionName']]
and then replacing this connection id of the saved state object.
For each connection on new instance update the state
<http://localhost:8000/api/v1/state/create_or_update>
with payload
"connectionId": connection_id,
"connectionState": state
Think this is the docs I used to do this: https://reference.airbyte.com/reference/listworkspacesCarl Raunås
10/31/2023, 8:12 AMHiroto Yamakawa
10/31/2023, 8:46 AMCarl Raunås
10/31/2023, 6:43 PM