---
updatedAt: 2026-05-12T10:00:11.000Z
---

# Retrieve users

This operation returns an object containing information about users that the current user can manage (view, edit, or delete). Adding **query_viewable=1** expands this to all users that are viewable by the current user.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "x-explorer-enabled": false,
  "info": {
    "title": "User API (Legacy)",
    "license": {
      "name": "(c) Copyright 2021 WhiteHat Security"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://sentinel.whitehatsec.com"
    }
  ],
  "paths": {
    "/api/user": {
      "get": {
        "tags": [
          "User API v1.0"
        ],
        "summary": "Retrieve users",
        "description": "This operation returns an object containing information about users that the current user can manage (view, edit, or delete). Adding **query_viewable=1** expands this to all users that are viewable by the current user.",
        "operationId": "getManagedUsers",
        "parameters": [
          {
            "name": "query_username_like",
            "in": "query",
            "description": "Retrieves users with usernames that match part or all of what is given (case insensitive). EXAMPLE: Given a value of 'abc', this parameter would fetch users with usernames of 'abc@example.com', 'abcdef@example.com', and 'foo@abc.com'.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query_first_name_like",
            "in": "query",
            "description": "Retrieves users with first names that match part or all of what is given (case insensitive). EXAMPLE: Given a value of 'Fred', this parameter would fetch users whose first name is 'Fred', 'Frederic', and 'Manfred'.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query_last_name_like",
            "in": "query",
            "description": "Retrieves users with last names that match part or all of what is given (case insensitive). EXAMPLE: Given a value of 'Man', this parameter would fetch users whose last name is 'Man', 'Mann', 'Roman', or 'Romanoff'.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query_last_login_after",
            "in": "query",
            "description": "Retrieves users whose last login to Sentinel occurred after the date and time given. Requires a valid ISO-8601 (UTC/GMT) date format string. EXAMPLE: 'YYYY-MM-DDThh:mm:ssZ' -> '2008-12-12T21:35:59Z'",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query_viewable",
            "in": "query",
            "description": "Retrieves both managed users and users that the requesting user has permission to view but not manage.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ],
              "default": "0",
              "example": "0"
            }
          },
          {
            "name": "display_additional_attributes",
            "in": "query",
            "description": "This parameter controls if additional user attributes are displayed. PREREQUISITE: format=json",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ],
              "default": "0",
              "example": "0"
            }
          },
          {
            "name": "display_preferences",
            "in": "query",
            "description": "Displays a list of preferences for each user.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ],
              "default": "0",
              "example": "0"
            }
          },
          {
            "name": "display_view",
            "in": "query",
            "description": "This parameter controls what view is displayed for exporting user data in CSV format. Two views are currently supported. Absence of this flag or a value of '0' displays the older (default) view. Setting the value of this flag to '1' displays a newer view. Each view has some key information in common (username, role), but the remaining information is different. PREREQUISITE: format=csv",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "enum": [
                "0",
                "1"
              ],
              "default": "0",
              "example": "0"
            }
          },
          {
            "name": "page:limit",
            "in": "query",
            "description": "Limit results to n number of pages.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "page:offset",
            "in": "query",
            "description": "Begin showing results from page number n.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "page:order_by",
            "in": "query",
            "description": "Order the results.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "id_asc",
                "id_desc",
                "username",
                "username_asc",
                "username_desc",
                "first_name",
                "first_name_asc",
                "first_name_desc",
                "last_name",
                "last_name_asc",
                "last_name_desc",
                "role",
                "role_asc",
                "role_desc",
                "created_by",
                "created_by_asc",
                "created_by_desc",
                "job_title",
                "job_title_asc",
                "job_title_desc",
                "phone",
                "phone_asc",
                "phone_desc",
                "mobile",
                "mobile_asc",
                "mobile_desc",
                "timezone",
                "timezone_asc",
                "timezone_desc",
                "country",
                "country_asc",
                "country_desc"
              ],
              "default": "id",
              "example": "id"
            }
          },
          {
            "name": "format",
            "in": "query",
            "description": "Selects the requested response representation format.",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "string",
              "default": "application/xml",
              "example": "application/json",
              "enum": [
                "application/json",
                "application/xml",
                "csv"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Provides the information of Sentinel users.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/UserGetPageLimitResponseObj"
                    },
                    {
                      "$ref": "#/components/schemas/UserGetResponseCollection"
                    }
                  ]
                },
                "examples": {
                  "users": {
                    "description": "Users without limit parameter.",
                    "value": [
                      {
                        "last_name": "string",
                        "timezone": "string",
                        "last_viewed_messages": "string",
                        "role": "string",
                        "client_id": "string",
                        "id": "string",
                        "type": "string",
                        "email_address": "string",
                        "client": "string",
                        "first_name": "string",
                        "show_cvss": "string",
                        "immediate_severity_email": "string",
                        "last_login": "string",
                        "monthly_email": true,
                        "username": "string",
                        "action_items_email": true,
                        "daily_email": true,
                        "weekly_email": true,
                        "expose_hostnames": true,
                        "email_preferences": {
                          "sast_pre_scan_success": 0,
                          "sast_pre_scan_failure": 0,
                          "immediate_credential": 0,
                          "sast_scan_success": 0,
                          "sast_scan_failure": 0,
                          "immediate_schedule": 0,
                          "immediate_sca_scan_complete": 0,
                          "daily_closed_vuln": 0,
                          "immediate_open_vuln": 0,
                          "immediate_closed_vuln": 0,
                          "weekly_schedule": 0,
                          "immediate_manual_scan_complete": 0,
                          "weekly_credential": 0
                        },
                        "company": "string",
                        "lockedout": 0,
                        "immediate_email": true,
                        "href": "string",
                        "entity_role_id": "string",
                        "has_api_key": 0,
                        "zipcode": "string",
                        "phone": "string",
                        "address": "string",
                        "city": "string",
                        "country": "string",
                        "created_by": "string",
                        "creation_time": "string",
                        "fax": "string",
                        "job_title": "string",
                        "middle_initial": "string",
                        "mobile": "string",
                        "notes": "string",
                        "require_mfa": "string",
                        "state": "string"
                      }
                    ]
                  },
                  "userslimit": {
                    "description": "Users with limit parameter.",
                    "value": {
                      "collection": [
                        {
                          "last_name": "string",
                          "timezone": "string",
                          "last_viewed_messages": "string",
                          "role": "string",
                          "client_id": "string",
                          "id": "string",
                          "type": "string",
                          "email_address": "string",
                          "client": "string",
                          "first_name": "string",
                          "show_cvss": "string",
                          "immediate_severity_email": "string",
                          "last_login": "string",
                          "monthly_email": true,
                          "username": "string",
                          "action_items_email": true,
                          "daily_email": true,
                          "weekly_email": true,
                          "expose_hostnames": true,
                          "email_preferences": {
                            "sast_pre_scan_success": 0,
                            "sast_pre_scan_failure": 0,
                            "immediate_credential": 0,
                            "sast_scan_success": 0,
                            "sast_scan_failure": 0,
                            "immediate_schedule": 0,
                            "immediate_sca_scan_complete": 0,
                            "daily_closed_vuln": 0,
                            "immediate_open_vuln": 0,
                            "immediate_closed_vuln": 0,
                            "weekly_schedule": 0,
                            "immediate_manual_scan_complete": 0,
                            "weekly_credential": 0
                          },
                          "company": "string",
                          "lockedout": 0,
                          "immediate_email": true,
                          "href": "string",
                          "entity_role_id": "string",
                          "has_api_key": 0,
                          "zipcode": "string",
                          "phone": "string",
                          "address": "string",
                          "city": "string",
                          "country": "string",
                          "created_by": "string",
                          "creation_time": "string",
                          "fax": "string",
                          "job_title": "string",
                          "middle_initial": "string",
                          "mobile": "string",
                          "notes": "string",
                          "require_mfa": "string",
                          "state": "string"
                        }
                      ],
                      "type": "string",
                      "page": {
                        "offset": 0,
                        "total": 0,
                        "order_by": "string",
                        "limit": 0
                      }
                    }
                  }
                }
              },
              "application/xml": {
                "example": "XML preview is currently not supported."
              },
              "text/csv": {
                "examples": {
                  "display_view=0": {
                    "description": "Older view. Column headers for data that may be returned using this format.",
                    "value": "Username,Role,Groups,Client"
                  },
                  "display_view=1": {
                    "description": "Newer view. Column headers for data that may be returned using this format.",
                    "value": "Username,First Name,Last Name,Role,Status,Created Date,Last Login,Daily Emails,Weekly Emails,Monthly Emails,Vuln Emails (High rated or above)"
                  }
                }
              }
            }
          },
          "400": {
            "description": "BadRequestResponse indicates a request with invalid parameters.",
            "content": {}
          },
          "401": {
            "description": "UnauthorizedResponse signals an unauthorized API access.",
            "content": {}
          },
          "403": {
            "description": "ForbiddenResponse signals a request for a resource that does not exist or is not authorized.",
            "content": {}
          },
          "500": {
            "description": "GenericError generic error.",
            "content": {}
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "schemas": {
      "UserGetResponseObj": {
        "type": "object",
        "properties": {
          "last_name": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "last_viewed_messages": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "client_id": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "email_address": {
            "type": "string"
          },
          "client": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "show_cvss": {
            "type": "string"
          },
          "immediate_severity_email": {
            "type": "string"
          },
          "last_login": {
            "type": "string"
          },
          "monthly_email": {
            "type": "boolean"
          },
          "username": {
            "type": "string"
          },
          "action_items_email": {
            "type": "boolean"
          },
          "daily_email": {
            "type": "boolean"
          },
          "weekly_email": {
            "type": "boolean"
          },
          "expose_hostnames": {
            "type": "boolean"
          },
          "email_preferences": {
            "properties": {
              "sast_pre_scan_success": {
                "type": "number"
              },
              "sast_pre_scan_failure": {
                "type": "number"
              },
              "immediate_credential": {
                "type": "number"
              },
              "sast_scan_success": {
                "type": "number"
              },
              "sast_scan_failure": {
                "type": "number"
              },
              "immediate_schedule": {
                "type": "number"
              },
              "immediate_sca_scan_complete": {
                "type": "number"
              },
              "daily_closed_vuln": {
                "type": "number"
              },
              "immediate_open_vuln": {
                "type": "number"
              },
              "immediate_closed_vuln": {
                "type": "number"
              },
              "weekly_schedule": {
                "type": "number"
              },
              "immediate_manual_scan_complete": {
                "type": "number"
              },
              "weekly_credential": {
                "type": "number"
              }
            },
            "type": "object"
          },
          "company": {
            "type": "string"
          },
          "lockedout": {
            "type": "number"
          },
          "immediate_email": {
            "type": "boolean"
          },
          "href": {
            "type": "string"
          },
          "entity_role_id": {
            "type": "string"
          },
          "has_api_key": {
            "type": "number"
          },
          "zipcode": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "created_by": {
            "type": "string"
          },
          "creation_time": {
            "type": "string"
          },
          "fax": {
            "type": "string"
          },
          "job_title": {
            "type": "string"
          },
          "middle_initial": {
            "type": "string"
          },
          "mobile": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "require_mfa": {
            "type": "string"
          },
          "state": {
            "type": "string"
          }
        }
      },
      "UserGetPageLimitResponseObj": {
        "type": "object",
        "properties": {
          "collection": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserGetResponseObj"
            }
          },
          "type": {
            "type": "string"
          },
          "page": {
            "properties": {
              "offset": {
                "type": "number"
              },
              "total": {
                "type": "number"
              },
              "order_by": {
                "type": "string"
              },
              "limit": {
                "type": "number"
              }
            }
          }
        }
      },
      "UserGetResponseCollection": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/UserGetResponseObj"
        }
      }
    }
  },
  "x-readme": {
    "proxy-enabled": true
  }
}
```