improved

[Breaking change] List users API improved to support pagination

The current GET /users API is limited and does not support pagination. A single API call returns the entire list of users in your organization. For large organizations this could lead to timeouts.

From the 24th of January 2024, the API will support a new torii-version: 1.0.1. This new version supports pagination and sorting using the following new query parameters: sort, size, and cursor. Additionally, the new version will no longer support the minActiveAppsCount parameter.

New tokens created on or after the 23rd of January 2024 will default to the new torii-version: 1.0.1 and will support pagination and sorting.

Tokens created before the 23rd of January 2024 will continue to use the torii-version: 1.0.0 of the API that does not support pagination and returns the full list of users.

To opt-in to the new version, use the following header in your API request:

{  
	"headers": {  
		"torii-version": "1.0.1"  
  }  
}

After the 24th of July 2024, version 1.0.0 of the API will no longer be supported and API calls will use version 1.0.1 by default.
This means that if you make no changes until then, your API calls will return only the first 1000 results. We suggest creating new tokens or using the new header to opt-in to the new version 1.0.1 starting today.

To learn more about pagination and sorting, please refer to the API reference here: https://developers.toriihq.com/reference/pagination.