Welcome, Guest
Username: Password: Remember me
Archived CloudStack Forums for reference purposes please direct all future inquiries to the Apache CloudStack mailing lists.

incubator.apache.org/cloudstack/mailing-lists.html

TOPIC: API - Login command

API - Login command 2 years 9 months ago #710

  • jfknoepfli
  • jfknoepfli's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 11
  • Karma: 0
Hi,I am trying to log in using the API. As this document says (cloud.com/kb/login) it seems to be possible.But, I got :<error>
<description>unknown API command: login</description>
</error>as a response.I have used the API a lot but I am stuck with this issue.I am using the Cloud.com Community Edition version 2.6.1 and interacting with the webserver on port 8096.If someone can help, it would be great :)Regards,Jeff
The administrator has disabled public write access.

Re: API - Login command 2 years 1 month ago #7328

  • stan
  • stan's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
I am also trying to use login command using 2.2.11api but get the following error:

Unable to find user admin in domain 1

I know there is a user in domain 1 which is the main 'admin' user, so don't understand why it can't find the user.

btw i think your using wrong port: for public should be 8080.

my url looks like this:

xxx.xxx.xx.xx:8080/client/api?command=lo...mDOBwb%2FFTBhPX3Q%3D

I also tried adding the password in but that still returns the error.

If someone know what I'm doing wrong, please enlighten me, thanks.
The administrator has disabled public write access.

Re: API - Login command 2 years 1 month ago #7329

  • stan
  • stan's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
solved.

I md5 hashed the password and put it back into the url and I got a response with sesionkey.

How do u use the sessionkey is the next question?

Where do I find the json response for JSESSION?
Last Edit: 2 years 1 month ago by stan.
The administrator has disabled public write access.

Re: API - Login command 1 year 6 months ago #10112

  • LucasT
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
I wanna know too.

How use the sessionkey? Look my post: cloudstack.org/forum/10-developer-and-ap...essionkey.html#10036
The administrator has disabled public write access.

Re: API - Login command 1 year 6 months ago #10119

  • jamesbjackson
  • jamesbjackson's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 43
  • Thank you received: 8
  • Karma: 2
As I posted in the other topic...

When you get the HTTP Response back from the API when your logging in.. you see a session key called "JSESSIONID" you need to set this with each API HTTP Request to the API.. I hope this helps...

As this is how the actual CloudStack UI works..

Best thing to do is to actual use the Network inspector tools or Charles (Web Debugging Proxy) www.charlesproxy.com/ and watch the API requests the actual UI makes and responses it get's back as you basicly need to emulate a browser instance by supplying the API with the session cookie..
The administrator has disabled public write access.

Re: API - Login command 11 months 4 weeks ago #12944

  • dharshanr
  • dharshanr's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Thank you received: 1
  • Karma: 0
It took me a while to figure out how this works. I've put my experiences together in a blog post
http://www.scalegrid.net/blog/?p=230.

Hopefully others can benefit from this as well.

regards,
Dharshan
www.scalegrid.net
The administrator has disabled public write access.
Time to create page: 0.301 seconds

Open@Citrix

Citrix supports the open source community via developer support and evangeslism. We have a number of developers and evangelists that participate actively in the open source community in Apache Cloudstack, OpenDaylight, Xen Project and XenServer. We also conduct educational activities via the Build A Cloud events held all over the world. 

Connect