Users
Returns every user known to the authorization service, including their role and group memberships.
Requires an account with administrative privileges (administrator or service account).
The list is not filtered by domain: administrators and service accounts see every user.
Soft-deleted users are not returned.
Users list
Unauthorized
Forbidden
Internal Server Error
GET /api/users HTTP/1.1
Accept: */*
{
"data": [
{
"id": 42,
"role": "user",
"user_name": "john.doe"
}
]
}Creates a user with the supplied credentials and profile.
Requires administrator access.
The groups array is a list of group names. Groups that do not exist yet are created automatically as part of the same operation.
The response includes a Location header pointing at the newly created user.
User created
Unauthorized
Forbidden
Unprocessable Entity
Internal Server Error
POST /api/users HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 111
{
"user": {
"email": "john.doe@example.com",
"groups": [
"data-stewards"
],
"password": "s3cr3t",
"user_name": "john.doe"
}
}{
"data": {
"groups": [],
"id": 42,
"role": "user",
"user_name": "john.doe"
}
}Returns every user whose role is agent, including role and group memberships.
Requires an account with administrative privileges (administrator or service account).
Agent users list
Unauthorized
Forbidden
Internal Server Error
GET /api/users/agents HTTP/1.1
Accept: */*
{
"data": [
{
"id": 42,
"role": "user",
"user_name": "john.doe"
}
]
}Returns the users and groups that the caller is allowed to open a foreign grant request for, restricted to the domains supplied in structures_domains.
Permissions:
Administrator accounts always receive results.
Any other account must hold 'View structures' in at least one domain and 'Create grant request for third parties' in at least one domain. Missing either →
403.Independently, the caller must hold 'Create grant request for third parties' on every domain listed in
structures_domains. Missing on any of them →200with emptydataandgroups.
Filter location: Filters may be supplied either in the JSON request body or as query parameters. If both are present, the query-string values take precedence on conflict.
Behavior:
structures_domainsmust contain at least one domain ID. If it is empty or absent, the endpoint responds with200and emptyusersandgroupsarrays.The caller must be allowed to create foreign grant requests on every domain listed in
structures_domains. If the caller has the permission on some but not all of the domains, the endpoint responds with200and emptyusersandgroupsarrays. The response never reveals which domain caused the failure.Users in
datamust hold 'Allow grant requests from third parties' (allow_foreign_grant_request) through a role on every domain instructures_domains, or through the default role. Administrator accounts are listed only when they qualify the same way; the account type alone is not enough.Groups in
groupsmust hold 'Allow grant request from third parties (at group level)' (allow_only_group_foreign_grant_request) through a role assigned to the group on every domain instructures_domains, or through the default role. A group holding onlyallow_foreign_grant_requestis not listed, although its members are. Assigningallow_only_group_foreign_grant_requestto an individual user has no effect.filter_domains,queryandrolesnarrow the returned users and groups.
Domain IDs the caller intends to open a grant request for. Required in practice: without it (or with an empty list) the endpoint returns empty data and groups arrays.
Optional domain filter applied to the returned users and groups. Does not affect the permission check.
Partial, case-insensitive match against a user full name, or against a group name or alias.
Restricts the returned users and groups to those holding at least one of the given role IDs.
Filters accepted by the grant-requestable endpoint. The endpoint returns the users and groups the caller can address when opening a foreign grant request on the supplied domains.
Optional domain filter applied to the returned users and groups. Does not affect the permission check, only the result set.
Partial, case-insensitive match against a user full name, or against a group name or alias. An empty string is treated as no filter.
Restricts the returned users and groups to those holding at least one of the given role IDs. Role names are not accepted here; pass the numeric role identifier.
Domain IDs the caller intends to open a grant request for. Required in practice: when absent or empty, the endpoint responds with 200 and empty data and groups arrays. The caller must be allowed to create foreign grant requests on every listed domain for the request to return data.
Requestable users and groups
Users and groups the caller may open a foreign grant request for. Both lists are always present, even when empty, so clients can rely on a stable shape.
Unauthorized
Forbidden
Internal Server Error
POST /api/users/grant_requestable HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 67
{
"filter_domains": [
10
],
"query": "jane",
"structures_domains": [
10,
20
]
}{
"data": [
{
"full_name": "Jane Doe",
"id": 42
}
],
"groups": [
{
"alias": "ds",
"id": 7,
"name": "data-stewards"
}
]
}Returns the users known to the authorization service that match the supplied filters, up to a configured maximum number of results. Further matches are silently truncated.
Filter location: Filters may be supplied either in the JSON request body or as query parameters. If both are present, the query-string values take precedence on conflict.
Filter behavior:
queryperforms a partial, case-insensitive match against user name, full name and email.domainsrestricts the result set to users holding at least one role in any of the supplied domain IDs. Domain IDs must be sent as strings even in JSON payloads.rolesrestricts the result set to users holding at least one of the supplied role IDs.permissionrestricts the result set to users holding the supplied permission. Its effect depends on how the permission is granted:If the permission belongs to the default role, the domain filter is skipped and every user holding that permission is returned.
Otherwise, the result is restricted to the domains the caller can reach for that permission:
adminandserviceaccounts reach every domain.Regular accounts only produce results for
allow_foreign_grant_request, resolved against the domains where the caller may create foreign grant requests. Any other value yields an empty result.
Partial, case-insensitive match against user name, full name or email.
Comma-separated list of domain IDs, or repeated domains[]=... entries.
Comma-separated list of role IDs, or repeated roles[]=... entries.
Permission name to filter users by.
Filters accepted by the user search endpoint. All filters are optional and combine with AND semantics. Results are truncated to the configured maximum number of users.
Restricts the result set to users that hold at least one role in at least one of the given domain IDs. Domain IDs must be sent as strings even inside a JSON body
Restricts the result set to users holding the given permission on at least one domain reachable by the caller.
Today only allow_foreign_grant_request produces results:
adminandserviceaccounts resolve the set of every reachable domain.useraccounts resolve the domains where they themselves are allowed to create foreign grant requests.
Any other value yields an empty reachable-domain set and therefore an empty result.
Partial, case-insensitive match against the user name, full name or email. An empty string is treated as no filter.
Restricts the result set to users holding at least one of the given role IDs. Role IDs are numeric identifiers; role names are not accepted here.
Matching users
Result of a user search. The list may be empty when no user matches the supplied filters or when the caller has no visibility on the requested domains.
Unauthorized
Internal Server Error
POST /api/users/search HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 79
{
"domains": [
"1",
"2"
],
"permission": "allow_foreign_grant_request",
"query": "john"
}{
"data": [
{
"full_name": "John Doe",
"id": 42
}
]
}Returns the specified user together with the domain roles they hold, either directly or through their groups.
Requires administrator access.
User ID.
User detail
Unauthorized
Forbidden
Not found
Internal Server Error
GET /api/users/{id} HTTP/1.1
Accept: */*
{
"data": {
"groups": [],
"id": 42,
"role": "user",
"user_name": "john.doe"
}
}Updates the user profile fields supplied in the request body.
Requires administrator access, or the caller must be the target user themselves.
If the payload contains a password field, the request is rejected with 403 and no field is updated. Password changes are handled through a dedicated flow, not this endpoint.
The groups array is a list of group names. Groups that do not exist yet are created automatically.
The endpoint accepts partial updates: fields not present in the payload are left untouched.
User ID.
Update payload. The password field is deliberately not accepted here: sending it forces a 403 response regardless of any other field.
User updated
Unauthorized
Forbidden
Not found
Unprocessable Entity
Internal Server Error
PUT /api/users/{id} HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 60
{
"user": {
"full_name": "John Doe",
"groups": [
"data-stewards"
]
}
}{
"data": {
"groups": [],
"id": 42,
"role": "user",
"user_name": "john.doe"
}
}Permanently deletes the specified user.
Requires administrator access.
User ID.
User deleted
No content
Unauthorized
Forbidden
Not found
Internal Server Error
DELETE /api/users/{id} HTTP/1.1
Accept: */*
No content
Updates the user profile fields supplied in the request body.
Requires administrator access, or the caller must be the target user themselves.
If the payload contains a password field, the request is rejected with 403 and no field is updated. Password changes are handled through a dedicated flow, not this endpoint.
The groups array is a list of group names. Groups that do not exist yet are created automatically.
The endpoint accepts partial updates: fields not present in the payload are left untouched.
User ID.
Update payload. The password field is deliberately not accepted here: sending it forces a 403 response regardless of any other field.
User updated
Unauthorized
Forbidden
Not found
Unprocessable Entity
Internal Server Error
PATCH /api/users/{id} HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 60
{
"user": {
"full_name": "John Doe",
"groups": [
"data-stewards"
]
}
}{
"data": {
"groups": [],
"id": 42,
"role": "user",
"user_name": "john.doe"
}
}Last updated