Creates the group when no group with this name exists, and otherwise replaces it with the request. The request body is the same as for Create a Group, except that name may be left out: the name in the path is used. When name is given, it must be the same as the name in the path, or the request is rejected with 400.
Creating: the group is created exactly as Create a Group creates it, in the internal realm, or in the ldap realm when import_from_ldap_group_setting is set (see Create a Group). Returns 201.
Replacing: every field of the request replaces the group's value, and a field that is not sent is reset to its default; for example, a group replaced without admin_privileges loses its admin privileges. The members of the group are replaced by members, so a request without members removes all of them. Returns 200.
Note:
- This REST API is part of the Access service REST APIs, where modifying the realm and realm attributes parameters is not supported. The group keeps its realm and realm attributes when it is replaced.
import_from_ldap_group_settingcan only be set for an existing group when the group was imported from the same LDAP group, so that the import yields the realm and realm attributes the group already has, as when the request that imported the group is sent again; otherwise the request is rejected with 400. When it is accepted, the members of the group are left as they are, since LDAP login keeps them in sync with the directory. An import resolvesnameto the directory's name in lowercase, so the group replaced can be named differently from the path (for exampledevopsforDevOps); the response has its name.
Security: Requires admin privileges.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
400Bad Request - Invalid input, name in the body differs from the name in the path, or import_from_ldap_group_setting is set for an existing group that was not imported from the same LDAP group
401Bad Credentials - Invalid credentials
403Permission Denied - Insufficient permissions
404Not Found - One or more users in members were not found, or, when importing an LDAP group, the LDAP group setting or the group in the directory was not found
