---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.5
  - property: og:type
    content: article
  - property: article:section
    content: Справочник API
  - property: og:title
    content: Получить информацию о пользователях с относительной пагинацией
  - property: article:tag
    content: Техническая инструкция
alternate:
  - https://yandex.ru/support/tracker/en/api-ref/users/get-users-relative.md
  - https://yandex.ru/support/tracker/ru/api-ref/users/get-users-relative.md
  - href: en/api-ref/users/get-users-relative.md
    type: text/markdown
    title: Markdown version
  - href: ../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/support/tracker/en/llms.txt


# Getting user information with relative pagination

The request lets you get information about user accounts registered in the organization using relative pagination. Unlike the [standard method for getting users](https://yandex.ru/support/tracker/en/api-ref/users/get-users.md), this request lets you retrieve more than 10,000 records.

<div class="request_example method_get yfm-clipboard">
    <p>GET</p>
    <pre><code>https://api.tracker.yandex.net/v3/users/_relative?expand=groups</code></pre>
    <button class="yfm-clipboard-button"><svg width="16" height="16" viewBox="0 0 24 24" class="yfm-clipboard-icon" data-animation="15">
    <path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path>
    <path stroke="currentColor" fill="transparent" strokewidth="1.5" d="M9.5 13l3 3l5 -5" visibility="hidden">
        <animate id="visibileAnimation-15" attributeName="visibility" from="hidden" to="visible" dur="0.2s" fill="freeze" begin=""></animate>
        <animate id="hideAnimation-15" attributeName="visibility" from="visible" to="hidden" dur="1s" begin="visibileAnimation-15.end+1" fill="freeze"></animate>
    </path>
</svg>
</button>
</div>

<!-- source: en/api-ref/_assets/style/methods.md -->

<!-- endsource: en/api-ref/_assets/style/methods.md -->

## Request format {#query}

Before you send the request, [get access to the API](https://yandex.ru/support/tracker/en/api-ref/access.md).

To get information about users in the organization, use an HTTP request with the `GET` method:

```json translate=no
GET /v3/users/_relative?perPage=<number_of_elements>&id=<identifier>&expand=<additional_fields>
Host: api.tracker.yandex.net
Authorization: OAuth <OAuth_token>
X-Org-ID or X-Cloud-Org-ID: <organization_ID>
```

<!-- source: en/api-ref/_includes/headings-no-body.md -->
{% cut "Headers" %}

* `Host`: address of the node that provides the API.

* <!-- source: en/api-ref/_includes/authorization.md -->
  `Authorization`: Authorization token about these formats:

    - `OAuth <OAuth_token>`: For authorization using the OAuth 2.0 protocol. [Learn more](https://yandex.ru/support/tracker/en/api-ref/access.md#about_OAuth)

    - `Bearer <IAM_token>`: For authorization using an IAM token, if a Yandex Identity Hub organization is linked to Tracker. [Learn more](https://yandex.ru/support/tracker/en/api-ref/access.md#iam-token)
  <!-- endsource: en/api-ref/_includes/authorization.md -->


* <!-- source: en/api-ref/_includes/org-id.md -->
  `X-Org-ID` or `X-Cloud-Org-ID`: Organization ID.

  - Use the `X-Org-ID` header if a Tracker organization is linked to Yandex 360 for Business.

  - Use the `X-Cloud-Org-ID` header if a Tracker organization is linked to Yandex Identity Hub.

  To get the organization ID, go to **Administration** → [**Organizations**](https://tracker.yandex.com/admin/orgs) and copy the value from the **ID** field. {#find-id}
  <!-- endsource: en/api-ref/_includes/org-id.md -->


{% endcut %}
<!-- endsource: en/api-ref/_includes/headings-no-body.md -->

{% cut "Request parameters" %}

**Additional parameters**

Parameter | Description | Data type
-------- | -------- | ----------
perPage | Number of items per page. From 1 to 100 inclusive. | Number
id | The user ID (uid) to start searching from. | Number
expand | Additional information to include in the response:<ul><li>`groups` — groups the users belong to</li></ul> | String

{% endcut %}

> Example: Request information about users, including their group memberships.
>
> ```json translate=no
> GET /v3/users/_relative?expand=groups
> Host: api.tracker.yandex.net
> Authorization: OAuth y0__xAbc******
> X-Org-ID: 1234******
> ```

## Response format {#answer}

{% list tabs %}

- Request completed successfully

    <!-- source: en/api-ref/_includes/answer-200.md -->
    If the request is successful, the API returns a response with code `200 OK`.
    <!-- endsource: en/api-ref/_includes/answer-200.md -->

    The response body contains a JSON object with an array of users and information about whether there are more pages.


    ```json translate=no
    {
      "users": [
        {
          "self": "https://api.tracker.yandex.net/v3/users/12********",
          "uid": 12********,
          "login": "username",
          "trackerUid": 12********,
          "passportUid": 12********,
          "cloudUid": "bfbdrb1aa248********",
          "firstName": "John",
          "lastName": "Smith",
          "display": "John Smith",
          "email": "username@example.com",
          "groups": [
              {
                  "self": "https://api.tracker.yandex.net/v3/groups/5",
                  "id": "5",
                  "display": "Developers"
              }
          ],
          "external": false,
          "hasLicense": true,
          "dismissed": false,
          "useNewFilters": true,
          "disableNotifications": false,
          "firstLoginDate": "2019-08-22T14:56:57.981+0000",
          "lastLoginDate": "2022-06-22T17:44:32.981+0000",
          "welcomeMailSent": true,
          "sources": [
                "directory"
            ]
        },
        ...
      ],
      "hasNext": true
    }
    ```


    {% cut "Response parameters" %}

    **General parameters**

    Parameter | Description | Data type
    -------- | -------- | ----------
    users | Array of objects with user information. | Array of objects
    hasNext | Indicates if there are more pages:<ul><li>`true` — there are more pages;</li><li>`false` — the current page is the last one.</li></ul> | Boolean

    **Parameters of the `user` object**

    Parameter | Description | Data type
    -------- | -------- | ----------
    self | Address of the API resource containing the user account information. | String
    uid | Unique identifier of the user account in Tracker. | Number
    login | User login. | String
    trackerUid | Unique identifier of the user account in Tracker. | Number
    passportUid | Unique identifier of the user account in the Yandex 360 for Business organization and Yandex ID. | Number
    cloudUid | Unique identifier of the user in Yandex Identity Hub. | String
    firstName | User's first name. | String
    lastName | User's last name. | String
    display | User's display name. | String
    email | User's email address. | String
    [groups](#groups) | Groups the user belongs to. Included in the response if the `expand` parameter in the request is set to `groups`. | Array of objects
    external | System parameter. | Boolean
    hasLicense | Indicates if the user has full access to Tracker:<ul><li>`true` — full access;</li><li>`false` — read-only access.</li></ul> | Boolean
    dismissed | User status in the organization:<ul><li>`true` — user is removed from the organization;</li><li>`false` — active employee of the organization.</li></ul> | Boolean
    useNewFilters | System parameter. | Boolean
    disableNotifications | Indicates if notifications are forcibly disabled for the user:<ul><li>`true` — notifications are disabled;</li><li>`false` — notifications are enabled.</li></ul> | Boolean
    firstLoginDate | Date and time of the user's first login to Tracker. Format: `YYYY-MM-DDThh:mm:ss.sss±hhmm`. | String
    lastLoginDate | Date and time of the user's last login to Tracker. Format: `YYYY-MM-DDThh:mm:ss.sss±hhmm`. | String
    welcomeMailSent | How the user was added: <ul><li>`true` — by email invitation;</li><li>`false` — by other means.</li></ul> | Boolean
    sources | Data source (for example, corporate directory). | String
    position | Job title. | String


    **Parameters of objects in the `groups` array** {#groups}

    Parameter | Description | Data type
    -------- | -------- | ----------
    self | Address of the API resource containing group information. | String
    id | Group ID. | String
    display | Group display name. | String

    {% endcut %}

- Request completed with an error

    <!-- source: en/api-ref/_includes/answer-error-401.md -->
    401
    :   The user is not authorized. Make sure that actions described in the [API access](https://yandex.ru/support/tracker/en/api-ref/access.md) section are performed.
    <!-- endsource: en/api-ref/_includes/answer-error-401.md -->

    <!-- source: en/api-ref/_includes/answer-error-403.md -->
    403
    :   You are not authorized to perform this action. You can check what rights you have in the Tracker interface. The same rights are required to perform an action via the API and interface.
    <!-- endsource: en/api-ref/_includes/answer-error-403.md -->

{% endlist %}

## Pagination mechanism {#pagination}

The request uses relative pagination:

- Users in the response are sorted in ascending order by user uid.
- To get the next page, specify the uid of the last user from the previous response page as the `id` parameter.
- The `hasNext` field in the response indicates whether there are more pages to load.

#### Example of sequential requests {#example}

1. First request:
   ```
   GET /v3/users/_relative?perPage=50
   ```

2. Next request (if `hasNext: true`):
   ```
   GET /v3/users/_relative?perPage=50&id=<last_user_uid>
   ```
