Product SiteDocumentation Site

6.2.3. Change to Behavior of List Commands

There was a major change in how our List* API commands work in CloudStack 3.0 compared to 2.2.x. The rules below apply only for managed resources – those that belong to an account, domain, or project. They are irrelevant for the List* commands displaying unmanaged (system) resources, such as hosts, clusters, and external network resources.
When no parameters are passed in to the call, the caller sees only resources owned by the caller (even when the caller is the administrator). Previously, the administrator saw everyone else's resources by default.
When accountName and domainId are passed in:
When projectId is passed in, only resources belonging to that project are listed.
When domainId is passed in, the call returns only resources belonging to the domain specified. To see the resources of subdomains, use the parameter isRecursive=true. Again, the regular user can see only resources owned by that user, the root administrator can list anything, and a domain administrator is authorized to see only resources of the administrator's own domain and subdomains.
To see all resources the caller is authorized to see, except for Project resources, use the parameter listAll=true.
To see all Project resources the caller is authorized to see, use the parameter projectId=-1.
There is one API command that doesn't fall under the rules above completely: the listTemplates command. This command has its own flags defining the list rules:
listTemplates Flag
Description
featured
Returns templates that have been marked as featured and public.
self
Returns templates that have been registered or created by the calling user.
selfexecutable
Same as self, but only returns templates that are ready to be deployed with.
sharedexecutable
Ready templates that have been granted to the calling user by another user.
executable
Templates that are owned by the calling user, or public templates, that can be used to deploy a new VM.
community
Returns templates that have been marked as public but not featured.
all
Returns all templates (only usable by admins).
The CloudStack UI on a general view will display all resources that the logged-in user is authorized to see, except for project resources. To see the project resources, select the project view.