You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Kirk Jantzer <ki...@gmail.com> on 2013/04/17 19:13:42 UTC

API - listTemplates, not working or I am doing something wrong??

When I do the following:

api?command=listTemplates&templatefilter=featured&apikey=******&response=json

The result is the following (I have tried the API key of a domain admin and
root admin, as well as a cookie session after GUI login - all yielded same
result):

{ "listtemplatesresponse" :
{"uuidList":[],"errorcode":401,"errortext":"unable to verify user
credentials and/or request signature"} }


Per this forum post, there was a suggestion to change the case of the
commands - that changed the output, but still didn't work:

api?command=listtemplates&templatefilter=featured&apikey=******&response=json

{ "errorresponse" : {"uuidList":[],"errorcode":432,"errortext":"The
given command does not exist"} }

Re: API - listTemplates, not working or I am doing something wrong??

Posted by Nikita Gubenko <ni...@gmail.com>.
I suppose you also need to generate signature. The info on it you can find
in the API doc.


On Wed, Apr 17, 2013 at 9:13 PM, Kirk Jantzer <ki...@gmail.com>wrote:

> When I do the following:
>
>
> api?command=listTemplates&templatefilter=featured&apikey=******&response=json
>
> The result is the following (I have tried the API key of a domain admin and
> root admin, as well as a cookie session after GUI login - all yielded same
> result):
>
> { "listtemplatesresponse" :
> {"uuidList":[],"errorcode":401,"errortext":"unable to verify user
> credentials and/or request signature"} }
>
>
> Per this forum post, there was a suggestion to change the case of the
> commands - that changed the output, but still didn't work:
>
>
> api?command=listtemplates&templatefilter=featured&apikey=******&response=json
>
> { "errorresponse" : {"uuidList":[],"errorcode":432,"errortext":"The
> given command does not exist"} }
>



-- 
Best Regards, Nikita Gubenko

RE: API - listTemplates, not working or I am doing something wrong??

Posted by Vijayendra Bhamidipati <vi...@citrix.com>.
Hi Kirk,

Pasting a rudimentary py script that fires a VM create operation, and in doing so computes and passes on the signature to the VM create API. You can generate the apikey and secretkey for the user in the CS GUI. 


import httplib
import urllib
import urllib2
import hmac
import binascii
from hashlib import sha1
import base64
import os

ip = "10.223.76.20"
port = 8080

apikey = "SFt5KoxRZ3hiQR03MMppTcKQH5iZH47vcvJcADtcD-vl_MUXyPj_S9910AwCdotXZ2ImRwXEzJd30Nk-mjZPQw"

secretkey = "IhV4-fq2Xv-HC29_CtqfQGQo30roW7cjiAzU345O-6C9qdVXUwcOPeF5MBGNTwi3TWfWoggI-Iy6pYQsfnju6A"

respType = "json"
command = "deployVirtualMachine"
zoneId = "8ad0af04-3a20-4d2c-877f-000a568cf23c"
templateId = "1ce7d8c0-a6af-11e2-a9d9-000c29db3315"
hypervisor = "VMware"
serviceOfferingId = "300c45a9-3129-445f-9acf-3f8f14fe81c0"
networkIds = "6f4e78c2-0cd0-4807-b10d-1a8afe42eaa8"
displayname = "vm14"
#autogenerate 15k of userdata.
userdata = b'%s'%(os.urandom(20*1024))

requests = {}
requests["apiKey"] = apikey
requests["response"] = respType
requests["command"] = command
requests["zoneId"] = zoneId
requests["hypervisor"] = hypervisor
requests["serviceOfferingId"] = serviceOfferingId
requests["userdata"] = base64.b64encode(userdata)
requests["displayname"] = displayname
requests["templateId"] = templateId
requests["networkIds"] = networkIds
request = zip(requests.keys(), requests.values())
request.sort(key=lambda x: str.lower(x[0]))

requestUrl = urllib.urlencode(request)
hashStr = "&".join(["=".join([str.lower(r[0]), str.lower(urllib.quote_plus(str(r[1]))).replace("+", "%20")]) for r in request])

sig = urllib.quote_plus(base64.encodestring(hmac.new(secretkey, hashStr, sha1).digest()).strip())
requestUrl += "&signature=%s"%sig

protocol = "http"
path = "/client/api"

url = "%s://%s:%d%s"%(protocol, ip, port, path)
req = urllib2.Request(url, requestUrl)
connection = urllib2.urlopen(req)
response = connection.read()
print response


Regards,
Vijay

-----Original Message-----
From: Kirk Jantzer [mailto:kirk.jantzer@gmail.com] 
Sent: Wednesday, April 17, 2013 11:16 AM
To: Cloudstack users mailing list
Subject: Re: API - listTemplates, not working or I am doing something wrong??

Does anyone have a script for creating signatures?


On Wed, Apr 17, 2013 at 1:31 PM, Kirk Jantzer <ki...@gmail.com>wrote:

> gah. *facepalm* deployvirtualmachine works without a signature, so i 
> didn't think of that.. thanks!
>
>
> On Wed, Apr 17, 2013 at 1:23 PM, Edward Valencia <ed...@redapt.com>wrote:
>
>> The api call needs to have a signature created based on the API and 
>> secrete key, I think this is whats missing in your call:
>>
>>
>> http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.1-incub
>> ating/html/API_Developers_Guide/signing-api-requests.html
>>
>> Also commands are case sensitive but the way and should be used as in 
>> they are in the API docs. Hope this help.
>>
>>
>> On Wednesday, April 17, 2013 at 10:19 AM, Kirk Jantzer wrote:
>> > ok, maybe it's not just 'listtemplates' - I've tried other commands 
>> > and
>> get
>> > the same 'unable to verify...' reply....thoughts??
>> >
>> >
>> > On Wed, Apr 17, 2013 at 1:13 PM, Kirk Jantzer <kirk.jantzer@gmail.com(mailto:
>> kirk.jantzer@gmail.com)>wrote:
>> >
>> > > When I do the following:
>> > >
>> > >
>> > >
>> api?command=listTemplates&templatefilter=featured&apikey=******&respo
>> nse=json
>> > >
>> > > The result is the following (I have tried the API key of a domain
>> admin
>> > > and root admin, as well as a cookie session after GUI login - all
>> yielded
>> > > same result):
>> > >
>> > > { "listtemplatesresponse" :
>> {"uuidList":[],"errorcode":401,"errortext":"unable to verify user 
>> credentials and/or request signature"} }
>> > >
>> > >
>> > > Per this forum post, there was a suggestion to change the case of 
>> > > the commands - that changed the output, but still didn't work:
>> > >
>> > >
>> > >
>> api?command=listtemplates&templatefilter=featured&apikey=******&respo
>> nse=json
>> > >
>> > > { "errorresponse" : 
>> > > {"uuidList":[],"errorcode":432,"errortext":"The
>> given command does not exist"} }
>> >
>> >
>> > --
>> > Regards,
>> >
>> > Kirk Jantzer
>> > c: (678) 561-5475
>> >
>> >
>>
>>
>>
>
>
> --
> Regards,
>
> Kirk Jantzer
> c: (678) 561-5475
>



--
Regards,

Kirk Jantzer
c: (678) 561-5475

Re: API - listTemplates, not working or I am doing something wrong??

Posted by 李栋 <li...@travelsky.com>.
yep,i found finally,Thanks,handsome.

于 2013/11/14 13:44, Min Chen 写道:
> That is because the one stored in sql DB is already encrypted due to
> security reason.  When you deploy CS through source code, encryption is
> turned off, so you are seeing them match.
>
> Thanks
> -min
>
> On 11/13/13 6:04 PM, "李栋" <li...@travelsky.com> wrote:
>
>> And the secretKeys are different between CS UI and database,who knows why?
>> the secreyKey in CS UI is
>> 2hjBSbXyOzUJ495PbSN1M4eM-ppYd9z3sKnJxUMEVovLHwJ9MVtg6bmriB1IVaMx213UFgtYkf
>> s-v7s4s1WIDA 
>>
>> but in CS mysql database is
>> rS/gpVn9SvbhVjjFBtC2zo0Ue2pYTvgaf24gyIzzC4r4LXNxm7djo5desZMsBoPtfH0fVsJw9y
>> q5NYpRgAAiXlZdiY9q4zEL5tjB+yE50p2EQSkLJ6KqsojrQ+uOMrwj
>> I saw they were same if you depoly CS as source code with "ant debug".So
>> magical,hah!
>>
>> 于 2013/4/20 1:27, Kirk Jantzer 写道:
>>> So, I ended up writing something, but it is only returning results for
>>> things I personally have created, even though I am a root admin.
>>> Thoughts?
>>>
>>>
>>> On Wed, Apr 17, 2013 at 2:40 PM, Sebastien Goasguen
>>> <ru...@gmail.com>wrote:
>>>
>>>> On Apr 17, 2013, at 2:38 PM, Kirk Jantzer <ki...@gmail.com>
>>>> wrote:
>>>>
>>>>> thanks for the replies everyone - by chance, anything php based?? :-)
>>>>> looking to build a simple page to do mass deployments, but be able to
>>>>> select offerings based on serviceofferings available the creator's
>>>>> keys…
>>>> If you search for 'cloudstack client' on github there are a few php
>>>> clients I believe.
>>>>
>>>>> On Wed, Apr 17, 2013 at 2:35 PM, Edward Valencia <ed...@redapt.com>
>>>> wrote:
>>>>>> There are two ruby gems that Ive been using to interact with the API:
>>>>>>
>>>>>> cloudstack_helper and cloudstack_ruby_client
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Wednesday, April 17, 2013 at 11:16 AM, Kirk Jantzer wrote:
>>>>>>> Does anyone have a script for creating signatures?
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Apr 17, 2013 at 1:31 PM, Kirk Jantzer
>>>>>>> <kirk.jantzer@gmail.com
>>>> (mailto:
>>>>>> kirk.jantzer@gmail.com)>wrote:
>>>>>>>> gah. *facepalm* deployvirtualmachine works without a signature, so
>>>>>>>> i
>>>>>>>> didn't think of that.. thanks!
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, Apr 17, 2013 at 1:23 PM, Edward Valencia
>>>>>>>> <edwardv@redapt.com
>>>> (mailto:
>>>>>> edwardv@redapt.com)>wrote:
>>>>>>>>> The api call needs to have a signature created based on the API
>>>>>>>>> and
>>>>>>>>> secrete key, I think this is whats missing in your call:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>> http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.1-incubati
>>>> ng/html/API_Developers_Guide/signing-api-requests.html
>>>>>>>>> Also commands are case sensitive but the way and should be used
>>>>>>>>> as in
>>>>>>>>> they are in the API docs. Hope this help.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Wednesday, April 17, 2013 at 10:19 AM, Kirk Jantzer wrote:
>>>>>>>>>> ok, maybe it's not just 'listtemplates' - I've tried other
>>>>>> commands and
>>>>>>>>> get
>>>>>>>>>> the same 'unable to verify...' reply....thoughts??
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Wed, Apr 17, 2013 at 1:13 PM, Kirk Jantzer <
>>>>>> kirk.jantzer@gmail.com (mailto:kirk.jantzer@gmail.com)(mailto:
>>>>>>>>> kirk.jantzer@gmail.com (mailto:kirk.jantzer@gmail.com))>wrote:
>>>>>>>>>>> When I do the following:
>>>> api?command=listTemplates&templatefilter=featured&apikey=******&response
>>>> =json
>>>>>>>>>>> The result is the following (I have tried the API key of a
>>>>>>>>>>> domain
>>>>>>>>> admin
>>>>>>>>>>> and root admin, as well as a cookie session after GUI login -
>>>>>>>>>>> all
>>>>>>>>> yielded
>>>>>>>>>>> same result):
>>>>>>>>>>>
>>>>>>>>>>> { "listtemplatesresponse" :
>>>>>>>>> {"uuidList":[],"errorcode":401,"errortext":"unable to verify user
>>>>>>>>> credentials and/or request signature"} }
>>>>>>>>>>> Per this forum post, there was a suggestion to change the case
>>>>>> of the
>>>>>>>>>>> commands - that changed the output, but still didn't work:
>>>>>>>>>>>
>>>> api?command=listtemplates&templatefilter=featured&apikey=******&response
>>>> =json
>>>>>>>>>>> { "errorresponse" :
>>>>>> {"uuidList":[],"errorcode":432,"errortext":"The
>>>>>>>>> given command does not exist"} }
>>>>>>>>>> --
>>>>>>>>>> Regards,
>>>>>>>>>>
>>>>>>>>>> Kirk Jantzer
>>>>>>>>>> c: (678) 561-5475
>>>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Regards,
>>>>>>>>
>>>>>>>> Kirk Jantzer
>>>>>>>> c: (678) 561-5475
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Regards,
>>>>>>>
>>>>>>> Kirk Jantzer
>>>>>>> c: (678) 561-5475
>>>>>>>
>>>>>>>
>>>>>>
>>>>> --
>>>>> Regards,
>>>>>
>>>>> Kirk Jantzer
>>>>> c: (678) 561-5475
>> -- 
>> Li Dong Cloud Product Technology Manager +86 571 18657172575 Travelsky
>> Outsourcing Service Department Address: Room 1803,No.705 Yatai Road Nanhu
>> District,Jiaxing City,Zhejiang 314006,P.R.China
>>

-- 
Li Dong Cloud Product Technology Manager +86 571 18657172575 Travelsky Outsourcing Service Department Address: Room 1803,No.705 Yatai Road Nanhu District,Jiaxing City,Zhejiang 314006,P.R.China 



Re: API - listTemplates, not working or I am doing something wrong??

Posted by Min Chen <mi...@citrix.com>.
That is because the one stored in sql DB is already encrypted due to
security reason.  When you deploy CS through source code, encryption is
turned off, so you are seeing them match.

Thanks
-min

On 11/13/13 6:04 PM, "李栋" <li...@travelsky.com> wrote:

>And the secretKeys are different between CS UI and database,who knows why?
>the secreyKey in CS UI is
>2hjBSbXyOzUJ495PbSN1M4eM-ppYd9z3sKnJxUMEVovLHwJ9MVtg6bmriB1IVaMx213UFgtYkf
>s-v7s4s1WIDA 
>
>but in CS mysql database is
>rS/gpVn9SvbhVjjFBtC2zo0Ue2pYTvgaf24gyIzzC4r4LXNxm7djo5desZMsBoPtfH0fVsJw9y
>q5NYpRgAAiXlZdiY9q4zEL5tjB+yE50p2EQSkLJ6KqsojrQ+uOMrwj
>I saw they were same if you depoly CS as source code with "ant debug".So
>magical,hah!
>
>于 2013/4/20 1:27, Kirk Jantzer 写道:
>> So, I ended up writing something, but it is only returning results for
>> things I personally have created, even though I am a root admin.
>>Thoughts?
>>
>>
>> On Wed, Apr 17, 2013 at 2:40 PM, Sebastien Goasguen
>><ru...@gmail.com>wrote:
>>
>>> On Apr 17, 2013, at 2:38 PM, Kirk Jantzer <ki...@gmail.com>
>>>wrote:
>>>
>>>> thanks for the replies everyone - by chance, anything php based?? :-)
>>>> looking to build a simple page to do mass deployments, but be able to
>>>> select offerings based on serviceofferings available the creator's
>>>>keys…
>>> If you search for 'cloudstack client' on github there are a few php
>>> clients I believe.
>>>
>>>>
>>>> On Wed, Apr 17, 2013 at 2:35 PM, Edward Valencia <ed...@redapt.com>
>>> wrote:
>>>>> There are two ruby gems that Ive been using to interact with the API:
>>>>>
>>>>> cloudstack_helper and cloudstack_ruby_client
>>>>>
>>>>>
>>>>>
>>>>> On Wednesday, April 17, 2013 at 11:16 AM, Kirk Jantzer wrote:
>>>>>> Does anyone have a script for creating signatures?
>>>>>>
>>>>>>
>>>>>> On Wed, Apr 17, 2013 at 1:31 PM, Kirk Jantzer
>>>>>><kirk.jantzer@gmail.com
>>> (mailto:
>>>>> kirk.jantzer@gmail.com)>wrote:
>>>>>>> gah. *facepalm* deployvirtualmachine works without a signature, so
>>>>>>>i
>>>>>>> didn't think of that.. thanks!
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Apr 17, 2013 at 1:23 PM, Edward Valencia
>>>>>>><edwardv@redapt.com
>>> (mailto:
>>>>> edwardv@redapt.com)>wrote:
>>>>>>>> The api call needs to have a signature created based on the API
>>>>>>>>and
>>>>>>>> secrete key, I think this is whats missing in your call:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>> 
>>>http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.1-incubati
>>>ng/html/API_Developers_Guide/signing-api-requests.html
>>>>>>>> Also commands are case sensitive but the way and should be used
>>>>>>>>as in
>>>>>>>> they are in the API docs. Hope this help.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wednesday, April 17, 2013 at 10:19 AM, Kirk Jantzer wrote:
>>>>>>>>> ok, maybe it's not just 'listtemplates' - I've tried other
>>>>> commands and
>>>>>>>> get
>>>>>>>>> the same 'unable to verify...' reply....thoughts??
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Wed, Apr 17, 2013 at 1:13 PM, Kirk Jantzer <
>>>>> kirk.jantzer@gmail.com (mailto:kirk.jantzer@gmail.com)(mailto:
>>>>>>>> kirk.jantzer@gmail.com (mailto:kirk.jantzer@gmail.com))>wrote:
>>>>>>>>>> When I do the following:
>>> 
>>>api?command=listTemplates&templatefilter=featured&apikey=******&response
>>>=json
>>>>>>>>>> The result is the following (I have tried the API key of a
>>>>>>>>>>domain
>>>>>>>> admin
>>>>>>>>>> and root admin, as well as a cookie session after GUI login -
>>>>>>>>>>all
>>>>>>>> yielded
>>>>>>>>>> same result):
>>>>>>>>>>
>>>>>>>>>> { "listtemplatesresponse" :
>>>>>>>> {"uuidList":[],"errorcode":401,"errortext":"unable to verify user
>>>>>>>> credentials and/or request signature"} }
>>>>>>>>>>
>>>>>>>>>> Per this forum post, there was a suggestion to change the case
>>>>> of the
>>>>>>>>>> commands - that changed the output, but still didn't work:
>>>>>>>>>>
>>>>>>>>
>>> 
>>>api?command=listtemplates&templatefilter=featured&apikey=******&response
>>>=json
>>>>>>>>>> { "errorresponse" :
>>>>> {"uuidList":[],"errorcode":432,"errortext":"The
>>>>>>>> given command does not exist"} }
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Regards,
>>>>>>>>>
>>>>>>>>> Kirk Jantzer
>>>>>>>>> c: (678) 561-5475
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Regards,
>>>>>>>
>>>>>>> Kirk Jantzer
>>>>>>> c: (678) 561-5475
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Regards,
>>>>>>
>>>>>> Kirk Jantzer
>>>>>> c: (678) 561-5475
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> Regards,
>>>>
>>>> Kirk Jantzer
>>>> c: (678) 561-5475
>>>
>>
>
>-- 
>Li Dong Cloud Product Technology Manager +86 571 18657172575 Travelsky
>Outsourcing Service Department Address: Room 1803,No.705 Yatai Road Nanhu
>District,Jiaxing City,Zhejiang 314006,P.R.China
>


Re: API - listTemplates, not working or I am doing something wrong??

Posted by 李栋 <li...@travelsky.com>.
And the secretKeys are different between CS UI and database,who knows why?
the secreyKey in CS UI is 
2hjBSbXyOzUJ495PbSN1M4eM-ppYd9z3sKnJxUMEVovLHwJ9MVtg6bmriB1IVaMx213UFgtYkfs-v7s4s1WIDA 

but in CS mysql database is 
rS/gpVn9SvbhVjjFBtC2zo0Ue2pYTvgaf24gyIzzC4r4LXNxm7djo5desZMsBoPtfH0fVsJw9yq5NYpRgAAiXlZdiY9q4zEL5tjB+yE50p2EQSkLJ6KqsojrQ+uOMrwj
I saw they were same if you depoly CS as source code with "ant debug".So 
magical,hah!

于 2013/4/20 1:27, Kirk Jantzer 写道:
> So, I ended up writing something, but it is only returning results for
> things I personally have created, even though I am a root admin. Thoughts?
>
>
> On Wed, Apr 17, 2013 at 2:40 PM, Sebastien Goasguen <ru...@gmail.com>wrote:
>
>> On Apr 17, 2013, at 2:38 PM, Kirk Jantzer <ki...@gmail.com> wrote:
>>
>>> thanks for the replies everyone - by chance, anything php based?? :-)
>>> looking to build a simple page to do mass deployments, but be able to
>>> select offerings based on serviceofferings available the creator's keys…
>> If you search for 'cloudstack client' on github there are a few php
>> clients I believe.
>>
>>>
>>> On Wed, Apr 17, 2013 at 2:35 PM, Edward Valencia <ed...@redapt.com>
>> wrote:
>>>> There are two ruby gems that Ive been using to interact with the API:
>>>>
>>>> cloudstack_helper and cloudstack_ruby_client
>>>>
>>>>
>>>>
>>>> On Wednesday, April 17, 2013 at 11:16 AM, Kirk Jantzer wrote:
>>>>> Does anyone have a script for creating signatures?
>>>>>
>>>>>
>>>>> On Wed, Apr 17, 2013 at 1:31 PM, Kirk Jantzer <kirk.jantzer@gmail.com
>> (mailto:
>>>> kirk.jantzer@gmail.com)>wrote:
>>>>>> gah. *facepalm* deployvirtualmachine works without a signature, so i
>>>>>> didn't think of that.. thanks!
>>>>>>
>>>>>>
>>>>>> On Wed, Apr 17, 2013 at 1:23 PM, Edward Valencia <edwardv@redapt.com
>> (mailto:
>>>> edwardv@redapt.com)>wrote:
>>>>>>> The api call needs to have a signature created based on the API and
>>>>>>> secrete key, I think this is whats missing in your call:
>>>>>>>
>>>>>>>
>>>>>>>
>> http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.1-incubating/html/API_Developers_Guide/signing-api-requests.html
>>>>>>> Also commands are case sensitive but the way and should be used as in
>>>>>>> they are in the API docs. Hope this help.
>>>>>>>
>>>>>>>
>>>>>>> On Wednesday, April 17, 2013 at 10:19 AM, Kirk Jantzer wrote:
>>>>>>>> ok, maybe it's not just 'listtemplates' - I've tried other
>>>> commands and
>>>>>>> get
>>>>>>>> the same 'unable to verify...' reply....thoughts??
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, Apr 17, 2013 at 1:13 PM, Kirk Jantzer <
>>>> kirk.jantzer@gmail.com (mailto:kirk.jantzer@gmail.com)(mailto:
>>>>>>> kirk.jantzer@gmail.com (mailto:kirk.jantzer@gmail.com))>wrote:
>>>>>>>>> When I do the following:
>> api?command=listTemplates&templatefilter=featured&apikey=******&response=json
>>>>>>>>> The result is the following (I have tried the API key of a domain
>>>>>>> admin
>>>>>>>>> and root admin, as well as a cookie session after GUI login - all
>>>>>>> yielded
>>>>>>>>> same result):
>>>>>>>>>
>>>>>>>>> { "listtemplatesresponse" :
>>>>>>> {"uuidList":[],"errorcode":401,"errortext":"unable to verify user
>>>>>>> credentials and/or request signature"} }
>>>>>>>>>
>>>>>>>>> Per this forum post, there was a suggestion to change the case
>>>> of the
>>>>>>>>> commands - that changed the output, but still didn't work:
>>>>>>>>>
>>>>>>>
>> api?command=listtemplates&templatefilter=featured&apikey=******&response=json
>>>>>>>>> { "errorresponse" :
>>>> {"uuidList":[],"errorcode":432,"errortext":"The
>>>>>>> given command does not exist"} }
>>>>>>>>
>>>>>>>> --
>>>>>>>> Regards,
>>>>>>>>
>>>>>>>> Kirk Jantzer
>>>>>>>> c: (678) 561-5475
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Regards,
>>>>>>
>>>>>> Kirk Jantzer
>>>>>> c: (678) 561-5475
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Regards,
>>>>>
>>>>> Kirk Jantzer
>>>>> c: (678) 561-5475
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> Regards,
>>>
>>> Kirk Jantzer
>>> c: (678) 561-5475
>>
>

-- 
Li Dong Cloud Product Technology Manager +86 571 18657172575 Travelsky Outsourcing Service Department Address: Room 1803,No.705 Yatai Road Nanhu District,Jiaxing City,Zhejiang 314006,P.R.China


Re: API - listTemplates, not working or I am doing something wrong??

Posted by Nitin Mehta <Ni...@citrix.com>.
In addition to what Sebestian suggested use any of the flags as you see
right. See if you get the desired results

featured, 	        // returns templates that have been marked as featured
and public
self,             	// returns templates that have been registered or
created by the calling user
selfexecutable, 	// same as self, but only returns templates that are
ready to be deployed with
shared executable,	   // ready templates that have been granted to the
calling user by another user
executable, 		// templates that are owned by the calling user, or public
templates, that can be used to deploy a new VM
community, 		// returns templates that have been marked as public but not
featured
all 			// returns all templates (only usable by admins)



On 19/04/13 11:19 PM, "Sebastien Goasguen" <ru...@gmail.com> wrote:

>
>On Apr 19, 2013, at 1:27 PM, Kirk Jantzer <ki...@gmail.com> wrote:
>
>> So, I ended up writing something, but it is only returning results for
>> things I personally have created, even though I am a root admin.
>>Thoughts?
>> 
>> 
>
>try to pass: templatefilter=all as arguments
>
>> On Wed, Apr 17, 2013 at 2:40 PM, Sebastien Goasguen
>><ru...@gmail.com>wrote:
>> 
>>> 
>>> On Apr 17, 2013, at 2:38 PM, Kirk Jantzer <ki...@gmail.com>
>>>wrote:
>>> 
>>>> thanks for the replies everyone - by chance, anything php based?? :-)
>>>> looking to build a simple page to do mass deployments, but be able to
>>>> select offerings based on serviceofferings available the creator's
>>>>keysŠ
>>> 
>>> If you search for 'cloudstack client' on github there are a few php
>>> clients I believe.
>>> 
>>>> 
>>>> 
>>>> On Wed, Apr 17, 2013 at 2:35 PM, Edward Valencia <ed...@redapt.com>
>>> wrote:
>>>> 
>>>>> 
>>>>> There are two ruby gems that Ive been using to interact with the API:
>>>>> 
>>>>> cloudstack_helper and cloudstack_ruby_client
>>>>> 
>>>>> 
>>>>> 
>>>>> On Wednesday, April 17, 2013 at 11:16 AM, Kirk Jantzer wrote:
>>>>>> Does anyone have a script for creating signatures?
>>>>>> 
>>>>>> 
>>>>>> On Wed, Apr 17, 2013 at 1:31 PM, Kirk Jantzer
>>>>>><kirk.jantzer@gmail.com
>>> (mailto:
>>>>> kirk.jantzer@gmail.com)>wrote:
>>>>>> 
>>>>>>> gah. *facepalm* deployvirtualmachine works without a signature, so
>>>>>>>i
>>>>>>> didn't think of that.. thanks!
>>>>>>> 
>>>>>>> 
>>>>>>> On Wed, Apr 17, 2013 at 1:23 PM, Edward Valencia
>>>>>>><edwardv@redapt.com
>>> (mailto:
>>>>> edwardv@redapt.com)>wrote:
>>>>>>> 
>>>>>>>> The api call needs to have a signature created based on the API
>>>>>>>>and
>>>>>>>> secrete key, I think this is whats missing in your call:
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>> 
>>> 
>>>http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.1-incubati
>>>ng/html/API_Developers_Guide/signing-api-requests.html
>>>>>>>> 
>>>>>>>> Also commands are case sensitive but the way and should be used
>>>>>>>>as in
>>>>>>>> they are in the API docs. Hope this help.
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On Wednesday, April 17, 2013 at 10:19 AM, Kirk Jantzer wrote:
>>>>>>>>> ok, maybe it's not just 'listtemplates' - I've tried other
>>>>> commands and
>>>>>>>> 
>>>>>>>> get
>>>>>>>>> the same 'unable to verify...' reply....thoughts??
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> On Wed, Apr 17, 2013 at 1:13 PM, Kirk Jantzer <
>>>>> kirk.jantzer@gmail.com (mailto:kirk.jantzer@gmail.com)(mailto:
>>>>>>>> kirk.jantzer@gmail.com (mailto:kirk.jantzer@gmail.com))>wrote:
>>>>>>>>> 
>>>>>>>>>> When I do the following:
>>>>>>>> 
>>>>> 
>>> 
>>>api?command=listTemplates&templatefilter=featured&apikey=******&response
>>>=json
>>>>>>>>>> 
>>>>>>>>>> The result is the following (I have tried the API key of a
>>>>>>>>>>domain
>>>>>>>> admin
>>>>>>>>>> and root admin, as well as a cookie session after GUI login -
>>>>>>>>>>all
>>>>>>>>> 
>>>>>>>> 
>>>>>>>> yielded
>>>>>>>>>> same result):
>>>>>>>>>> 
>>>>>>>>>> { "listtemplatesresponse" :
>>>>>>>> {"uuidList":[],"errorcode":401,"errortext":"unable to verify user
>>>>>>>> credentials and/or request signature"} }
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> Per this forum post, there was a suggestion to change the case
>>>>> of the
>>>>>>>>>> commands - that changed the output, but still didn't work:
>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>> 
>>> 
>>>api?command=listtemplates&templatefilter=featured&apikey=******&response
>>>=json
>>>>>>>>>> 
>>>>>>>>>> { "errorresponse" :
>>>>> {"uuidList":[],"errorcode":432,"errortext":"The
>>>>>>>> given command does not exist"} }
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> --
>>>>>>>>> Regards,
>>>>>>>>> 
>>>>>>>>> Kirk Jantzer
>>>>>>>>> c: (678) 561-5475
>>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> --
>>>>>>> Regards,
>>>>>>> 
>>>>>>> Kirk Jantzer
>>>>>>> c: (678) 561-5475
>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> --
>>>>>> Regards,
>>>>>> 
>>>>>> Kirk Jantzer
>>>>>> c: (678) 561-5475
>>>>>> 
>>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> --
>>>> Regards,
>>>> 
>>>> Kirk Jantzer
>>>> c: (678) 561-5475
>>> 
>>> 
>> 
>> 
>> -- 
>> Regards,
>> 
>> Kirk Jantzer
>> c: (678) 561-5475
>


Re: API - listTemplates, not working or I am doing something wrong??

Posted by Sebastien Goasguen <ru...@gmail.com>.
On Apr 19, 2013, at 1:27 PM, Kirk Jantzer <ki...@gmail.com> wrote:

> So, I ended up writing something, but it is only returning results for
> things I personally have created, even though I am a root admin. Thoughts?
> 
> 

try to pass: templatefilter=all as arguments

> On Wed, Apr 17, 2013 at 2:40 PM, Sebastien Goasguen <ru...@gmail.com>wrote:
> 
>> 
>> On Apr 17, 2013, at 2:38 PM, Kirk Jantzer <ki...@gmail.com> wrote:
>> 
>>> thanks for the replies everyone - by chance, anything php based?? :-)
>>> looking to build a simple page to do mass deployments, but be able to
>>> select offerings based on serviceofferings available the creator's keys…
>> 
>> If you search for 'cloudstack client' on github there are a few php
>> clients I believe.
>> 
>>> 
>>> 
>>> On Wed, Apr 17, 2013 at 2:35 PM, Edward Valencia <ed...@redapt.com>
>> wrote:
>>> 
>>>> 
>>>> There are two ruby gems that Ive been using to interact with the API:
>>>> 
>>>> cloudstack_helper and cloudstack_ruby_client
>>>> 
>>>> 
>>>> 
>>>> On Wednesday, April 17, 2013 at 11:16 AM, Kirk Jantzer wrote:
>>>>> Does anyone have a script for creating signatures?
>>>>> 
>>>>> 
>>>>> On Wed, Apr 17, 2013 at 1:31 PM, Kirk Jantzer <kirk.jantzer@gmail.com
>> (mailto:
>>>> kirk.jantzer@gmail.com)>wrote:
>>>>> 
>>>>>> gah. *facepalm* deployvirtualmachine works without a signature, so i
>>>>>> didn't think of that.. thanks!
>>>>>> 
>>>>>> 
>>>>>> On Wed, Apr 17, 2013 at 1:23 PM, Edward Valencia <edwardv@redapt.com
>> (mailto:
>>>> edwardv@redapt.com)>wrote:
>>>>>> 
>>>>>>> The api call needs to have a signature created based on the API and
>>>>>>> secrete key, I think this is whats missing in your call:
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>> 
>> http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.1-incubating/html/API_Developers_Guide/signing-api-requests.html
>>>>>>> 
>>>>>>> Also commands are case sensitive but the way and should be used as in
>>>>>>> they are in the API docs. Hope this help.
>>>>>>> 
>>>>>>> 
>>>>>>> On Wednesday, April 17, 2013 at 10:19 AM, Kirk Jantzer wrote:
>>>>>>>> ok, maybe it's not just 'listtemplates' - I've tried other
>>>> commands and
>>>>>>> 
>>>>>>> get
>>>>>>>> the same 'unable to verify...' reply....thoughts??
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On Wed, Apr 17, 2013 at 1:13 PM, Kirk Jantzer <
>>>> kirk.jantzer@gmail.com (mailto:kirk.jantzer@gmail.com)(mailto:
>>>>>>> kirk.jantzer@gmail.com (mailto:kirk.jantzer@gmail.com))>wrote:
>>>>>>>> 
>>>>>>>>> When I do the following:
>>>>>>> 
>>>> 
>> api?command=listTemplates&templatefilter=featured&apikey=******&response=json
>>>>>>>>> 
>>>>>>>>> The result is the following (I have tried the API key of a domain
>>>>>>> admin
>>>>>>>>> and root admin, as well as a cookie session after GUI login - all
>>>>>>>> 
>>>>>>> 
>>>>>>> yielded
>>>>>>>>> same result):
>>>>>>>>> 
>>>>>>>>> { "listtemplatesresponse" :
>>>>>>> {"uuidList":[],"errorcode":401,"errortext":"unable to verify user
>>>>>>> credentials and/or request signature"} }
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> Per this forum post, there was a suggestion to change the case
>>>> of the
>>>>>>>>> commands - that changed the output, but still didn't work:
>>>>>>>>> 
>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>> 
>> api?command=listtemplates&templatefilter=featured&apikey=******&response=json
>>>>>>>>> 
>>>>>>>>> { "errorresponse" :
>>>> {"uuidList":[],"errorcode":432,"errortext":"The
>>>>>>> given command does not exist"} }
>>>>>>>> 
>>>>>>>> 
>>>>>>>> --
>>>>>>>> Regards,
>>>>>>>> 
>>>>>>>> Kirk Jantzer
>>>>>>>> c: (678) 561-5475
>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> --
>>>>>> Regards,
>>>>>> 
>>>>>> Kirk Jantzer
>>>>>> c: (678) 561-5475
>>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> Regards,
>>>>> 
>>>>> Kirk Jantzer
>>>>> c: (678) 561-5475
>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> 
>>> 
>>> 
>>> --
>>> Regards,
>>> 
>>> Kirk Jantzer
>>> c: (678) 561-5475
>> 
>> 
> 
> 
> -- 
> Regards,
> 
> Kirk Jantzer
> c: (678) 561-5475


Re: API - listTemplates, not working or I am doing something wrong??

Posted by Kirk Jantzer <ki...@gmail.com>.
So, I ended up writing something, but it is only returning results for
things I personally have created, even though I am a root admin. Thoughts?


On Wed, Apr 17, 2013 at 2:40 PM, Sebastien Goasguen <ru...@gmail.com>wrote:

>
> On Apr 17, 2013, at 2:38 PM, Kirk Jantzer <ki...@gmail.com> wrote:
>
> > thanks for the replies everyone - by chance, anything php based?? :-)
> > looking to build a simple page to do mass deployments, but be able to
> > select offerings based on serviceofferings available the creator's keys…
>
> If you search for 'cloudstack client' on github there are a few php
> clients I believe.
>
> >
> >
> > On Wed, Apr 17, 2013 at 2:35 PM, Edward Valencia <ed...@redapt.com>
> wrote:
> >
> >>
> >> There are two ruby gems that Ive been using to interact with the API:
> >>
> >> cloudstack_helper and cloudstack_ruby_client
> >>
> >>
> >>
> >> On Wednesday, April 17, 2013 at 11:16 AM, Kirk Jantzer wrote:
> >>> Does anyone have a script for creating signatures?
> >>>
> >>>
> >>> On Wed, Apr 17, 2013 at 1:31 PM, Kirk Jantzer <kirk.jantzer@gmail.com
> (mailto:
> >> kirk.jantzer@gmail.com)>wrote:
> >>>
> >>>> gah. *facepalm* deployvirtualmachine works without a signature, so i
> >>>> didn't think of that.. thanks!
> >>>>
> >>>>
> >>>> On Wed, Apr 17, 2013 at 1:23 PM, Edward Valencia <edwardv@redapt.com
> (mailto:
> >> edwardv@redapt.com)>wrote:
> >>>>
> >>>>> The api call needs to have a signature created based on the API and
> >>>>> secrete key, I think this is whats missing in your call:
> >>>>>
> >>>>>
> >>>>>
> >>
> http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.1-incubating/html/API_Developers_Guide/signing-api-requests.html
> >>>>>
> >>>>> Also commands are case sensitive but the way and should be used as in
> >>>>> they are in the API docs. Hope this help.
> >>>>>
> >>>>>
> >>>>> On Wednesday, April 17, 2013 at 10:19 AM, Kirk Jantzer wrote:
> >>>>>> ok, maybe it's not just 'listtemplates' - I've tried other
> >> commands and
> >>>>>
> >>>>> get
> >>>>>> the same 'unable to verify...' reply....thoughts??
> >>>>>>
> >>>>>>
> >>>>>> On Wed, Apr 17, 2013 at 1:13 PM, Kirk Jantzer <
> >> kirk.jantzer@gmail.com (mailto:kirk.jantzer@gmail.com)(mailto:
> >>>>> kirk.jantzer@gmail.com (mailto:kirk.jantzer@gmail.com))>wrote:
> >>>>>>
> >>>>>>> When I do the following:
> >>>>>
> >>
> api?command=listTemplates&templatefilter=featured&apikey=******&response=json
> >>>>>>>
> >>>>>>> The result is the following (I have tried the API key of a domain
> >>>>> admin
> >>>>>>> and root admin, as well as a cookie session after GUI login - all
> >>>>>>
> >>>>>
> >>>>> yielded
> >>>>>>> same result):
> >>>>>>>
> >>>>>>> { "listtemplatesresponse" :
> >>>>> {"uuidList":[],"errorcode":401,"errortext":"unable to verify user
> >>>>> credentials and/or request signature"} }
> >>>>>>>
> >>>>>>>
> >>>>>>> Per this forum post, there was a suggestion to change the case
> >> of the
> >>>>>>> commands - that changed the output, but still didn't work:
> >>>>>>>
> >>>>>>
> >>>>>
> >>>>>
> >>
> api?command=listtemplates&templatefilter=featured&apikey=******&response=json
> >>>>>>>
> >>>>>>> { "errorresponse" :
> >> {"uuidList":[],"errorcode":432,"errortext":"The
> >>>>> given command does not exist"} }
> >>>>>>
> >>>>>>
> >>>>>> --
> >>>>>> Regards,
> >>>>>>
> >>>>>> Kirk Jantzer
> >>>>>> c: (678) 561-5475
> >>>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> Regards,
> >>>>
> >>>> Kirk Jantzer
> >>>> c: (678) 561-5475
> >>>>
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> Regards,
> >>>
> >>> Kirk Jantzer
> >>> c: (678) 561-5475
> >>>
> >>>
> >>
> >>
> >>
> >
> >
> > --
> > Regards,
> >
> > Kirk Jantzer
> > c: (678) 561-5475
>
>


-- 
Regards,

Kirk Jantzer
c: (678) 561-5475

Re: API - listTemplates, not working or I am doing something wrong??

Posted by Sebastien Goasguen <ru...@gmail.com>.
On Apr 17, 2013, at 2:38 PM, Kirk Jantzer <ki...@gmail.com> wrote:

> thanks for the replies everyone - by chance, anything php based?? :-)
> looking to build a simple page to do mass deployments, but be able to
> select offerings based on serviceofferings available the creator's keys…

If you search for 'cloudstack client' on github there are a few php clients I believe.

> 
> 
> On Wed, Apr 17, 2013 at 2:35 PM, Edward Valencia <ed...@redapt.com> wrote:
> 
>> 
>> There are two ruby gems that Ive been using to interact with the API:
>> 
>> cloudstack_helper and cloudstack_ruby_client
>> 
>> 
>> 
>> On Wednesday, April 17, 2013 at 11:16 AM, Kirk Jantzer wrote:
>>> Does anyone have a script for creating signatures?
>>> 
>>> 
>>> On Wed, Apr 17, 2013 at 1:31 PM, Kirk Jantzer <kirk.jantzer@gmail.com(mailto:
>> kirk.jantzer@gmail.com)>wrote:
>>> 
>>>> gah. *facepalm* deployvirtualmachine works without a signature, so i
>>>> didn't think of that.. thanks!
>>>> 
>>>> 
>>>> On Wed, Apr 17, 2013 at 1:23 PM, Edward Valencia <edwardv@redapt.com(mailto:
>> edwardv@redapt.com)>wrote:
>>>> 
>>>>> The api call needs to have a signature created based on the API and
>>>>> secrete key, I think this is whats missing in your call:
>>>>> 
>>>>> 
>>>>> 
>> http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.1-incubating/html/API_Developers_Guide/signing-api-requests.html
>>>>> 
>>>>> Also commands are case sensitive but the way and should be used as in
>>>>> they are in the API docs. Hope this help.
>>>>> 
>>>>> 
>>>>> On Wednesday, April 17, 2013 at 10:19 AM, Kirk Jantzer wrote:
>>>>>> ok, maybe it's not just 'listtemplates' - I've tried other
>> commands and
>>>>> 
>>>>> get
>>>>>> the same 'unable to verify...' reply....thoughts??
>>>>>> 
>>>>>> 
>>>>>> On Wed, Apr 17, 2013 at 1:13 PM, Kirk Jantzer <
>> kirk.jantzer@gmail.com (mailto:kirk.jantzer@gmail.com)(mailto:
>>>>> kirk.jantzer@gmail.com (mailto:kirk.jantzer@gmail.com))>wrote:
>>>>>> 
>>>>>>> When I do the following:
>>>>> 
>> api?command=listTemplates&templatefilter=featured&apikey=******&response=json
>>>>>>> 
>>>>>>> The result is the following (I have tried the API key of a domain
>>>>> admin
>>>>>>> and root admin, as well as a cookie session after GUI login - all
>>>>>> 
>>>>> 
>>>>> yielded
>>>>>>> same result):
>>>>>>> 
>>>>>>> { "listtemplatesresponse" :
>>>>> {"uuidList":[],"errorcode":401,"errortext":"unable to verify user
>>>>> credentials and/or request signature"} }
>>>>>>> 
>>>>>>> 
>>>>>>> Per this forum post, there was a suggestion to change the case
>> of the
>>>>>>> commands - that changed the output, but still didn't work:
>>>>>>> 
>>>>>> 
>>>>> 
>>>>> 
>> api?command=listtemplates&templatefilter=featured&apikey=******&response=json
>>>>>>> 
>>>>>>> { "errorresponse" :
>> {"uuidList":[],"errorcode":432,"errortext":"The
>>>>> given command does not exist"} }
>>>>>> 
>>>>>> 
>>>>>> --
>>>>>> Regards,
>>>>>> 
>>>>>> Kirk Jantzer
>>>>>> c: (678) 561-5475
>>>>>> 
>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> 
>>>> --
>>>> Regards,
>>>> 
>>>> Kirk Jantzer
>>>> c: (678) 561-5475
>>>> 
>>> 
>>> 
>>> 
>>> 
>>> --
>>> Regards,
>>> 
>>> Kirk Jantzer
>>> c: (678) 561-5475
>>> 
>>> 
>> 
>> 
>> 
> 
> 
> -- 
> Regards,
> 
> Kirk Jantzer
> c: (678) 561-5475


Re: API - listTemplates, not working or I am doing something wrong??

Posted by Kirk Jantzer <ki...@gmail.com>.
thanks for the replies everyone - by chance, anything php based?? :-)
looking to build a simple page to do mass deployments, but be able to
select offerings based on serviceofferings available the creator's keys...


On Wed, Apr 17, 2013 at 2:35 PM, Edward Valencia <ed...@redapt.com> wrote:

>
> There are two ruby gems that Ive been using to interact with the API:
>
> cloudstack_helper and cloudstack_ruby_client
>
>
>
> On Wednesday, April 17, 2013 at 11:16 AM, Kirk Jantzer wrote:
> > Does anyone have a script for creating signatures?
> >
> >
> > On Wed, Apr 17, 2013 at 1:31 PM, Kirk Jantzer <kirk.jantzer@gmail.com(mailto:
> kirk.jantzer@gmail.com)>wrote:
> >
> > > gah. *facepalm* deployvirtualmachine works without a signature, so i
> > > didn't think of that.. thanks!
> > >
> > >
> > > On Wed, Apr 17, 2013 at 1:23 PM, Edward Valencia <edwardv@redapt.com(mailto:
> edwardv@redapt.com)>wrote:
> > >
> > > > The api call needs to have a signature created based on the API and
> > > > secrete key, I think this is whats missing in your call:
> > > >
> > > >
> > > >
> http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.1-incubating/html/API_Developers_Guide/signing-api-requests.html
> > > >
> > > > Also commands are case sensitive but the way and should be used as in
> > > > they are in the API docs. Hope this help.
> > > >
> > > >
> > > > On Wednesday, April 17, 2013 at 10:19 AM, Kirk Jantzer wrote:
> > > > > ok, maybe it's not just 'listtemplates' - I've tried other
> commands and
> > > >
> > > > get
> > > > > the same 'unable to verify...' reply....thoughts??
> > > > >
> > > > >
> > > > > On Wed, Apr 17, 2013 at 1:13 PM, Kirk Jantzer <
> kirk.jantzer@gmail.com (mailto:kirk.jantzer@gmail.com)(mailto:
> > > > kirk.jantzer@gmail.com (mailto:kirk.jantzer@gmail.com))>wrote:
> > > > >
> > > > > > When I do the following:
> > > >
> api?command=listTemplates&templatefilter=featured&apikey=******&response=json
> > > > > >
> > > > > > The result is the following (I have tried the API key of a domain
> > > > admin
> > > > > > and root admin, as well as a cookie session after GUI login - all
> > > > >
> > > >
> > > > yielded
> > > > > > same result):
> > > > > >
> > > > > > { "listtemplatesresponse" :
> > > > {"uuidList":[],"errorcode":401,"errortext":"unable to verify user
> > > > credentials and/or request signature"} }
> > > > > >
> > > > > >
> > > > > > Per this forum post, there was a suggestion to change the case
> of the
> > > > > > commands - that changed the output, but still didn't work:
> > > > > >
> > > > >
> > > >
> > > >
> api?command=listtemplates&templatefilter=featured&apikey=******&response=json
> > > > > >
> > > > > > { "errorresponse" :
> {"uuidList":[],"errorcode":432,"errortext":"The
> > > > given command does not exist"} }
> > > > >
> > > > >
> > > > > --
> > > > > Regards,
> > > > >
> > > > > Kirk Jantzer
> > > > > c: (678) 561-5475
> > > > >
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Regards,
> > >
> > > Kirk Jantzer
> > > c: (678) 561-5475
> > >
> >
> >
> >
> >
> > --
> > Regards,
> >
> > Kirk Jantzer
> > c: (678) 561-5475
> >
> >
>
>
>


-- 
Regards,

Kirk Jantzer
c: (678) 561-5475

Re: API - listTemplates, not working or I am doing something wrong??

Posted by Edward Valencia <ed...@redapt.com>.
There are two ruby gems that Ive been using to interact with the API:

cloudstack_helper and cloudstack_ruby_client



On Wednesday, April 17, 2013 at 11:16 AM, Kirk Jantzer wrote: 
> Does anyone have a script for creating signatures?
> 
> 
> On Wed, Apr 17, 2013 at 1:31 PM, Kirk Jantzer <kirk.jantzer@gmail.com (mailto:kirk.jantzer@gmail.com)>wrote:
> 
> > gah. *facepalm* deployvirtualmachine works without a signature, so i
> > didn't think of that.. thanks!
> > 
> > 
> > On Wed, Apr 17, 2013 at 1:23 PM, Edward Valencia <edwardv@redapt.com (mailto:edwardv@redapt.com)>wrote:
> > 
> > > The api call needs to have a signature created based on the API and
> > > secrete key, I think this is whats missing in your call:
> > > 
> > > 
> > > http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.1-incubating/html/API_Developers_Guide/signing-api-requests.html
> > > 
> > > Also commands are case sensitive but the way and should be used as in
> > > they are in the API docs. Hope this help.
> > > 
> > > 
> > > On Wednesday, April 17, 2013 at 10:19 AM, Kirk Jantzer wrote:
> > > > ok, maybe it's not just 'listtemplates' - I've tried other commands and
> > > 
> > > get
> > > > the same 'unable to verify...' reply....thoughts??
> > > > 
> > > > 
> > > > On Wed, Apr 17, 2013 at 1:13 PM, Kirk Jantzer <kirk.jantzer@gmail.com (mailto:kirk.jantzer@gmail.com)(mailto:
> > > kirk.jantzer@gmail.com (mailto:kirk.jantzer@gmail.com))>wrote:
> > > > 
> > > > > When I do the following:
> > > api?command=listTemplates&templatefilter=featured&apikey=******&response=json
> > > > > 
> > > > > The result is the following (I have tried the API key of a domain
> > > admin
> > > > > and root admin, as well as a cookie session after GUI login - all
> > > > 
> > > 
> > > yielded
> > > > > same result):
> > > > > 
> > > > > { "listtemplatesresponse" :
> > > {"uuidList":[],"errorcode":401,"errortext":"unable to verify user
> > > credentials and/or request signature"} }
> > > > > 
> > > > > 
> > > > > Per this forum post, there was a suggestion to change the case of the
> > > > > commands - that changed the output, but still didn't work:
> > > > > 
> > > > 
> > > 
> > > api?command=listtemplates&templatefilter=featured&apikey=******&response=json
> > > > > 
> > > > > { "errorresponse" : {"uuidList":[],"errorcode":432,"errortext":"The
> > > given command does not exist"} }
> > > > 
> > > > 
> > > > --
> > > > Regards,
> > > > 
> > > > Kirk Jantzer
> > > > c: (678) 561-5475
> > > > 
> > > 
> > > 
> > 
> > 
> > 
> > --
> > Regards,
> > 
> > Kirk Jantzer
> > c: (678) 561-5475
> > 
> 
> 
> 
> 
> -- 
> Regards,
> 
> Kirk Jantzer
> c: (678) 561-5475
> 
> 



Re: API - listTemplates, not working or I am doing something wrong??

Posted by Sebastien Goasguen <ru...@gmail.com>.
On Apr 17, 2013, at 2:16 PM, Kirk Jantzer <ki...@gmail.com> wrote:

> Does anyone have a script for creating signatures?
> 

See my latest post: http://buildacloud.org/blog/253-to-rest-or-not-to-rest.html

I used requester.py from cloud monkey, I have a link to get it from the git repo in the blog.

> 
> On Wed, Apr 17, 2013 at 1:31 PM, Kirk Jantzer <ki...@gmail.com>wrote:
> 
>> gah. *facepalm* deployvirtualmachine works without a signature, so i
>> didn't think of that.. thanks!
>> 
>> 
>> On Wed, Apr 17, 2013 at 1:23 PM, Edward Valencia <ed...@redapt.com>wrote:
>> 
>>> The api call needs to have a signature created based on the API and
>>> secrete key, I think this is whats missing in your call:
>>> 
>>> 
>>> http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.1-incubating/html/API_Developers_Guide/signing-api-requests.html
>>> 
>>> Also commands are case sensitive but the way and should be used as in
>>> they are in the API docs. Hope this help.
>>> 
>>> 
>>> On Wednesday, April 17, 2013 at 10:19 AM, Kirk Jantzer wrote:
>>>> ok, maybe it's not just 'listtemplates' - I've tried other commands and
>>> get
>>>> the same 'unable to verify...' reply....thoughts??
>>>> 
>>>> 
>>>> On Wed, Apr 17, 2013 at 1:13 PM, Kirk Jantzer <kirk.jantzer@gmail.com(mailto:
>>> kirk.jantzer@gmail.com)>wrote:
>>>> 
>>>>> When I do the following:
>>>>> 
>>>>> 
>>>>> 
>>> api?command=listTemplates&templatefilter=featured&apikey=******&response=json
>>>>> 
>>>>> The result is the following (I have tried the API key of a domain
>>> admin
>>>>> and root admin, as well as a cookie session after GUI login - all
>>> yielded
>>>>> same result):
>>>>> 
>>>>> { "listtemplatesresponse" :
>>> {"uuidList":[],"errorcode":401,"errortext":"unable to verify user
>>> credentials and/or request signature"} }
>>>>> 
>>>>> 
>>>>> Per this forum post, there was a suggestion to change the case of the
>>>>> commands - that changed the output, but still didn't work:
>>>>> 
>>>>> 
>>>>> 
>>> api?command=listtemplates&templatefilter=featured&apikey=******&response=json
>>>>> 
>>>>> { "errorresponse" : {"uuidList":[],"errorcode":432,"errortext":"The
>>> given command does not exist"} }
>>>> 
>>>> 
>>>> --
>>>> Regards,
>>>> 
>>>> Kirk Jantzer
>>>> c: (678) 561-5475
>>>> 
>>>> 
>>> 
>>> 
>>> 
>> 
>> 
>> --
>> Regards,
>> 
>> Kirk Jantzer
>> c: (678) 561-5475
>> 
> 
> 
> 
> -- 
> Regards,
> 
> Kirk Jantzer
> c: (678) 561-5475


Re: API - listTemplates, not working or I am doing something wrong??

Posted by Kirk Jantzer <ki...@gmail.com>.
Does anyone have a script for creating signatures?


On Wed, Apr 17, 2013 at 1:31 PM, Kirk Jantzer <ki...@gmail.com>wrote:

> gah. *facepalm* deployvirtualmachine works without a signature, so i
> didn't think of that.. thanks!
>
>
> On Wed, Apr 17, 2013 at 1:23 PM, Edward Valencia <ed...@redapt.com>wrote:
>
>> The api call needs to have a signature created based on the API and
>> secrete key, I think this is whats missing in your call:
>>
>>
>> http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.1-incubating/html/API_Developers_Guide/signing-api-requests.html
>>
>> Also commands are case sensitive but the way and should be used as in
>> they are in the API docs. Hope this help.
>>
>>
>> On Wednesday, April 17, 2013 at 10:19 AM, Kirk Jantzer wrote:
>> > ok, maybe it's not just 'listtemplates' - I've tried other commands and
>> get
>> > the same 'unable to verify...' reply....thoughts??
>> >
>> >
>> > On Wed, Apr 17, 2013 at 1:13 PM, Kirk Jantzer <kirk.jantzer@gmail.com(mailto:
>> kirk.jantzer@gmail.com)>wrote:
>> >
>> > > When I do the following:
>> > >
>> > >
>> > >
>> api?command=listTemplates&templatefilter=featured&apikey=******&response=json
>> > >
>> > > The result is the following (I have tried the API key of a domain
>> admin
>> > > and root admin, as well as a cookie session after GUI login - all
>> yielded
>> > > same result):
>> > >
>> > > { "listtemplatesresponse" :
>> {"uuidList":[],"errorcode":401,"errortext":"unable to verify user
>> credentials and/or request signature"} }
>> > >
>> > >
>> > > Per this forum post, there was a suggestion to change the case of the
>> > > commands - that changed the output, but still didn't work:
>> > >
>> > >
>> > >
>> api?command=listtemplates&templatefilter=featured&apikey=******&response=json
>> > >
>> > > { "errorresponse" : {"uuidList":[],"errorcode":432,"errortext":"The
>> given command does not exist"} }
>> >
>> >
>> > --
>> > Regards,
>> >
>> > Kirk Jantzer
>> > c: (678) 561-5475
>> >
>> >
>>
>>
>>
>
>
> --
> Regards,
>
> Kirk Jantzer
> c: (678) 561-5475
>



-- 
Regards,

Kirk Jantzer
c: (678) 561-5475

Re: API - listTemplates, not working or I am doing something wrong??

Posted by Kirk Jantzer <ki...@gmail.com>.
gah. *facepalm* deployvirtualmachine works without a signature, so i didn't
think of that.. thanks!


On Wed, Apr 17, 2013 at 1:23 PM, Edward Valencia <ed...@redapt.com> wrote:

> The api call needs to have a signature created based on the API and
> secrete key, I think this is whats missing in your call:
>
>
> http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.1-incubating/html/API_Developers_Guide/signing-api-requests.html
>
> Also commands are case sensitive but the way and should be used as in they
> are in the API docs. Hope this help.
>
>
> On Wednesday, April 17, 2013 at 10:19 AM, Kirk Jantzer wrote:
> > ok, maybe it's not just 'listtemplates' - I've tried other commands and
> get
> > the same 'unable to verify...' reply....thoughts??
> >
> >
> > On Wed, Apr 17, 2013 at 1:13 PM, Kirk Jantzer <kirk.jantzer@gmail.com(mailto:
> kirk.jantzer@gmail.com)>wrote:
> >
> > > When I do the following:
> > >
> > >
> > >
> api?command=listTemplates&templatefilter=featured&apikey=******&response=json
> > >
> > > The result is the following (I have tried the API key of a domain admin
> > > and root admin, as well as a cookie session after GUI login - all
> yielded
> > > same result):
> > >
> > > { "listtemplatesresponse" :
> {"uuidList":[],"errorcode":401,"errortext":"unable to verify user
> credentials and/or request signature"} }
> > >
> > >
> > > Per this forum post, there was a suggestion to change the case of the
> > > commands - that changed the output, but still didn't work:
> > >
> > >
> > >
> api?command=listtemplates&templatefilter=featured&apikey=******&response=json
> > >
> > > { "errorresponse" : {"uuidList":[],"errorcode":432,"errortext":"The
> given command does not exist"} }
> >
> >
> > --
> > Regards,
> >
> > Kirk Jantzer
> > c: (678) 561-5475
> >
> >
>
>
>


-- 
Regards,

Kirk Jantzer
c: (678) 561-5475

Re: API - listTemplates, not working or I am doing something wrong??

Posted by Edward Valencia <ed...@redapt.com>.
The api call needs to have a signature created based on the API and secrete key, I think this is whats missing in your call: 

http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.0.1-incubating/html/API_Developers_Guide/signing-api-requests.html

Also commands are case sensitive but the way and should be used as in they are in the API docs. Hope this help.


On Wednesday, April 17, 2013 at 10:19 AM, Kirk Jantzer wrote: 
> ok, maybe it's not just 'listtemplates' - I've tried other commands and get
> the same 'unable to verify...' reply....thoughts??
> 
> 
> On Wed, Apr 17, 2013 at 1:13 PM, Kirk Jantzer <kirk.jantzer@gmail.com (mailto:kirk.jantzer@gmail.com)>wrote:
> 
> > When I do the following:
> > 
> > 
> > api?command=listTemplates&templatefilter=featured&apikey=******&response=json
> > 
> > The result is the following (I have tried the API key of a domain admin
> > and root admin, as well as a cookie session after GUI login - all yielded
> > same result):
> > 
> > { "listtemplatesresponse" : {"uuidList":[],"errorcode":401,"errortext":"unable to verify user credentials and/or request signature"} }
> > 
> > 
> > Per this forum post, there was a suggestion to change the case of the
> > commands - that changed the output, but still didn't work:
> > 
> > 
> > api?command=listtemplates&templatefilter=featured&apikey=******&response=json
> > 
> > { "errorresponse" : {"uuidList":[],"errorcode":432,"errortext":"The given command does not exist"} }
> 
> 
> -- 
> Regards,
> 
> Kirk Jantzer
> c: (678) 561-5475
> 
> 



Re: API - listTemplates, not working or I am doing something wrong??

Posted by Alena Prokharchyk <Al...@citrix.com>.
Kirk, what steps do you use to generate the API signature? 401 error means
that the signature is incorrect.

Btw, command names are case sensitive, listTemplates is the right way to
go.

-Alena.

On 4/17/13 10:19 AM, "Kirk Jantzer" <ki...@gmail.com> wrote:

>ok, maybe it's not just 'listtemplates' - I've tried other commands and
>get
>the same 'unable to verify...' reply....thoughts??
>
>
>On Wed, Apr 17, 2013 at 1:13 PM, Kirk Jantzer
><ki...@gmail.com>wrote:
>
>> When I do the following:
>>
>>
>> 
>>api?command=listTemplates&templatefilter=featured&apikey=******&response=
>>json
>>
>> The result is the following (I have tried the API key of a domain admin
>> and root admin, as well as a cookie session after GUI login - all
>>yielded
>> same result):
>>
>> { "listtemplatesresponse" :
>>{"uuidList":[],"errorcode":401,"errortext":"unable to verify user
>>credentials and/or request signature"} }
>>
>>
>> Per this forum post, there was a suggestion to change the case of the
>> commands - that changed the output, but still didn't work:
>>
>>
>> 
>>api?command=listtemplates&templatefilter=featured&apikey=******&response=
>>json
>>
>> { "errorresponse" : {"uuidList":[],"errorcode":432,"errortext":"The
>>given command does not exist"} }
>>
>>
>
>
>-- 
>Regards,
>
>Kirk Jantzer
>c: (678) 561-5475
>



Re: API - listTemplates, not working or I am doing something wrong??

Posted by Kirk Jantzer <ki...@gmail.com>.
ok, maybe it's not just 'listtemplates' - I've tried other commands and get
the same 'unable to verify...' reply....thoughts??


On Wed, Apr 17, 2013 at 1:13 PM, Kirk Jantzer <ki...@gmail.com>wrote:

> When I do the following:
>
>
> api?command=listTemplates&templatefilter=featured&apikey=******&response=json
>
> The result is the following (I have tried the API key of a domain admin
> and root admin, as well as a cookie session after GUI login - all yielded
> same result):
>
> { "listtemplatesresponse" : {"uuidList":[],"errorcode":401,"errortext":"unable to verify user credentials and/or request signature"} }
>
>
> Per this forum post, there was a suggestion to change the case of the
> commands - that changed the output, but still didn't work:
>
>
> api?command=listtemplates&templatefilter=featured&apikey=******&response=json
>
> { "errorresponse" : {"uuidList":[],"errorcode":432,"errortext":"The given command does not exist"} }
>
>


-- 
Regards,

Kirk Jantzer
c: (678) 561-5475