Ask Your Question
0

API call to fetch all tenants

asked 2016-01-04 09:25:57 -0500

Yaron Yogev gravatar image

updated 2016-01-05 01:03:36 -0500

Bipin gravatar image

I am trying to fetch the list of all tenants using OpenStack identity API 2.0. I have an "admin" user, which I made a user and administrator in all tenants. If I authenticate to public URL (port 5000), and then make the /v2.0/tenants GET call, I receive only the "admin" tenant in the response. The "admin" project is specified as the primary project for user "admin" in the Horizon UI.

I saw the post by the OP in this thread, but when I try to authenticate on the public URL (port 5000) I get "400 Bad Request". The request body is

{"auth":{"passwordCredentials":{"username":"admin","password": <admin pwd>}},"tenantName":"admin"}
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
2

answered 2016-01-04 10:23:11 -0500

Vincent G gravatar image

updated 2016-01-04 10:29:09 -0500

Hi,

Is that mandatory to put the "tenantName":"admin" at the end of your request ? Try without... or elsewhere...

A correct auth request :

{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "my_pass"}}}'
edit flag offensive delete link more

Comments

Correct, the tenantName (or tenantId) needs to be inside the "auth" hash. Thanks!

Yaron Yogev gravatar imageYaron Yogev ( 2016-01-05 01:36:23 -0500 )edit
0

answered 2016-01-11 15:10:21 -0500

Sandeep gravatar image

Try this one as well,it will work: { "auth":{ "passwordCredentials":{ "username":"admin", "password":"password" }, "tenantName":"admin" } }

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-01-04 09:25:57 -0500

Seen: 71 times

Last updated: Jan 11 '16