Return-Path: X-Original-To: apmail-incubator-cloudstack-users-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0CCB0EBD2 for ; Thu, 27 Dec 2012 20:24:04 +0000 (UTC) Received: (qmail 24391 invoked by uid 500); 27 Dec 2012 20:24:03 -0000 Delivered-To: apmail-incubator-cloudstack-users-archive@incubator.apache.org Received: (qmail 24161 invoked by uid 500); 27 Dec 2012 20:24:02 -0000 Mailing-List: contact cloudstack-users-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-users@incubator.apache.org Delivered-To: mailing list cloudstack-users@incubator.apache.org Received: (qmail 24143 invoked by uid 99); 27 Dec 2012 20:24:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Dec 2012 20:24:02 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rohit.yadav@citrix.com designates 203.166.19.134 as permitted sender) Received: from [203.166.19.134] (HELO SMTP.CITRIX.COM.AU) (203.166.19.134) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Dec 2012 20:23:57 +0000 X-IronPort-AV: E=Sophos;i="4.84,363,1355097600"; d="scan'208";a="207852" Received: from banpmailmx01.citrite.net ([10.103.128.73]) by SYDPIPO01.CITRIX.COM.AU with ESMTP/TLS/RC4-MD5; 27 Dec 2012 20:23:34 +0000 Received: from BANPMAILBOX01.citrite.net ([10.103.128.72]) by BANPMAILMX01.citrite.net ([10.103.128.73]) with mapi; Fri, 28 Dec 2012 01:53:32 +0530 From: Rohit Yadav To: "cloudstack-users@incubator.apache.org" CC: "cloudstack-dev@incubator.apache.org" Date: Fri, 28 Dec 2012 01:53:29 +0530 Subject: Re: [VOTE] Enforcing UUID string in API query Thread-Topic: [VOTE] Enforcing UUID string in API query Thread-Index: Ac3kcAmDXpcuRUZ7Ry28gS2RkypoiA== Message-ID: <895602AE-827D-4DE4-8146-54D865A0EC27@citrix.com> References: <8E81A714-9DA8-4A67-8421-EB256932D027@citrix.com> In-Reply-To: <8E81A714-9DA8-4A67-8421-EB256932D027@citrix.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Forgot to mention, let's keep the voting period open till 7th Jan 2013 12:0= 0 GMT, i.e. as a lot of people are offline. On 27-Dec-2012, at 12:11 PM, Rohit Yadav wrote: > Hi, >=20 > I'm asking for the community to vote if they want to enforce UUID string = to be used in parameters while querying an API. This would break any client= or script that uses internal ID. AFAIK api response (json or xml, since 3.= x for sure) always have had UUIDs so if any client/script that uses apis to= query entities and base their further operations using ids from the respon= se(s) should be fine. >=20 > You may vote by: > +1 Agree > 0 No opinion > -1 Disagree >=20 > Some context and description: >=20 > CloudStack uses internal IDs which are long ints and they have a mapping = between this ID and the external ID or UUID which is a random string of cha= racters. > There are DAO classes which provides a mechanism to query a particular ta= ble(s) and do other operations. There are VO objects which can hold content= of a row. In most VO objects a method getId() would return a long int numb= er which is the internal ID of that entity and they would have a getUuid() = which returns a unique random string of chars. >=20 > At present an API can be queried with both ids, for example for param dom= ainid using uuid in 1 and using id in 2: >=20 > 1. http://localhost:8080/client?command=3DlistResourceLimits&domainid=3D8= 664e04a-9931-4765-b3456e6888d0fa1d > 2. http://localhost:8080/client?command=3DlistResourceLimits&domainid=3D1 >=20 > For querying using id, the caller should have idea of the id for that ent= ity and which is only possible if they have access to CloudStack's database= . There is no other way of knowing an entity's id, only uuids are sent as i= ds in the response. >=20 > Regards. >=20 >=20