Skip to content

Look a POSIX group up by name

GET
/api/nss/group/name/{name}
curl --request GET \
--url https://example.com/api/nss/group/name/example

Resolves a group name, matched byte for byte, to its gid and member names, capped at nss.max_group_members with members_truncated set when the cap applies. An account’s private group under nss.auto_private_groups resolves too, with no members. A tombstoned group resolves with no members. Called by ssoossh-nss with a fleet key.

name
required
string

The group name, by the relaxed POSIX rules nss-systemd applies

The group

Media typeapplication/json
object
data
required
object
gid

GID is the group id, frozen once stored like NSSUserResponse.UID.

integer
members
required

Members are the member user names, capped at nss.max_group_members.

Array<string>
members_truncated

MembersTruncated is true when the cap cut Members short, so a host can log that the list is incomplete rather than serve it as whole.

boolean
name
required

Name is the group name.

string
error
string

Example generated

{
"data": {
"gid": 1,
"members": [
"example"
],
"members_truncated": true,
"name": "example"
},
"error": "example"
}

Nss_bad_request: the name fails validation

Media typeapplication/json
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string
error_code
required

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.

string

Example

{
"error": "certificate request \"9f1c…\" not found",
"error_code": "not_found"
}

Nss_unauthorized: the fleet key is missing, unknown, revoked, expired or wrong

Media typeapplication/json
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string
error_code
required

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.

string

Example

{
"error": "certificate request \"9f1c…\" not found",
"error_code": "not_found"
}

Nss_forbidden: the source address is outside nss.source_allow_list

Media typeapplication/json
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string
error_code
required

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.

string

Example

{
"error": "certificate request \"9f1c…\" not found",
"error_code": "not_found"
}

Nss_not_found, or nss_disabled when nss.enabled is false

Media typeapplication/json
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string
error_code
required

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.

string

Example

{
"error": "certificate request \"9f1c…\" not found",
"error_code": "not_found"
}

Nss_rate_limited, with Retry-After

Media typeapplication/json
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string
error_code
required

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.

string

Example

{
"error": "certificate request \"9f1c…\" not found",
"error_code": "not_found"
}

Unavailable: the name is not in the database and the directory could not be asked

Media typeapplication/json
object
data

Data is always null on an error response.

error
required

Error is a human-readable message. Branch on the HTTP status rather than this string; it is for humans and logs.

string
error_code
required

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.

string

Example

{
"error": "certificate request \"9f1c…\" not found",
"error_code": "not_found"
}