Issue accessing workspaces created through API

base URL for config API should be f'<http://localhost:8006/api/v1/users/list_by_workspace_id>' ?

I mean on the same machine ofc

That’s what I’m assuming -> haven’t tried this one

in our production setup, we are actually using APIs we found to be used on the UI rather than their documented ones

Only getting back 404’s so that’s strange

so if you were to run this and need the orgId

  -H 'Accept: */*' \
  -H 'Accept-Language: en-US,en;q=0.9,sr-RS;q=0.8,sr;q=0.7,hr;q=0.6' \
  -H 'Authorization: Basic YWlyYnl0ZTpwYXNzd29yZA==' \
  -H 'Connection: keep-alive' \
  -H 'DNT: 1' \
  -H 'Origin: <http://localhost:8000>' \
  -H 'Referer: <http://localhost:8000/workspaces/d7d08065-b829-4a65-afe9-712eb52179a8/settings/metrics>' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: same-origin' \
  -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36' \
  -H 'content-type: application/json' \
  -H 'sec-ch-ua: "Not A(Brand";v="99", "Google Chrome";v="121", "Chromium";v="121"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Linux"' \
  -H 'x-airbyte-analytic-source: webapp' \
  --data-raw '{"userId":"00000000-0000-0000-0000-000000000000"}' \
  --compressed```
  -H 'Accept: */*' \
  -H 'Accept-Language: en-US,en;q=0.9,sr-RS;q=0.8,sr;q=0.7,hr;q=0.6' \
  -H 'Authorization: Basic YWlyYnl0ZTpwYXNzd29yZA==' \
  -H 'Connection: keep-alive' \
  -H 'DNT: 1' \
  -H 'Referer: <http://localhost:8000/workspaces/d7d08065-b829-4a65-afe9-712eb52179a8/settings/metrics>' \
  -H 'Sec-Fetch-Dest: empty' \
  -H 'Sec-Fetch-Mode: cors' \
  -H 'Sec-Fetch-Site: same-origin' \
  -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36' \
  -H 'sec-ch-ua: "Not A(Brand";v="99", "Google Chrome";v="121", "Chromium";v="121"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Linux"' \
  -H 'x-airbyte-analytic-source: webapp' \
  --compressed```

{"permissions":[{"permissionId":"3c2b4b90-4fcb-4d74-8fee-f168acdbcedc","permissionType":"organization_admin","userId":"00000000-0000-0000-0000-000000000000","organizationId":"00000000-0000-0000-0000-000000000000"},{"permissionId":"0566a930-ea6d-4a11-b6a2-07c9ac7906ec","permissionType":"instance_admin","userId":"00000000-0000-0000-0000-000000000000"}

{"edition":"community","webappUrl":"null","initialSetupComplete":true,"defaultUserId":"00000000-0000-0000-0000-000000000000","defaultOrganizationId":"00000000-0000-0000-0000-000000000000","defaultWorkspaceId":"2edea8b3-351a-4beb-9568-f064ebfa115c","trackingStrategy":"segment"}

What I would do is:
• Start fresh with a new airbyte
• Start the ./run-airbyte-platform.sh
• Go through the Workspace creation process
• Follow the Developer Console closely
• Search for the workspace creation API call
◦ Check for permissions creation call
• Replicate it in your python code that’s written to Guido’s standard
• Let me know if that worked for you
We found more success with reverse engineering our airbyte automation through the UI than through the official api docs :partyparrot:

Since you’re on GCP and I have’t used it at all for a few years I don’t know the naming (I recall cloudstore but I could be wrong), just provision a free-tier DB instance and try it on there

Those steps are kind of what I tried a couple of hours ago, nuked basically everything and started again. :man-shrugging: I’ll dig a bit deeper to see if I can find something.

Seems I got it to work. I now created the workspace via the config API. When I didn’t add an organizationId it didn’t work, but when I explicitly set it to "organizationId": "00000000-0000-0000-0000-000000000000" it worked.

<@U06KR7ND4MQ> Here’s the last pointer I got for you as it’s late here :slightly_smiling_face:

airbyte-bootloader                | 2024-02-20 19:30:37 INFO i.a.d.i.c.m.V0_50_19_001__CreateDefaultOrganizationAndUser(createDefaultUserAndOrganization):125 - No default workspace found. Skipping update of default workspace to point to default organization.
airbyte-bootloader                | 2024-02-20 19:30:37 INFO i.a.d.i.c.m.V0_50_19_001__CreateDefaultOrganizationAndUser(createDefaultUserAndOrganization):129 - Granting ORGANIZATION_ADMIN permission to default user with ID 00000000-0000-0000-0000-000000000000 on default organization with ID 00000000-0000-0000-0000-000000000000```

But it does mean that for any OSS user wanting to use the regular API to create a workspace on the latest version, the UI will not work atm.

The orgId is not set for a workspace created through the other API, hence it somehow breaking.

Thanks for the help <@U04SSV66A8J>!

On a last note, adding the default orgId to the “broken” workspaces makes the UI work again.

ah that’s a great tip! And of course, I’m sorry I wasn’t of more help :frowning: