Project

General

Profile

Bug #26092

API does not return all user account through API

Added by Tom Ingling almost 3 years ago. Updated almost 3 years ago.

Status:
Closed: Behaves correctly
Priority:
No priority
Assignee:
William Grzybowski
Category:
Middleware
Target version:
Seen in:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:

iXsystems FreeNAS Certified Server, Dual CPU, 24 bays
Build FreeNAS-11.0-U3 (c5dcf4416)
Platform Intel(R) Xeon(R) CPU E5-2609 v2 @ 2.50GHz
Memory 65464MB
2 bonded 10 GiB fiber

ChangeLog Required:
No

Description

Per the API documentation:

GET /api/v1.0/account/users/
Returns a list of all current users.

Using the API call "curl -X GET -u root:[password went here] http://192.168.10.222/api/v1.0/account/users/"

On our FreeNAS, it returns a JSON record with user data, but it only has 20 entires, and the FreeNAS Web GUI shows 27 user accounts.

(To be specific, it returns 20 accounts with UID's over 1000, and we have 27 accounts with UID's over 1000. It looks like the API call does not return the built-in accounts root, daemon, etc, which is fine with me).

I could not find anything differentiating the returned accounts from those not returned, except for that it returned accounts that were made earlier, and not ones that were made more recently. Still, the more recent accounts have been on the system for weeks or months. All accounts were created through the FreeNAS GUI.

I'm only using this to find the highest used User ID so I can add 1 to it and create new users through the API, but since it only returns the oldest 20 users, I don't have any way to figure out a valid UID to use to create accounts via the API.

History

#1 Updated by Dru Lavigne almost 3 years ago

  • Assignee changed from Release Council to William Grzybowski

#2 Updated by William Grzybowski almost 3 years ago

  • Status changed from Unscreened to 15

By default result is limited to 20 users. To increase that you have to use ?limit=XXX

e.g.

http://192.168.10.222/api/v1.0/account/users/?limit=100

Does that work for you?

#3 Updated by William Grzybowski almost 3 years ago

  • Status changed from 15 to Closed: Behaves correctly
  • Target version set to N/A

Also available in: Atom PDF