For the complete documentation index, see llms.txt. This page is also available as Markdown.

Users

List users

get

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.

Responses
200

Users list

application/json
get/api/users
GET /api/users HTTP/1.1
Accept: */*
{
  "data": [
    {
      "id": 42,
      "role": "user",
      "user_name": "john.doe"
    }
  ]
}

Create user

post

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.

Body
Responses
201

User created

application/json
post/api/users
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"
  }
}

List agent users

get

Returns every user whose role is agent, including role and group memberships.

Requires an account with administrative privileges (administrator or service account).

Responses
200

Agent users list

application/json
get/api/users/agents
GET /api/users/agents HTTP/1.1
Accept: */*
{
  "data": [
    {
      "id": 42,
      "role": "user",
      "user_name": "john.doe"
    }
  ]
}

List users and groups eligible for a foreign grant request

post

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 → 200 with empty data and groups.

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_domains must contain at least one domain ID. If it is empty or absent, the endpoint responds with 200 and empty users and groups arrays.

  • 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 with 200 and empty users and groups arrays. The response never reveals which domain caused the failure.

  • Users in data must hold 'Allow grant requests from third parties' (allow_foreign_grant_request) through a role on every domain in structures_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 groups must 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 in structures_domains, or through the default role. A group holding only allow_foreign_grant_request is not listed, although its members are. Assigning allow_only_group_foreign_grant_request to an individual user has no effect.

  • filter_domains, query and roles narrow the returned users and groups.

Query parameters
structures_domainsinteger[]Optional

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.

filter_domainsinteger[]Optional

Optional domain filter applied to the returned users and groups. Does not affect the permission check.

querystringOptional

Partial, case-insensitive match against a user full name, or against a group name or alias.

rolesinteger[]Optional

Restricts the returned users and groups to those holding at least one of the given role IDs.

Body

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.

filter_domainsinteger[] · nullableOptional

Optional domain filter applied to the returned users and groups. Does not affect the permission check, only the result set.

querystring · nullableOptional

Partial, case-insensitive match against a user full name, or against a group name or alias. An empty string is treated as no filter.

rolesinteger[] · nullableOptional

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.

structures_domainsinteger[] · nullableOptional

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.

Responses
200

Requestable users and groups

application/json

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.

post/api/users/grant_requestable
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"
    }
  ]
}

Search users

post

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:

  • query performs a partial, case-insensitive match against user name, full name and email.

  • domains restricts 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.

  • roles restricts the result set to users holding at least one of the supplied role IDs.

  • permission restricts 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:

      • admin and service accounts 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.

Query parameters
querystringOptional

Partial, case-insensitive match against user name, full name or email.

domainsstring[]Optional

Comma-separated list of domain IDs, or repeated domains[]=... entries.

rolesinteger[]Optional

Comma-separated list of role IDs, or repeated roles[]=... entries.

permissionstringOptional

Permission name to filter users by.

Body

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.

domainsstring[] · nullableOptional

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

permissionstring · nullableOptional

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:

  • admin and service accounts resolve the set of every reachable domain.
  • user accounts 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.

querystring · nullableOptional

Partial, case-insensitive match against the user name, full name or email. An empty string is treated as no filter.

rolesinteger[] · nullableOptional

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.

Responses
200

Matching users

application/json

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.

post/api/users/search
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
    }
  ]
}

Get user

get

Returns the specified user together with the domain roles they hold, either directly or through their groups.

Requires administrator access.

Path parameters
idintegerRequired

User ID.

Responses
200

User detail

application/json
get/api/users/{id}
GET /api/users/{id} HTTP/1.1
Accept: */*
{
  "data": {
    "groups": [],
    "id": 42,
    "role": "user",
    "user_name": "john.doe"
  }
}

Update user

put

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.

Path parameters
idintegerRequired

User ID.

Body

Update payload. The password field is deliberately not accepted here: sending it forces a 403 response regardless of any other field.

Responses
200

User updated

application/json
put/api/users/{id}
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"
  }
}

Delete user

delete

Permanently deletes the specified user.

Requires administrator access.

Path parameters
idintegerRequired

User ID.

Responses
204

User deleted

No content

delete/api/users/{id}
DELETE /api/users/{id} HTTP/1.1
Accept: */*

No content

Update user

patch

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.

Path parameters
idintegerRequired

User ID.

Body

Update payload. The password field is deliberately not accepted here: sending it forces a 403 response regardless of any other field.

Responses
200

User updated

application/json
patch/api/users/{id}
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