Skip to content

Accept a group's pending gid (admin only)

POST
/api/admin/nss/groups/{gid}/accept-id-change
curl --request POST \
--url https://example.com/api/admin/nss/groups/1/accept-id-change \
--header 'X-Ssoossh-Key-Secret: <X-Ssoossh-Key-Secret>'

Applies the pending gid of the NSS group stored with this gid, in one transaction that re-keys its membership rows and moves every account whose primary gid it was, and audits it as nss.id_change_accepted. Refused with 409 when another group, a tombstone included, holds the new gid.

gid
required
integer

The group’s stored gid

The group after the change

Media typeapplication/json
object
data
required
object
dn
required
string
gid
required
integer
name
required
string
error
string

Example generated

{
"data": {
"dn": "example",
"gid": 1,
"name": "example"
},
"error": "example"
}

The gid is not a number

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

Not authenticated

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

Not authorized as admin

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

No group with that gid has a pending change, or NSS is disabled

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

Another group holds the new gid

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