<@ULVA73B9P> what is the rest api call to find use...
# ask-marvin
z
@Marvin what is the rest api call to find users that are not assigned to a workspace?
m
I couldn't find specific documentation on a REST API call to find users that are not assigned to any workspace. Typically, workspace management involves adding or inviting users to workspaces, as detailed in the workspaces documentation. There might not be an explicit mention of an API endpoint for unassigned users because this seems to be a less common use case. However, for Workspace Owners, the Prefect documentation provides insights into managing members and service accounts for workspaces. If there is functionality for listing members of a workspace, you may need to pull lists of all users and all workspace members and then programmatically determine the difference. Regarding Prefect Cloud API, there are ways to manage users, service accounts, and API keys, as indicated by the API keys documentation, but it doesn't detail an API for identifying unassigned users. You might want to check the GitHub repository issues or raise a question there if you require more specific API details or if this feature is not currently supported.
r
@Marvin what is the rest api call to find users that are not assigned to a team?
m
The Prefect Cloud documentation does not provide a REST API call specifically for finding users that are not assigned to a team. The Teams documentation discusses how to configure teams and manage team membership from the account settings, but it does not mention a direct API call to list unassigned users. To list users not in a team, you may need to: 1. List all users and service accounts, 2. List all teams and the members within them, and 3. Cross-reference the two sets of data to identify users not assigned to any team. You could potentially do this using the Prefect Cloud API, which may require several calls: 1. Use API endpoints that list all teams and team memberships. 2. Use API endpoints that list all users in your account. 3. Then you'd programmatically determine which users are not part of any teams. However, Prefect's documentation often assumes that you have direct access to the UI for managing teams. If you require more information about how to achieve this with the REST API, you might want to contact Prefect support, check for similar questions on their GitHub issues, or post a new question there.