> ## Documentation Index > Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt > Use this file to discover all available pages before exploring further. # Directory > Search workspace directory for users, channels and teams. ### Changelog | Version | Description | | ------- | ----------- | | 8.9.0 | Changed the rate limit to 100 requests every 100 seconds per client IP addres. | | 7.0.0 | Added `type`, `workspace` and `text` query parameters | | 1.0.0 | Added workspace query param | | 0.65.0 | Added Pagination fields: count, total, offset | | 0.64.0 | Added | ## OpenAPI ````json GET /api/v1/directory { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Rooms" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "Channels" }, { "name": "Directory" }, { "name": "Groups" }, { "name": "Rooms" }, { "name": "Teams" }, { "name": "Room Invites" }, { "name": "Subscriptions" }, { "name": "ABAC" } ], "paths": { "/api/v1/directory": { "get": { "tags": [ "Directory" ], "summary": "Directory", "description": "Search workspace directory for users, channels and teams. \n\n### Changelog\n| Version | Description |\n| ------- | ----------- |\n| 8.9.0 | Changed the rate limit to 100 requests every 100 seconds per client IP addres. |\n| 7.0.0 | Added `type`, `workspace` and `text` query parameters |\n| 1.0.0 | Added workspace query param |\n| 0.65.0 | Added Pagination fields: count, total, offset |\n| 0.64.0 | Added |", "operationId": "get-api-v1-directory", "parameters": [ { "$ref": "#/components/parameters/Auth-Token" }, { "$ref": "#/components/parameters/UserId" }, { "name": "text", "in": "query", "description": "The search term to be filtered", "schema": { "type": "string" }, "example": "rocket" }, { "name": "type", "in": "query", "description": "It can be `channels` or `users`.\nWhen `type` is users you can send an additional workspace field, that can be local (default) or all. Workspace=all will work only if federation is enabled.", "schema": { "type": "string" }, "example": "users" }, { "name": "workspace", "in": "query", "description": "It can be `local` or `all`( if federation is enabled). It is `local` by default.", "schema": { "type": "string" }, "example": "local" }, { "name": "query", "in": "query", "description": "The query to search the workspace directory. When `type` is users you can send an additional workspace field, that can be local (default) or all. Workspace=all will work only if federation is enabled.", "required": true, "schema": { "example": "{\"text\": \"rocket\", \"type\": \"users\", \"workspace\": \"local\"}" } }, { "$ref": "#/components/parameters/offset" }, { "$ref": "#/components/parameters/count" }, { "$ref": "#/components/parameters/sort" }, { "$ref": "#/components/parameters/fields" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "result": { "type": "array", "items": { "type": "object", "properties": { "_id": { "type": "string" }, "createdAt": { "type": "string" }, "emails": { "type": "array", "items": { "type": "object", "properties": { "address": { "type": "string" }, "verified": { "type": "boolean" } } } }, "name": { "type": "string" }, "username": { "type": "string" }, "avatarETag": { "type": "string" } } } }, "count": { "type": "integer" }, "offset": { "type": "integer" }, "total": { "type": "integer" }, "success": { "type": "boolean" } } }, "examples": { "Success": { "value": { "result": [ { "_id": "jRca8kibJx8NkLJxt", "createdAt": "2018-04-13T12:46:26.517Z", "emails": [ { "address": "user.test.1523623548558@rocket.chat", "verified": false } ], "name": "EditedRealNameuser.test.1523623548558", "username": "editedusernameuser.test.1523623548558", "avatarETag": "6YbLtc4v9b4conXon" } ], "count": 1, "offset": 0, "total": 1, "success": true } } } } } }, "401": { "$ref": "#/components/responses/authorizationError" } } } } }, "components": { "parameters": { "Auth-Token": { "name": "X-Auth-Token", "in": "header", "description": "The `authToken` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f" }, "UserId": { "name": "X-User-Id", "in": "header", "description": "The `userId` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "rbAXPnMktTFbNpwtJ" }, "offset": { "name": "offset", "in": "query", "description": "Number of items to \"skip\" in the query, i.e. requests return count items, skipping the first offset items. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more.", "required": false, "schema": { "type": "integer" }, "example": 50 }, "count": { "name": "count", "in": "query", "description": "The number of items to return. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more.", "required": false, "schema": { "type": "integer" }, "example": 50 }, "sort": { "name": "sort", "in": "query", "description": "List of fields to order by, and in which direction. This is a JSON object, with properties listed in desired order, with values of 1 for ascending, or -1 for descending. For example, {\"value\": -1, \"_id\": 1}. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more.", "required": false, "schema": {} }, "fields": { "name": "fields", "in": "query", "description": "This parameter accepts a JSON object with properties that have a value of 1 or 0 to include or exclude them in the response. For example, to only retrieve the usernames of users: `fields={ \"username\": 1 }`. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#query-and-fields) to learn more.", "required": false, "schema": { "type": "string" } } }, "responses": { "authorizationError": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "message": { "type": "string" } } }, "examples": { "Authorization Error": { "value": { "status": "error", "message": "You must be logged in to do this." } } } } } } } } } ````