You can retrieve common information for specific Astronomer objects by using the following sample queries.
Use the workspaces query to find the ID of a Workspace that you belong to. Optionally, you can choose to filter by Deployment label.
System administrators can use the sysWorkspaces query to perform a bulk-fetch of all Workspaces and their respective IDs using the sysWorkspaces query. After retrieving the full list, you can filter the Workspaces within your application to locate the ID corresponding to the label of interest.
You can use the workspaceDeployment query to retrieve details about a Deployment in a given Workspace. It requires the following inputs:
sysWorkspaces or workspaces query, or run astro workspace list. Alternatively, open a Workspace in the Astro Private Cloud UI and copy the value after /w/ in your Workspace URL, for example, https://app.basedomain/w/<workspace-id>.astro deployment list in your Workspace. Alternatively, you can copy the Release name from your Deployment’s Settings tab in the Astro Private Cloud UI.The workspaceDeployment query can return also any of the fields under Type Details, such as:
configuuidstatuscreatedAtupdatedAtroleBindingsFor example, you can run the following query to retrieve the Deployment’s:
A common query is users, which lets you retrieve information about multiple users at once. To use this query, you must provide:
At least one of the following userSearch values:
userId (String): The user’s IDuserUuid(String): The user’s unique IDusername (String): The user’s usernameemail (String): The user’s emailfullName (String): The user’s full namecreatedAt(DateTime): When the user was createdupdatedAt(DateTime): When the user was updatedThe query returns the requested details for all users who exactly match the values provided for the userSearch. For example, the following query would retrieve the requested values for any user accounts with the email name@mycompany.com: