Read one stored NSS group (auditor and above)
const url = 'https://example.com/api/admin/nss/groups/1';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/1 \ --header 'X-Ssoossh-Key-Secret: <X-Ssoossh-Key-Secret>'The posix_groups row with this gid as stored, its count of stored membership rows, and what a host’s lookup by the gid is served now, built by the lookup code itself, with the member names counted after nss.max_group_members (absent with not_served saying why when the lookup finds nothing). The members are paged from /api/admin/nss/groups/{gid}/members. Reads only the database: where a host’s miss would ask the directory, this does not.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The group’s stored gid
Responses
Section titled “Responses”The group
object
object
MemberCount is the stored membership rows, served or not.
Served is what a host’s group lookup by this gid gets now. Absent when the lookup finds nothing; NotServed then says why.
object
MemberCount is how many member names the host receives, after nss.max_group_members.
MembersTruncated is true when nss.max_group_members cut the list.
WithheldReason sums up the collisions that withhold the row.
Example
{ "data": { "not_served": "withheld", "state": "withheld" }}The gid is not a number
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"}No stored group has that gid, or 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"}