Hi Udara, You have a point! However IMO cluster is a global level entity that's why I did not want to use the application id to read a cluster.
Even though the clusters are created per application, in the topology clusters are listed at Topology -> Services -> Clusters. Therefore I would prefer to have cluster resource URL as /api/clusters. Thanks On Wed, Mar 18, 2015 at 10:51 AM, Udara Liyanage <ud...@wso2.com> wrote: > Hi Imesh, > > Should n't we add the application id too to the API? . This is because > cluster id is local to the application, even cluster id is unique it would > have to traverse all the applications to fetch the cluster id > > *Modified API* > GET application/{applicationId}/clusters/{clusterId} > > On Tue, Mar 17, 2015 at 11:07 AM, Imesh Gunaratne <im...@apache.org> > wrote: > >> Hi Isuru, >> >> I think we already have two api methods to get the application details: >> >> [1] GET /applications/{applicationId} >> [2] GET /applications/{applicationId}/runtime >> >> The second API method would give us the cluster Ids of the given >> application. Then the user could invoke a new API method to get the cluster >> details: >> >> [3] GET /clusters/{clusterId} >> >> Thanks >> >> On Tue, Mar 17, 2015 at 10:12 AM, Isuru Haththotuwa <isu...@apache.org> >> wrote: >> >>> Hi, >>> >>> Since Stratos 4.1 is based on the Application model, shall we provide an >>> API to list the details (instances) of an application? Or do we still need >>> to list individual cluster instances? >>> >>> On Tue, Mar 17, 2015 at 9:59 AM, Imesh Gunaratne <im...@apache.org> >>> wrote: >>> >>>> Hi Shaheed, >>>> >>>> Thanks for pointing this! Yes in 4.1.0 API we do not have a method to >>>> query instances of a cluster. I think we need to add it. @Devs: Anyone >>>> would like to contribute to this? >>>> >>> >>>> Thanks >>>> >>>> On Tue, Mar 17, 2015 at 4:59 AM, Shaheedur Haque (shahhaqu) < >>>> shahh...@cisco.com> wrote: >>>> >>>>> Hi, >>>>> >>>>> >>>>> >>>>> In Stratos 4.0.0, I could get a list of instances running against a >>>>> subscription with a REST call like this: >>>>> >>>>> >>>>> >>>>> 'GET', '/stratos/admin/cluster/clusterId/{}'.format(cluster) >>>>> >>>>> >>>>> >>>>> However, in 4.1.0, the commands describe-application and describe >>>>> application-runtime equate to: >>>>> >>>>> >>>>> >>>>> 'GET', 'applications/{}'.format(subscription) >>>>> >>>>> # >>>>> >>>>> # The reply looks like this: >>>>> >>>>> # >>>>> >>>>> # {u'status': u'Deployed', u'alias': u'cartridge-proxy', >>>>> u'multiTenant': False, u'applicationId': u'cartridge-proxy', >>>>> u'components': >>>>> {...}} >>>>> >>>>> # >>>>> >>>>> >>>>> >>>>> And >>>>> >>>>> >>>>> >>>>> 'GET', 'applications/{}/runtime'.format(application) >>>>> >>>>> # >>>>> >>>>> # The reply looks like this: >>>>> >>>>> # >>>>> >>>>> # {u'status': u'Active', u'multiTenant': False} >>>>> >>>>> # >>>>> >>>>> >>>>> >>>>> Is there some other way to list the instances? >>>>> >>>>> >>>>> >>>>> Thanks, Shaheed >>>>> >>>> >>>> >>>> >>>> -- >>>> Imesh Gunaratne >>>> >>>> Technical Lead, WSO2 >>>> Committer & PMC Member, Apache Stratos >>>> >>>> -- >>>> Thanks and Regards, >>>> >>>> Isuru H. >>>> +94 716 358 048* <http://wso2.com/>* >>>> >>>> >>>> * <http://wso2.com/>* >>>> >>>> >>>> >> >> >> -- >> Imesh Gunaratne >> >> Technical Lead, WSO2 >> Committer & PMC Member, Apache Stratos >> > > > > -- > > Udara Liyanage > Software Engineer > WSO2, Inc.: http://wso2.com > lean. enterprise. middleware > > web: http://udaraliyanage.wordpress.com > phone: +94 71 443 6897 > -- Imesh Gunaratne Technical Lead, WSO2 Committer & PMC Member, Apache Stratos