URI Specifications for RAD Resources
In a RESTful architecture, RAD objects are modeled as resources. A resource is an entity with a type, associated data, relationships to other resources, and a set of methods that operate on it. A URI is used to identify a resource. Resources can exist individually or as a collection. And a collection can be nested within an individual resource.
The URI format to access RAD resources can include a variety of parameters, for example:
https://host:port/api/{namespace}/[{version}]/{collection}[?query-params]
https://host:port/api/{namespace}/[{version}]/{collection}/{coll-ID}[?query-params]
https://host:port/api/{namespace}/[{version}]/{collection}/{coll-ID}/{property}[?query-params]
https://host:port/api/{namespace}/[{version}]/{collection}/{coll-ID}/{sub-collection}[?query-params]
https://host:port/api/{namespace}/[{version}]/{collection}/{coll-ID}/{sub-collection}/{sub-coll-ID}[?query-params]
https://host:port/api/{namespace}/[{version}]/{collection}/{coll-ID}/{sub-collection}/{sub-coll-ID}/{property}[?query-params]
https://host:port/api/{namespace}/[{version}]/{collection}/{coll-ID}/{sub-collection}/{sub-coll-ID}/{sub-collection}/{sub-coll-ID}/{sub-collection}......[?query-params]
The components in the URIs are as follows:
-
namespace – Name associated with a RAD module, generally the module API name or domain name of the RAD module.
-
version – Optional version number that specifies the RAD module version.
-
collection – Collection resource.
-
coll-ID – Identifier or path to an individual resource within a collection that identifies a specific RAD instance.
-
sub-collection – Collection nested within an individual resource. It is an interface property of type struct, a list, a dictionary, or a reference.
-
sub-coll-ID – Identifier or path to an individual resource within a subcollection. It consists of a struct field, a list index, a dictionary key, or a reference property.
-
property – An interface property within a specific individual resource.
Sample URI:
https://host:port/api/com.oracle.solaris.rad.zonemgr/1.6/Zone/testzone1?_rad_detail
All REST requests take the optional _rad_detail
query parameter. If this query parameter is set to true
, you will get the full details of an object in the response. The default setting is false
.
In some cases, a server object does not have a name and the use of a standard URI to refer to a RAD instance does not make sense. This situation might occur when a reference to a RAD instance is returned as an error or as the result from a method. In this case, the server generates a URI path that includes a _rad_reference
field. For example, the following is a possible URI:
/api/com.oracle.solaris.rad.zonemgr/1.6/Zone/_rad_reference/1234
The URI is valid to use in the remainder of the session but is valid only for the lifetime of a session.