Skip to content

Look a POSIX group up by gid

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

The same answer as the lookup by name, for a gid. Called by ssoossh-nss with a fleet key.

gid
required
integer

The gid, a decimal uint32

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 gid is not a decimal uint32

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 gid 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"
}