Skip to main content

Admin API: Groups

Operations on groups in the Odudu admin API, one section each. Every request carries a bearer token; the index says which audience it needs and how a refusal is shaped.

GET /admin/tenants/{tenant}/groups​

Requires the "manage-tenant" capability, or "view-users".

Also readable with view-users, and so with manage-users, whose holder assigns groups and picks them from this list. Nothing else under /groups is.

Path parameters​

NameTypeRequiredDetails
tenantstringyesThe tenant being administered, addressed by name.

Query parameters​

NameTypeRequiredDetails
cursorstringnoThe next value of the previous page, to continue after it.
limitintegernoHow many items to return. A value over 200 is treated as 200; the default is 50. Constraints: at least 1.
namestringnoOnly groups whose own name starts with this, at any level. Constraints: at least 1 character.
parentstringnoOnly the groups directly under the group with this id, or root for the groups with no parent.

Responses​

200 OK​

Body: application/json

FieldTypeRequiredDetails
itemsarray of objectyesThe entries of this answer.
items[]objectyes
items[].idstringyesThe group’s identifier, a UUID.
items[].namestringyesThe group’s own name, unique among the groups beside it. Fixed once the group is made.
items[].descriptionstring or nullyesWhat the group is for, or null.
items[].parent_idstring or nullyesThe group this one sits under, or null for a group at the top level.
items[].default_for_new_subjectsbooleanyesWhether every subject created from now on joins the group, by the admin API, registration and seeding alike. Subjects that already exist are not changed.
items[].pathstringyesThe names from the top of the tree down to this group, such as /eng/platform. The groups claim carries it, and it is recomputed when the group is moved.
items[].created_atstringyesWhen the group was created.
items[].admin_reacharray of stringyesThe admin capabilities membership of the group hands out, however deep roles nest them: its own roles and those of every group above it.
nextstringnoAn opaque cursor for the next page; absent on the last page.

401 RFC 9457 problem details​

Body: application/problem+json, an RFC 9457 problem document described under problem details.

403 RFC 9457 problem details​

Body: application/problem+json, an RFC 9457 problem document described under problem details.

POST /admin/tenants/{tenant}/groups​

Requires the "manage-tenant" capability.

Path parameters​

NameTypeRequiredDetails
tenantstringyesThe tenant being administered, addressed by name.

Request body​

Body: application/json

FieldTypeRequiredDetails
namestringyesConstraints: no bidirectional control characters, at least 1 character.
descriptionstring or nullnoConstraints: no bidirectional control characters, at least 1 character, at most 1000 characters.
parent_idstring or nullno

Responses​

201 Created​

Body: application/json

FieldTypeRequiredDetails
idstringyesThe group’s identifier, a UUID.
namestringyesThe group’s own name, unique among the groups beside it. Fixed once the group is made.
descriptionstring or nullyesWhat the group is for, or null.
parent_idstring or nullyesThe group this one sits under, or null for a group at the top level.
default_for_new_subjectsbooleanyesWhether every subject created from now on joins the group, by the admin API, registration and seeding alike. Subjects that already exist are not changed.
pathstringyesThe names from the top of the tree down to this group, such as /eng/platform. The groups claim carries it, and it is recomputed when the group is moved.
created_atstringyesWhen the group was created.
admin_reacharray of stringyesThe admin capabilities membership of the group hands out, however deep roles nest them: its own roles and those of every group above it.

401 RFC 9457 problem details​

Body: application/problem+json, an RFC 9457 problem document described under problem details.

403 RFC 9457 problem details​

Body: application/problem+json, an RFC 9457 problem document described under problem details.

GET /admin/tenants/{tenant}/groups/count​

Requires the "manage-tenant" capability.

Path parameters​

NameTypeRequiredDetails
tenantstringyesThe tenant being administered, addressed by name.

Query parameters​

NameTypeRequiredDetails
namestringnoOnly groups whose own name starts with this, at any level. Constraints: at least 1 character.
parentstringnoOnly the groups directly under the group with this id, or root for the groups with no parent.

Responses​

200 OK​

Body: application/json

FieldTypeRequiredDetails
countintegeryesHow many items match, up to a cap.
cappedbooleanyesTrue when more match than count says, because counting stops at the cap.

401 RFC 9457 problem details​

Body: application/problem+json, an RFC 9457 problem document described under problem details.

403 RFC 9457 problem details​

Body: application/problem+json, an RFC 9457 problem document described under problem details.

GET /admin/tenants/{tenant}/groups/{id}​

Requires the "manage-tenant" capability.

Path parameters​

NameTypeRequiredDetails
tenantstringyesThe tenant being administered, addressed by name.
idstringyesA row id. Constraints: a UUID.

Responses​

200 OK​

Body: application/json

FieldTypeRequiredDetails
idstringyesThe group’s identifier, a UUID.
namestringyesThe group’s own name, unique among the groups beside it. Fixed once the group is made.
descriptionstring or nullyesWhat the group is for, or null.
parent_idstring or nullyesThe group this one sits under, or null for a group at the top level.
default_for_new_subjectsbooleanyesWhether every subject created from now on joins the group, by the admin API, registration and seeding alike. Subjects that already exist are not changed.
pathstringyesThe names from the top of the tree down to this group, such as /eng/platform. The groups claim carries it, and it is recomputed when the group is moved.
created_atstringyesWhen the group was created.
admin_reacharray of stringyesThe admin capabilities membership of the group hands out, however deep roles nest them: its own roles and those of every group above it.

401 RFC 9457 problem details​

Body: application/problem+json, an RFC 9457 problem document described under problem details.

403 RFC 9457 problem details​

Body: application/problem+json, an RFC 9457 problem document described under problem details.

PATCH /admin/tenants/{tenant}/groups/{id}​

Requires the "manage-tenant" capability.

Amends description (at most 1000 characters, null to clear) and reparents the group. A reparent is refused with 403 when the new parent’s chain, or the old one it leaves, reaches an admin capability the caller does not hold. Refused with 409 (about:blank#last-administrator) when it would leave no enabled subject holding tenant-admin — manage-tenants in the system tenant.

Path parameters​

NameTypeRequiredDetails
tenantstringyesThe tenant being administered, addressed by name.
idstringyesA row id. Constraints: a UUID.

Request body​

Body: application/json

FieldTypeRequiredDetails
(body)objectyesConstraints: other fields accepted.

Responses​

200 OK​

Body: application/json

FieldTypeRequiredDetails
idstringyesThe group’s identifier, a UUID.
namestringyesThe group’s own name, unique among the groups beside it. Fixed once the group is made.
descriptionstring or nullyesWhat the group is for, or null.
parent_idstring or nullyesThe group this one sits under, or null for a group at the top level.
default_for_new_subjectsbooleanyesWhether every subject created from now on joins the group, by the admin API, registration and seeding alike. Subjects that already exist are not changed.
pathstringyesThe names from the top of the tree down to this group, such as /eng/platform. The groups claim carries it, and it is recomputed when the group is moved.
created_atstringyesWhen the group was created.
admin_reacharray of stringyesThe admin capabilities membership of the group hands out, however deep roles nest them: its own roles and those of every group above it.

401 RFC 9457 problem details​

Body: application/problem+json, an RFC 9457 problem document described under problem details.

403 RFC 9457 problem details​

Body: application/problem+json, an RFC 9457 problem document described under problem details.

DELETE /admin/tenants/{tenant}/groups/{id}​

Requires the "manage-tenant" capability.

Deletes the group and its whole subtree. Refused with 403 when what it removes reaches an admin capability the caller does not hold. Refused with 409 (about:blank#last-administrator) when it would leave no enabled subject holding tenant-admin — manage-tenants in the system tenant.

Path parameters​

NameTypeRequiredDetails
tenantstringyesThe tenant being administered, addressed by name.
idstringyesA row id. Constraints: a UUID.

Responses​

204 OK​

Body: application/json

FieldTypeRequiredDetails
(body)anyyes

401 RFC 9457 problem details​

Body: application/problem+json, an RFC 9457 problem document described under problem details.

403 RFC 9457 problem details​

Body: application/problem+json, an RFC 9457 problem document described under problem details.

GET /admin/tenants/{tenant}/groups/{id}/roles​

Requires the "manage-tenant" capability.

Path parameters​

NameTypeRequiredDetails
tenantstringyesThe tenant being administered, addressed by name.
idstringyesA row id. Constraints: a UUID.

Responses​

200 OK​

Body: application/json

FieldTypeRequiredDetails
itemsarray of objectyesEvery built-in scope, in the order a new tenant is given them.
items[]objectyes
items[].idstringyesThe role’s identifier.
items[].namestringyesThe role name.
items[].client_idstring or nullyesFor a role scoped to a client, that client’s internal id; null for a tenant-wide role.
items[].client_keystring or nullyesFor a client role, the client’s client_id.
items[].admin_reacharray of stringyes

401 RFC 9457 problem details​

Body: application/problem+json, an RFC 9457 problem document described under problem details.

403 RFC 9457 problem details​

Body: application/problem+json, an RFC 9457 problem document described under problem details.

PUT /admin/tenants/{tenant}/groups/{id}/roles​

Requires the "manage-tenant" capability.

More than 200 entries is refused with 400. Replaces the whole list. If-Match is mandatory: the matching GET answers an ETag, an absent header is refused with 428, and a stale one with 412 — a last-write-wins here would silently reinstate what another administrator has just removed. Refused with 403 when a role it adds or leaves out reaches an admin capability the caller does not hold; a role it keeps is not counted. Refused with 409 (about:blank#last-administrator) when it would leave no enabled subject holding tenant-admin — manage-tenants in the system tenant.

Path parameters​

NameTypeRequiredDetails
tenantstringyesThe tenant being administered, addressed by name.
idstringyesA row id. Constraints: a UUID.

Request body​

Body: application/json

FieldTypeRequiredDetails
role_idsarray of stringyesThe identifiers of every role the subject should hold. Replaces the current set. Constraints: at most 200 items.

Responses​

200 OK​

Body: application/json

FieldTypeRequiredDetails
itemsarray of objectyesEvery built-in scope, in the order a new tenant is given them.
items[]objectyes
items[].idstringyesThe role’s identifier.
items[].namestringyesThe role name.
items[].client_idstring or nullyesFor a role scoped to a client, that client’s internal id; null for a tenant-wide role.
items[].client_keystring or nullyesFor a client role, the client’s client_id.
items[].admin_reacharray of stringyes

401 RFC 9457 problem details​

Body: application/problem+json, an RFC 9457 problem document described under problem details.

403 RFC 9457 problem details​

Body: application/problem+json, an RFC 9457 problem document described under problem details.

PUT /admin/tenants/{tenant}/groups/{id}/default​

Requires the "manage-tenant" capability.

At most 200 groups are default at once; one more is refused with 409. Sets whether every subject created afterwards — by an administrator, by self-registration or by odudu seed — joins this group; an imported subject keeps the memberships its document lists. true is refused with 403 when the group’s roles, or any ancestor’s, reach an admin capability, whoever the caller is; false is never refused. While a group is a default, mapping a role that reaches a capability to it or to an ancestor, nesting one under a role it reaches, and moving it or an ancestor under a chain that reaches one are refused the same way. Answers the group’s ETag; If-Match is optional, and a stale one is refused with 412.

Path parameters​

NameTypeRequiredDetails
tenantstringyesThe tenant being administered, addressed by name.
idstringyesA row id. Constraints: a UUID.

Request body​

Body: application/json

FieldTypeRequiredDetails
defaultbooleanyesTrue to give every subject created from now on this group or role, false to stop. Subjects that already exist are not changed.

Responses​

200 OK​

Body: application/json

FieldTypeRequiredDetails
idstringyesThe group’s identifier, a UUID.
namestringyesThe group’s own name, unique among the groups beside it. Fixed once the group is made.
descriptionstring or nullyesWhat the group is for, or null.
parent_idstring or nullyesThe group this one sits under, or null for a group at the top level.
default_for_new_subjectsbooleanyesWhether every subject created from now on joins the group, by the admin API, registration and seeding alike. Subjects that already exist are not changed.
pathstringyesThe names from the top of the tree down to this group, such as /eng/platform. The groups claim carries it, and it is recomputed when the group is moved.
created_atstringyesWhen the group was created.
admin_reacharray of stringyesThe admin capabilities membership of the group hands out, however deep roles nest them: its own roles and those of every group above it.

401 RFC 9457 problem details​

Body: application/problem+json, an RFC 9457 problem document described under problem details.

403 RFC 9457 problem details​

Body: application/problem+json, an RFC 9457 problem document described under problem details.

Documentation coverage: 62 of 67 fields described (92%).