List the stored NSS groups (auditor and above)
const url = 'https://example.com/api/admin/nss/groups?limit=25&q=engineering&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/groups?limit=25&q=engineering&state=withheld' \ --header 'X-Ssoossh-Key-Secret: <X-Ssoossh-Key-Secret>'One page of the posix_groups rows, ordered by name then id, each with its derived state and its count of stored membership rows. Private groups are never stored, so are not listed. q matches a case-insensitive substring of the name or DN, and also the exact gid 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 gid
Example
engineeringState filter; omitted returns every state
Responses
Section titled “Responses”One page of groups
object
object
object
ID is the row id, the list’s cursor. The group’s own pages are addressed by GID.
MemberCount is the stored membership rows, served or not.
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 groups match the search, across all pages.
Example
{ "data": { "groups": [ { "state": "withheld" } ] }}Invalid paging/search parameters, an unknown state, an after that names no group, 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"}