/filters/users - Get aggregated user filters

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://api.my.nethesis.it/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "my.nethesis.it MCP server": {
    "url": "https://api.my.nethesis.it/mcp"
  }
}

Close
GET /filters/users

Returns the list of roles the caller can assign to users and the distinct creators of the users visible to the caller (for the created_by filter on GET /api/users), respecting RBAC hierarchy.

Organizations dropdown is populated by the dedicated /api/organizations endpoint, which supports search and pagination.

Responses

  • 200 application/json

    User filters retrieved successfully

    Hide response attributes Show response attributes object
    • code integer
    • message string
    • data object
      Hide data attributes Show data attributes object
      • roles array[object]
        Hide roles attributes Show roles attributes object
        • id string

          Role ID

        • name string

          Role name

        • description string

          Role description

      • created_by array[object]

        Distinct creators of the users visible to the caller (one entry per user; organization attached to disambiguate homonyms)

        Hide created_by attributes Show created_by attributes object
        • user_id string

          Creator user logto_id

        • name string

          Creator full name

        • email string

          Creator email

        • organization_id string

          Logto ID of the creator's organization

        • organization_name string

          Display name of the creator's organization

  • 401 application/json

    Unauthorized - invalid or missing token

    Hide response attributes Show response attributes object
    • code integer
    • message string
    • data object | null
  • 403 application/json

    Forbidden - insufficient permissions

    Hide response attributes Show response attributes object
    • code integer
    • message string
    • data object | null
GET /filters/users
curl \
 --request GET 'https://api.your-domain.com/api/filters/users' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "code": 200,
  "message": "user filters retrieved successfully",
  "data": {
    "roles": [
      {
        "id": "role_abc123",
        "name": "Admin",
        "description": "System administrator"
      },
      {
        "id": "role_def456",
        "name": "Support",
        "description": "Support operator"
      }
    ],
    "created_by": [
      {
        "user_id": "kyfy0tlnlk3l",
        "name": "Sviluppo - Integrazioni Esterne",
        "email": "sviluppo+integrazioni@nethesis.it",
        "organization_id": "eeex9cffzsd7",
        "organization_name": "Nethesis Diretta"
      }
    ]
  }
}
Response examples (401)
{
  "code": 401,
  "message": "invalid token",
  "data": {}
}
Response examples (403)
{
  "code": 403,
  "message": "insufficient permissions",
  "data": {}
}