Listing users based on page and per_page

asked 2015-07-27 00:16:48 -0500

Bajarang gravatar image

when I tried listing users, based on page and per_page, I gave page=1 and per_page=1. But, still all users are listed..

following is the command and output I got.. curl -i -k http://identity/v3/users?page=1%5C&per_page=1 (http://identity/v3/users?page=1\&per_...) -H "X-Auth-Token:$token" -X GET

HTTP/1.1 200 OK Date: Fri, 19 Jun 2015 05:55:03 GMT Server: Apache/2.4.7 (Ubuntu) Vary: X-Auth-Token x-openstack-request-id: req-e5b45d8e-094b-44cd-8f86-b51efb61f1ee Content-Length: 5578 Content-Type: application/json

{"users": [{"domain_id": "0460584e8b0a4f238a9e8c2059add213", "name": "user2", "links": {"self": "http://identity/v3/users/024be90f98864347858482ed8f37ec12"}, "id": "024be90f98864347858482ed8f37ec12", "enabled": true, "email": "user2@email.com", "default_project_id": ""}, {"links": {"self": "http://identity/v3/users/0cbefe4919604483ad06615f042d93ee"}, "description": "user created using requests python", "name": "user22", "enabled": true, "id": "0cbefe4919604483ad06615f042d93ee", "domain_id": "default"}, {"domain_id": "dc459150b70447eeb93bd06e4d076c1e", "name": "user1", "links": {"self": "http://identity/v3/users/11536e09fcd44bb187c65cdf78b36871"}, "id": "11536e09fcd44bb187c65cdf78b36871", "enabled": true, "email": "user1@email.com", "default_project_id": ""}, {"links": {"self": "http://identity/v3/users/125603449ac44dd48769e666e4f33f50"}, "description": "user created using requests python", "name": "user9", "enabled": true, "id": "125603449ac44dd48769e666e4f33f50", "domain_id": "default"}, {"name": "nova", "links": {"self": "http://identity/v3/users/3d5fb2eb80df41ac892bf6e4840812c8"}, "domain_id": "default", "enabled": true, "email": null, "id": "3d5fb2eb80df41ac892bf6e4840812c8"}, {"name": "glance", "links": {"self": "http://identity/v3/users/595e839ca1bf43b1bbc7a6bbbd02d5ee"}, "domain_id": "default", "enabled": true, "email": null, "id": "595e839ca1bf43b1bbc7a6bbbd02d5ee"}, {"name": "alt_demo", "links": {"self": "http://identity/v3/users/5ccf78a426db404d9d9f6f260abc4628"}, "domain_id": "default", "enabled": true, "email": "alt_demo@example.com", "id": "5ccf78a426db404d9d9f6f260abc4628"}, {"name": "demo", "links": {"self": "http://identity/v3/users/741d2d41baf440bb955db018d0b9a52a"}, "domain_id": "default", "enabled": true, "email": "demo@example.com", "id": "741d2d41baf440bb955db018d0b9a52a"}, {"links": {"self": "http://identity/v3/users/86ab7dc828d24cb7bf341d7e64e94334"}, "description": "user created using requests python", "name": "user29", "enabled": true, "id": "86ab7dc828d24cb7bf341d7e64e94334", "domain_id": "default"}, {"links": {"self": "http://identity/v3/users/9a1ad171edfa4e4a939bd437d6b719b7"}, "description": "user123-desc", "name": "user_123", "enabled": true, "id": "9a1ad171edfa4e4a939bd437d6b719b7", "domain_id": "default"}, {"name": "testUser2", "links": {"self": "http://identity/v3/users/a28bc1c7416b438d8bac2e962de08473"}, "enabled": true, "id": "a28bc1c7416b438d8bac2e962de08473", "domain_id": "default"}, {"name": "testUser1", "links": {"self": "http://identity/v3/users/a499421b32044e15938d2610df28311c"}, "enabled": true, "id": "a499421b32044e15938d2610df28311c", "domain_id": "default"}, {"links": {"self": "http://identity/v3/users/aea2b84572d049328022f679bd8945fe"}, "description": "user created using requests python", "name": "user59", "enabled": true, "id": "aea2b84572d049328022f679bd8945fe", "domain_id": "default"}, {"links": {"self": "http://identity/v3/users/af856bc770994d1192577ad75189e8fe"}, "description": "Sample keystone test user", "name": "fd34", "enabled": true, "id": "af856bc770994d1192577ad75189e8fe", "domain_id": "684d406c3be44d1f9a1a7a10218d2ef8"}, {"links": {"self": "http://identity/v3/users/bbc83b8ff3c2495083925952e6d9bd43"}, "description": "user121-desc", "name": "user_121", "enabled": true, "id": "bbc83b8ff3c2495083925952e6d9bd43", "domain_id": "default"}, {"links": {"self": "http://identity/v3/users/c03e41c46e8b40c089d360ecd9708cdf"}, "description": "user created using requests python", "name": "user19", "enabled": true, "id": "c03e41c46e8b40c089d360ecd9708cdf", "domain_id": "default"}, {"links": {"self": "http://identity/v3/users/c661757fb17849e69b8efd89bff606f3"}, "description": "user created using requests python", "name": "user1", "enabled": true, "id": "c661757fb17849e69b8efd89bff606f3", "domain_id": "default"}, {"domain_id": "default", "name": "newuser1", "links": {"self": "http://identity/v3/users/d30d0ee5846744bc85d4dad68d9f918e"}, "id": "d30d0ee5846744bc85d4dad68d9f918e", "enabled": true, "email": "user@email.com", "default_project_id": ""}, {"domain_id": "default", "name": "~", "links": {"self": "http://identity/v3/users/d50ffd0ccb1d4d7d8b7b1a0bd5f67b32"}, "id": "d50ffd0ccb1d4d7d8b7b1a0bd5f67b32", "enabled": true, "email": "aa@sa.com", "default_project_id": "740acb29404b4beab11d4b541e446c82"}, {"name": "cinder", "links": {"self": "http://identity/v3/users/da68bced666b4e55a6a16fb2f998568c"}, "domain_id": "default", "enabled": true, "email": null, "id": "da68bced666b4e55a6a16fb2f998568c"}, {"name": "admin", "links": {"self": "http://identity/v3/users/ddc983dbd25f4ed6ba9c84243121fea8"}, "domain_id": "default", "enabled": true, "email": null, "id": "ddc983dbd25f4ed6ba9c84243121fea8"}, {"links": {"self": "http://identity/v3/users/e16c8c13104843e6870aacb062bdff80"}, "description": "Sample keystone test user", "name": "fd23", "enabled": true, "id": "e16c8c13104843e6870aacb062bdff80", "domain_id ... (more)

edit retag flag offensive close merge delete

Comments

is this question a duplicate of https://ask.openstack.org/en/question...

smaffulli gravatar imagesmaffulli ( 2015-07-27 12:25:40 -0500 )edit

I am trying to execute following 2 scenarios. 1. Listing users by filtering on page and per_page 2. Listing users in a group based on description.Question 79105 relates to this scenario.

Bajarang gravatar imageBajarang ( 2015-07-28 00:29:17 -0500 )edit

I am referring section Users and groups in http://developer.openstack.org/api-ref-identity-v3.html (http://developer.openstack.org/api-re...) for executing the above scenarios, respectively. For listing users by filtering on page & per_page, do I need to configure anything in keystone?If so, please guide me.

Bajarang gravatar imageBajarang ( 2015-07-28 00:47:16 -0500 )edit