...
Where
<rooturl>: API server web app root url.
<port> : API server web app port.
<entity> : CloudStack entity class, which will be explained below in Object Model section.
<identifier> : Unique identifier for an entity instance, can be uuid, or any other attribute that can uniquely identify a resource.
<opName> : Supported operation name for an entity.
Before discussing CloudStack object model, we would like to make a distinction of two types of REST apis in our system:
Note that although these two types of REST apis will consume the similar REST URL pattern as documented above, supported <entity> and exposed entity information will be different. For NorthBound APIs, we need to pay attention to how much information we want to expose to end users.
A pre-requisite to come up with a clean REST style API is to build CloudStack Resource Object Model. This object model should have the following information for each CloudStack resource, including those resources directly managed by CloudStack (like VM, volume, network, etc) and those indirectly related resources (like Domain, Account, etc).