List what a group grants
GET/groups/:groupName/assignments
Returns everything the group hands to its members: the AWS permission sets assigned to it, and the custom applications assigned to it.
This is the endpoint to read before adding someone to a group (it is
exactly what they will inherit) and before deleting one, since
DELETE /groups/{groupName} is refused while any permission set
assignment remains.
Three things to get right when reading the body:
countcountsassignmentsonly. It is not the total number of entitlements; the applications are not in it.assignmentsisnullwhen it is empty, whileapplicationAssignmentsis[]. Two arrays, two different ways of saying "nothing", in one object. Guard the first against null.- Only what is assigned to this group is here. Access a member holds
directly, or through a different group, is not. Use
GET /users/{username}/effective-assignmentsfor one person's full picture.
There is no pagination; everything comes back in one body.
A group that does not exist gets a 200, not a 404. Since the name is
never checked against the directory, a misspelt one returns a
well-formed empty answer indistinguishable from a real group that grants
nothing.
The sibling operations disagree with this one and with each other:
GET /groups/{groupName} and GET /groups/{groupName}/members answer
404 for an unknown group, while POST and DELETE on the members
path answer 500. Confirm the group exists with
GET /groups/{groupName} before reading an empty result as meaningful.
Request
Responses
- 200
- 401
- 403
- 404
- 500
What the group grants. Also what an unknown group name returns; see the note above.
Authentication failed: the X-API-Token header was missing, malformed,
expired or not recognised.
This response is text/plain, not JSON. It is written by
http.Error in the authentication middleware, which runs before any
handler and therefore before anything that would build a JSON envelope.
A client that unconditionally JSON-parses response bodies will fail on
this one, so check the status code first.
The token is valid, but it is not allowed to act on this tenant.
An API token is minted inside one tenant and stays bound to it for life.
Sending it to a path whose tenant segment names a different tenant is
refused here, in middleware, before the operation runs, so this says
nothing about the resource you asked for, only about which tenant the
path named. Check the tenant server variable against the console the
token was created in.
No tenant matches the tenant segment of the request path. A group that does not exist is not reported here; that is a 200 with empty results.
The group's permission set assignments could not be read from the
database. A failure in the application lookup is not reported here:
that one is absorbed, and the response comes back 200 with
applicationAssignments empty.