Copying base with app, retrieving app uuid through py code

Hello,
I have copied a base in py code with Seatable API command account.copy_base(…). The source base includes a universal app which - after visually checking - has also been copied to the new base. So far so good. However, when I try to retrieve the new app uuid later in the code (even a considerable time later) via the following:

headers = {
       "Authorization": f"Token {ADMIN_TOKEN}"
   }
   resp = requests.get(
       f"{SERVER}/api/v2.1/universal-apps/",
       headers=headers
   )    
apps = resp.json().get('my_managed_apps', [])
   print(f"Apps returned: {len(apps)}")
   for app in apps:
       print(f"App Name: {app['app_name']}")
       print(f"App UUID: {app['app_uuid']}")
       print(f"Belongs to Base (dtable_uuid): {app['dtable_name']}\n")
       print(f"Belongs to Base (dtable_uuid): {app['dtable_uuid']}\n")

the code executes fine but the response does not include the new base / new app that was previously created via py code (even after waiting for a long time). I need the app uuid to be able to construct the url for the universal application, so the app can be opened by user via field button and also to batch import users from the source app to to the newly created app (I assume users/groups dont get automatically copied by copy_base?). Copying occurs within the same group, with me as team admin, on entreprise cloud.
the goal is to allow users to be able to copy & access a new base from a template base, through a front-end “hub” application, without having access to the actual bases. What could be going wrong?
KR

This is the answer we provided in our support ticket yesterday:

Hello,
sorry for the inconvenience!
The app in the newly created base is only part of the return value of the list apps endpoint aftre accesing the app at least once (either in edit or in app mode).
I cannot explain the observed behavior, but I can reliably reproduce it.
Unfortunately, the get metadata endpoint for the base does not contain app data either. So there is no way to get the app UUID without one manual intervention.

Personal note: I am not sure about your motivation to post the question in the forum, though answered, If you do, please also post the answer so that everyone can benefit from it.

PS: I took the liberty of decluttering and beautifying your post.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.