---
updatedAt: 2026-06-24T21:48:09.000Z
agentTools:
  projectIndex: https://docs.sandflysecurity.com/llms.txt
---

# Get all users

Gets all of the users.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "contact": {
      "email": "info@sandflysecurity.com"
    },
    "description": "Sandfly Security Server API",
    "license": {
      "name": "Sandfly Security, Ltd.",
      "url": "https://www.sandflysecurity.com"
    },
    "title": "Sandfly API",
    "version": "5.8.0"
  },
  "servers": [
    {
      "url": "https://{sandfly-api-host}/v4"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/users": {
      "get": {
        "operationId": "getUsers",
        "description": "Gets all of the users.",
        "parameters": [
          {
            "$ref": "#/components/parameters/include_system"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "required": [
                    "users"
                  ],
                  "properties": {
                    "users": {
                      "description": "List of users",
                      "items": {
                        "$ref": "#/components/schemas/User"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Users retrieved."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardResponse"
                }
              }
            },
            "description": "Error getting users."
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardResponse"
                }
              }
            },
            "description": "Unexpected error"
          }
        },
        "summary": "Get all users",
        "tags": [
          "Users"
        ]
      }
    }
  },
  "components": {
    "parameters": {
      "include_system": {
        "description": "If true, data returned include system only data types typically not intended for end user use.",
        "in": "query",
        "name": "summary",
        "required": false,
        "schema": {
          "type": "boolean"
        }
      }
    },
    "schemas": {
      "StandardResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/StandardResponseStatus"
          }
        ],
        "properties": {
          "data": {
            "description": "Data that can go along with the status.",
            "type": "string"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "StandardResponseStatus": {
        "properties": {
          "detail": {
            "description": "Extended explanation of status.",
            "type": "string"
          },
          "formattedDetail": {
            "description": "Optional additional details about the status (typically an error) that, if present and not an empty string, should be displayed as pre-formatted, monospaced text.",
            "type": "string"
          },
          "status": {
            "description": "HTTP status code.",
            "format": "int32",
            "maximum": 599,
            "minimum": 100,
            "type": "integer"
          },
          "title": {
            "description": "Short description of status.",
            "type": "string"
          }
        },
        "required": [
          "status",
          "title",
          "detail"
        ],
        "type": "object"
      },
      "User": {
        "required": [
          "created_date",
          "email",
          "full_name",
          "last_login_date",
          "last_login_ip",
          "logins",
          "logins_failed",
          "logins_failed_count",
          "password",
          "preferences",
          "roles",
          "sso",
          "username"
        ],
        "properties": {
          "created_date": {
            "description": "Date this user was created",
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "description": "Email address for the user.",
            "type": "string",
            "format": "email"
          },
          "full_name": {
            "description": "Full name of user.",
            "type": "string"
          },
          "last_login_date": {
            "description": "Last login date/time for this user.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "last_login_ip": {
            "description": "Last login IP address we saw this user.",
            "format": "string",
            "type": "string"
          },
          "logins": {
            "description": "An comma delimited array of the dates and locations this user has ever logged in from.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "logins_failed": {
            "description": "An comma delimited array of the dates and locations this user has failed logged in from.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "logins_failed_count": {
            "description": "A counter of the number of failed logins from the last successful login. Used to detect brute forcers.",
            "format": "int64",
            "type": "integer"
          },
          "password": {
            "description": "User's password (used for setting during creation; not returned)",
            "type": "string"
          },
          "preferences": {
            "description": "Preferences for user.",
            "type": "string"
          },
          "roles": {
            "description": "Roles this user has access to.",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/UserRoles"
                },
                {
                  "$ref": "#/components/schemas/MachineRoles"
                }
              ]
            },
            "type": "array"
          },
          "sso": {
            "description": "False for a local Sandfly user, true for an SSO user. Cannot change once user is created.",
            "type": "boolean"
          },
          "username": {
            "description": "Username",
            "type": "string",
            "not": {
              "enum": [
                "system"
              ]
            }
          }
        },
        "type": "object"
      },
      "UserRoles": {
        "type": "string",
        "enum": [
          "admin",
          "power_user",
          "user",
          "responder"
        ]
      },
      "MachineRoles": {
        "type": "string",
        "enum": [
          "api_result_read",
          "api_scan"
        ]
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "bearerFormat": "JWT",
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```