# List users

- Operation ID: `listUsersUsingGET`
- HTTP method: `GET`
- Path: `/uauth/users/listing`
- [Human-readable API reference](https://hub.synerise.com/api-reference/identity-and-access-management#tag/User-management/operation/listUsersUsingGET)

## Self-contained OpenAPI method

The fenced document below contains this method's documentation and all of its local references. It is self-contained; no category or master specification fetch is required.

```yaml
openapi: 3.0.0
info:
  title: Synerise Public API
  version: 1.9.1
paths:
  /uauth/users/listing:
    get:
      tags:
        - User management
      summary: List users
      description: |
        List users from the current workspace

        ---

        **API consumer:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>

        **User role permission required:** `settings_users: read`
      operationId: listUsersUsingGET
      parameters:
        - name: page
          in: query
          description: The page of results to retrieve. The first page has the index `0`.
          required: true
          schema:
            type: integer
            format: int32
        - name: size
          in: query
          description: The number of entries on a page
          required: true
          schema:
            type: integer
            format: int32
        - name: status
          in: query
          description: Filters the results by status of the users
          required: true
          schema:
            type: string
            enum:
              - ALL
              - ACTIVE
              - PENDING
              - EXPIRED
              - GUEST
              - MANAGED
        - name: search
          in: query
          required: true
          description: String to search for in the first names, surnames, and email addresses
          schema:
            type: string
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    description: A list of users
                    items:
                      type: object
                      properties:
                        avatar:
                          type: string
                          description: URL of the user's avatar
                        created:
                          type: string
                          format: date-time
                          description: Account creation date
                        displayName:
                          type: string
                          description: User's display name
                        email:
                          type: string
                          description: User's email address
                        firstName:
                          type: string
                          description: First name of the user
                        id:
                          type: integer
                          format: int64
                          description: User ID
                        lastLogin:
                          type: string
                          format: date-time
                          description: Last login time
                        lastName:
                          type: string
                          description: Last name of the user
                        roleNames:
                          type: array
                          description: An array of roles (names) assigned to the user in the currently selected workspace
                          items:
                            type: string
                        roles:
                          type: array
                          description: An array of roles (IDs) assigned to the user in the currently selected workspace
                          items:
                            type: integer
                            format: int64
                        status:
                          type: string
                          description: Account status
                          enum:
                            - ACTIVE
                            - PENDING
                        updated:
                          type: string
                          format: date-time
                          description: Last update time
                  meta:
                    type: object
                    description: Metadata of the request
                    properties:
                      pagination:
                        type: object
                        description: Pagination metadata
                        properties:
                          limit:
                            type: integer
                            format: int32
                            description: The number of entries per page
                          page:
                            type: integer
                            format: int32
                            description: Page number, starting with `0`
                          pages:
                            type: integer
                            format: int32
                            description: The total number of pages
                          total:
                            type: integer
                            format: int32
                            description: The total number of entries on all pages
        "401":
          description: Unauthorized
          content: {}
        "403":
          description: Forbidden
          content: {}
        "404":
          description: Not Found
          content: {}
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/identity-and-access-management#tag/User-management/operation/listUsersUsingGET
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/uauth/users/listing?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE&search=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/uauth/users/listing?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE&search=SOME_STRING_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/uauth/users/listing?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE&search=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/uauth/users/listing?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE&search=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/uauth/users/listing');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_INTEGER_VALUE',
              'size' => 'SOME_INTEGER_VALUE',
              'status' => 'SOME_STRING_VALUE',
              'search' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/uauth/users/listing?page=SOME_INTEGER_VALUE&size=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE&search=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
servers:
  - description: Microsoft Azure EU
    url: https://api.synerise.com
  - description: Microsoft Azure USA
    url: https://api.azu.synerise.com
  - description: Google Cloud Platform
    url: https://api.geb.synerise.com
tags:
  - name: User management
components:
  securitySchemes:
    JWT:
      type: http
      scheme: bearer
      description: |-
        JWT Bearer token. The header looks like this: `Bearer {JWT}`

        Remember to include the space between 'Bearer' and the token.

        Generate a token via the **Authorization** endpoints.
```
