Ask Your Question

Getting role by name

asked 2013-07-24 00:22:58 -0500

bikramnehra gravatar image

updated 2014-01-22 15:12:55 -0500

Evgeny gravatar image

curl -s http://localhost:35357/v2.0/OS-KSADM/roles?name=admin -X GET -H "X-Auth-Token: xxxxxxxxxxxxxxxxxxx"|python -mjson.tool

`I am running the above curl command but i am getting all the available roles instead of just getting admin role. Is there any way to retrieve id of a particular role?

edit retag flag offensive close merge delete


I have also verified this API on stable/grizzly code base and it looks like the 'name' parameter is not getting considered (though the API documentation mentions the param). IMO, a bug should be filed if its not already there!

unmesh-gurjar gravatar imageunmesh-gurjar ( 2013-07-25 06:54:18 -0500 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2014-03-30 20:47:03 -0500

9lives gravatar image

updated 2014-03-30 20:49:21 -0500

Did you try to use keystone client to verify like this:

 #keystone --debug role-get <admin_role_name>or <admin_role_id>

and check the curl stuff for details calling the keystone api, if it is the same as what you got it might be a defect.

Hope that helps!


edit flag offensive delete link more

answered 2014-03-30 19:13:27 -0500

annegentle gravatar image

Looking at now, is it documented as you expect?

edit flag offensive delete link more


Thanks Anne, the doc looks more accurate now!

unmesh-gurjar gravatar imageunmesh-gurjar ( 2014-03-31 23:58:00 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2013-07-24 00:22:58 -0500

Seen: 130 times

Last updated: Mar 30 '14