Hi Nirmal, I fully agree about naming APIs according to the REST guidelines :-)
Since we are currently in the process of creating a bunch of RESTful APIs, I suggest to make sure that we have a WSO2-wide naming scheme for the resources we support to manipulate via our APIs. Obviously, the following alternatives come to mind: 1. The ideal way would be a managed and maintained list of WSO2-wide unique names of these resources. And these names would be "product neutral". The base URL would be like http://wso2.com/api (to be refined depending on how versioning will be done) and then the name of the resource will follow (like /clusters). - PRO: nice governance structure for all of our APIs. Consistent naming, nice to comprehend by our customers. - CON: we need a process to "register" APIs within WSO2 2. I we want a leaner naming mechanism we need some sort of "namespace". This could be done by using as base URL a template like http://wso2.com/api/{product} or http://wso2.com/{product}/api - PRO: no need for WSO2-wide unique names of resources; lean process. - CON: more complex, sometimes non-natural names, no consistent naming - i.e. more difficult to learn/understand by our customers. Thoughts, comments, opinions are cordially welcome... Best regards, Frank 2015-03-18 13:36 GMT+01:00 Nirmal Fernando <[email protected]>: > Hi Chaya, > > Do we really need OCServer/services/oc-server/external/ > <http://192.168.57.22:9783/OCServer/services/oc-server/external/oc/clusters/> > part > in the URL? In a RESTFull API, every such path element should represent a > resource and also should be nouns. > > You can use the /api as the root context, it's how GitHub API designed too. > > I suggest /api/clusters instead of / > OCServer/services/oc-server/external/oc/clusters/ > <http://192.168.57.22:9783/OCServer/services/oc-server/external/oc/clusters/> > > > On Wed, Mar 18, 2015 at 5:44 PM, Chaya Sandamali <[email protected]> wrote: > >> Dear Frank, >> >> With OC portal[1] you can view the topology of the cluster . >> (admin/admin). We have currently following URIs with external API. >> >> GET >> >> - [2] - view all cluster data >> - [3] - view details of a specific cluster >> - [4] - view all server data of a specific cluster >> - [5] - view specific sever details >> >> PUT >> >> - [6] -execute cluster wide commands >> - [7]- execute commands on a specific server >> >> >> [1] http://192.168.57.22:9763/sso/login.jag >> [2] >> http://192.168.57.22:9783/OCServer/services/oc-server/external/oc/clusters/ >> [3] >> http://192.168.57.22:9783/OCServer/services/oc-server/external/oc/clusters/{cluster-id} >> [4] >> http://192.168.57.22:9783/OCServer/services/oc-server/external/oc/clusters/{cluster-id}/nodes >> [5] >> http://192.168.57.22:9783/OCServer/services/oc-server/external/oc/clusters/{cluster-id}/nodes/{nodes-id} >> [6] >> http://192.168.57.22:9783/OCServer/services/oc-server/external/oc/clusters/{cluster-id}/commands/{command-id} >> [7] >> http://192.168.57.22:9783/OCServer/services/oc-server/external/oc/clusters/{cluster-id}/nodes/{node-id}/commands/{command-id} >> >> Thank you. >> >> Regards, >> Chaya >> >> Chaya Sandamali >> Software Engineering Intern >> WSo2 Inc >> Mobile: +94714905772 >> LinkedIn: http://lk.linkedin.com/pub/chaya-sandamali/90/694/a59/ >> >> On Wed, Mar 18, 2015 at 4:48 PM, Frank Leymann <[email protected]> wrote: >> >>> Dear Chaya, >>> >>> is there a pointer to the REST API? I would be interested in its URIs, >>> HTTP methods used on each URI, header fields supported, status codes >>> returned... >>> >>> Thanks! >>> >>> >>> Best regards, >>> Frank >>> >>> 2015-03-18 9:28 GMT+01:00 Chaya Sandamali <[email protected]>: >>> >>>> Hi all, >>>> >>>> After the last review,we came up with a data model for the API. I have >>>> attached an initial model of the design and currently the OperationsCenter >>>> Rest API is implemented with this new model and following are the new >>>> improvements in internal API part. >>>> >>>> Execute restart command as a cluster wide operation in *round-robin * >>>> fashion. >>>> >>>> - GRACEFUL_RESTART >>>> - FORCE_RESTART >>>> >>>> Execute shut down command on the cluster >>>> >>>> - GRACEFUL_SHUTDOWN >>>> - FORCE_SHUTDOWN >>>> >>>> Thank you. >>>> >>>> Regards, >>>> Chaya >>>> >>>> Chaya Sandamali >>>> Software Engineering Intern >>>> WSo2 Inc >>>> Mobile: +94714905772 >>>> LinkedIn: http://lk.linkedin.com/pub/chaya-sandamali/90/694/a59/ >>>> >>>> >>>>> >>>> >>>> _______________________________________________ >>>> Architecture mailing list >>>> [email protected] >>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>>> >>>> >>> >>> _______________________________________________ >>> Architecture mailing list >>> [email protected] >>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >>> >>> >> >> _______________________________________________ >> Architecture mailing list >> [email protected] >> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture >> >> > > > -- > > Thanks & regards, > Nirmal > > Senior Software Engineer- Platform Technologies Team, WSO2 Inc. > Mobile: +94715779733 > Blog: http://nirmalfdo.blogspot.com/ > > > > _______________________________________________ > Architecture mailing list > [email protected] > https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture > >
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
