Created
April 23, 2022 15:02
-
-
Save isaacharrisholt/ff71a5d2e28c65e6b11312a780d0983d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import List | |
import requests | |
API_ROOT = 'http://localhost:8000/api/v1' # This is the default for Airbyte | |
def get_workspaces() -> List[str]: | |
response = requests.post(f'{API_ROOT}/workspaces/list') | |
response.raise_for_status() # Either handle this yourself, or use a tool like Sentry for logging | |
return [ | |
workspace['workspaceId'] | |
for workspace in repsonse.json()['workspaces'] | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment