List the stored NSS accounts (auditor and above)
const url = 'https://example.com/api/admin/nss/users?limit=25&q=ada&state=withheld';const options = {method: 'GET', headers: {'X-Ssoossh-Key-Secret': '<X-Ssoossh-Key-Secret>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/api/admin/nss/users?limit=25&q=ada&state=withheld' \ --header 'X-Ssoossh-Key-Secret: <X-Ssoossh-Key-Secret>'One page of the posix_users rows, ordered by name then id, each with its derived state. q matches a case-insensitive substring of the name or DN, and also the exact uid when it is a number. Uses cursor-based pagination (not offset): pass the previous page’s next_cursor as after. Reads only the database: never the directory, and never writes.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Row id to start after (cursor): the previous page’s next_cursor
Page size (default 25, max 100)
Example
25Search term matched against name and DN, or an exact uid
Example
adaState filter; omitted returns every state
Responses
Section titled “Responses”One page of accounts
object
object
object
GID is the stored gid attribute, before nss.auto_private_groups; absent when the entry has none (accepted only under “true”).
ID is the row id, the list’s cursor. The account’s own pages are addressed by UID.
LastSyncedAt is the last sync or on-demand read that reached the directory for this entry.
NextCursor is the after for the following page: the id of this page’s last row, absent on the last page.
Total is how many stored accounts match the search, across all pages.
Example
{ "data": { "accounts": [ { "state": "withheld" } ] }}Invalid paging/search parameters, an unknown state, an after that names no account, or offset
object
Data is always null on an error response.
Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.
ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.
Example
{ "error": "certificate request \"9f1c…\" not found", "error_code": "not_found"}Not authenticated
object
Data is always null on an error response.
Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.
ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.
Example
{ "error": "certificate request \"9f1c…\" not found", "error_code": "not_found"}Not authorized as auditor
object
Data is always null on an error response.
Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.
ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.
Example
{ "error": "certificate request \"9f1c…\" not found", "error_code": "not_found"}NSS is disabled
object
Data is always null on an error response.
Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.
ErrorCode is a machine-readable error classifier. One of the error_code constants from internal/apitypes; use this to decide whether to retry or branch on the failure mode.
Example
{ "error": "certificate request \"9f1c…\" not found", "error_code": "not_found"}